- Code: Select all
In openCR.fit(capthist = grizzCH, mask = GBmask.o, type = "JSSAsecrlCL", :
variance calculation failed for some beta parameters; confounding likely
My call to openCR.fit is as follows, and it quite simple. I have two time periods for lambda (first and last 6 years of study), a Trap_Type covariate for lambda0, and null model for sigma:
- Code: Select all
osecr.mult13trap.lambda <- openCR.fit(capthist = grizzCH, mask= GBmask.o, type = 'JSSAsecrlCL',
list(lambda~scov, lambda0~Trap_Type, sigma~1),
sessioncov=c(rep("Early",times=6),rep("Late", times=6)),
trace=TRUE, ncores=6)
I have more complex models that include sex and sigma covariates, but he confounding error appears even with this simple model.
The issue appears to stem from the Trap_Type covariate:
- Code: Select all
Beta parameters (coefficients)
beta SE.beta lcl ucl
lambda0 -2.45756720 0.04468611 -2.54515037 -2.3699840248
lambda0.Trap_TypeRT -0.76491628 NaN NaN NaN
phi 1.65395287 0.07747854 1.50209773 1.8058080063
lambda -0.03289611 0.01639370 -0.06502717 -0.0007650474
lambda.scovLate 0.03608632 0.02539102 -0.01367916 0.0858518018
sigma 8.98285871 0.00560486 8.97187339 8.9938440354
I can see that I have a decent amount of each Trap_Type (BS or RT) across sessions:
- Code: Select all
lapply(grizzCH, function(x) summary(covariates(traps(x))))
$Southern_Rockies_2006
Trap_Type
BS:68
RT: 2
$Southern_Rockies_2007
Trap_Type
BS:71
RT: 7
$Southern_Rockies_2008
Trap_Type
BS:75
RT:19
$Southern_Rockies_2009
Trap_Type
BS:54
RT:89
$Southern_Rockies_2010
Trap_Type
BS: 20
RT:116
$Southern_Rockies_2011
Trap_Type
BS:14
RT:98
$Southern_Rockies_2012
Trap_Type
BS: 16
RT:117
$Southern_Rockies_2013
Trap_Type
BS: 37
RT:155
$Southern_Rockies_2014
Trap_Type
BS: 24
RT:150
$Southern_Rockies_2015
Trap_Type
BS: 0
RT:174
$Southern_Rockies_2016
Trap_Type
BS: 0
RT:176
$Southern_Rockies_2017
Trap_Type
BS: 0
RT:182
Any thoughts on where the issue lies?