I am running multi-year models that span 10 years, with each year being a separate session. I am trying to create models that contain a quadratic trend in g0 and sigma across sessions (years), but I'm having no luck.

To keep it simple I will only talk about models concerning g0 here.

When I run the following model...

MODEL 1:

D.year.g.year.s.1 <- secr.fit(Capthist, model = list(D ~ session, g0 ~ session, sigma ~ 1), trace = TRUE, mask=c(Mask.2008, Mask.2009, Mask.2010, Mask.2011, Mask.2012, Mask.2013, Mask.2014, Mask.2015, Mask.2016), detectfn=0, hcov='sex')

Density is estimated for each year separately (which is what I want) and g0 is also estimated for every year separately, with a single intercept corresponding to the first year and additional parameters corresponding to each additional year of the study.

When I run the following model...

MODEL 2:

D.year.g.year.trend.s.1 <- secr.fit(Capthist, model = list(D ~ session, g0 ~ Session, sigma ~ 1), trace = TRUE, mask=c(Mask.2008, Mask.2009, Mask.2010, Mask.2011, Mask.2012, Mask.2013, Mask.2014, Mask.2015, Mask.2016), detectfn=0, hcov='sex')

Density is estimated for each year separately (which is what I want) and g0 is estimated as a linear trend across sessions (years), with a single intercept and one additional parameters corresponding to the linear tend in g0.

I am now trying to incorporate a quadratic trend in g0 across sessions (years) but with no luck. When I run the follow 2 models, with or without parenthesis around Session...

MODEL 3:

D.year.g.year.trend.2.s.1 <- secr.fit(Capthist, model = list(D ~ session, g0 ~ (Session)^2, sigma ~ 1), trace = TRUE, mask=c(Mask.2008, Mask.2009, Mask.2010, Mask.2011, Mask.2012, Mask.2013, Mask.2014, Mask.2015, Mask.2016), detectfn=0, hcov='sex')

MODEL 4:

D.year.g.year.trend.2.s.1 <- secr.fit(Capthist, model = list(D ~ session, g0 ~ Session^2, sigma ~ 1), trace = TRUE, mask=c(Mask.2008, Mask.2009, Mask.2010, Mask.2011, Mask.2012, Mask.2013, Mask.2014, Mask.2015, Mask.2016), detectfn=0, hcov='sex')

...the program simply ignores the squared term and instead estimates a linear trend in g0 across sessions (year) exactly like MODEL 2 above.

When I run the follow 2 models, with or without parenthesis around session...

MODEL 5:

D.year.g.year.trend.2.s.1 <- secr.fit(Capthist, model = list(D ~ session, g0 ~ (session)^2, sigma ~ 1), trace = TRUE, mask=c(Mask.2008, Mask.2009, Mask.2010, Mask.2011, Mask.2012, Mask.2013, Mask.2014, Mask.2015, Mask.2016), detectfn=0, hcov='sex')

MODEL 6:

D.year.g.year.trend.2.s.1 <- secr.fit(Capthist, model = list(D ~ session, g0 ~ session^2, sigma ~ 1), trace = TRUE, mask=c(Mask.2008, Mask.2009, Mask.2010, Mask.2011, Mask.2012, Mask.2013, Mask.2014, Mask.2015, Mask.2016), detectfn=0, hcov='sex')

...the program again ignores the squared term and instead estimates a separate g0 for each separate year exactly like MODEL 1 above.

So how do I correctly incorporate a quadratic trend in g0 across sessions (years)?

Thanks

Adam