Hello,
I am rather new to both R and secr, so maybe the answer to my question is totally obvious - however, I searched the forum for problems with failed variance calculations and I am not sure if my problem suits to one of the previous posts.
I am working on a red deer faecal DNA data set and I tried fitting different models. However, the heterogeneity model g0 ~ h2 seemed to yield quite strange results. Its estimates (particularly D, g0 and sigma) are exactly the same as in the g0 ~ 1 model (which is very unlikely given the obvious heterogeneiyt in the capture frequencies), and there are warnings and NaNs. Here is what I entered:
secr.fit(capthist = Soonwald_ROW, model = g0 ~ h2, buffer = 4000,
detectfn = 2, method = "BFGS", trace = FALSE)
And here are the warnings/ error messages:
1: In secr.fit(Soonwald_ROW, model = g0 ~ h2, buffer = 4000, trace = FALSE, :
using default starting values
2: In log(1 - default$g0) : NaNs wurden erzeugt
3: In secr.fit(Soonwald_ROW, model = g0 ~ h2, buffer = 4000, trace = FALSE, :
at least one variance calculation failed
I don't know how to deal with this problem or if it is a problem of my input data (even if it said "no errors found" in read.capthist). Below, you also find the detailed output of model g0 ~ h2.
I would be very happy about any help or advice!
Thanks in advance,
Cornelia
Beta parameters (coefficients)
beta SE.beta lcl ucl
D -3.0559400 0.04458198 -3.143319 -2.968561
g0 -0.1712308 1.45407916 -3.021174 2.678712
g0.h22 0.6826030 1.45246795 -2.164182 3.529388
sigma 6.0112541 0.02819196 5.955999 6.066509
pmix.h22 5.7484330 NaN NaN NaN
Variance-covariance matrix of beta parameters
D g0 g0.h22 sigma pmix.h22
D 1.987553e-03 -1.927760e-03 1.257344e-03 -9.825988e-05 5.999664e-03
g0 -1.927760e-03 2.114346e+00 -2.111312e+00 6.008587e-05 -2.495463e+00
g0.h22 1.257344e-03 -2.111312e+00 2.109663e+00 2.674135e-07 2.503180e+00
sigma -9.825988e-05 6.008587e-05 2.674135e-07 7.947868e-04 -7.035829e-05
pmix.h22 5.999664e-03 -2.495463e+00 2.503180e+00 -7.035829e-05 -5.741327e+00
Fitted (real) parameters evaluated at base levels of covariates
session = Soon_alle, h2 = 1
link estimate SE.estimate lcl ucl
D log 4.707844e-02 0.002099894 0.04313938 0.05137719
g0 log 8.426271e-01 2.274182970 0.04874398 14.56632033
sigma log 4.079947e+02 11.504456524 386.06233798 431.17296529
pmix logit 3.177642e-03 NaN NaN NaN
session = Soon_alle, h2 = 2
link estimate SE.estimate lcl ucl
D log 0.04707844 0.002099894 0.04313938 0.05137719
g0 log 1.66757803 0.062094328 1.55024951 1.79378640
sigma log 407.99466057 11.504456524 386.06233798 431.17296529
pmix logit 0.99682236 NaN NaN NaN