Page 1 of 1

Density covariates par.secr.fit

PostPosted: Thu Oct 07, 2021 4:51 pm
by demarsea
Hi Murray,

I've been troubleshooting density covariates analysis for some time and can't seem to get the code to run properly.

I'm doing mark-resight of butterflies, and looking at 3 covariates Canopy, Elevation, and Ceanothus (host plant density), and interactions between canopy+ceanothus and elevation+ceanothus. Trap type is "count".

Code: Select all
base.args <- list(capthist = Ald2019aCH, mask = clippedmask, trace = FALSE, verify=FALSE, method='Nelder-Mead')
 args.0 <- c(base.args, model = D ~ 1)
 args.Dcan <- c(base.args, model = D ~ 'Canopy2')
 args.Delv <- c(base.args, model = D ~ 'Elvpcl_buff3')
 args.Dnjt <- c(base.args, model = D ~ 'Ceanothus2_num')
 args.Dnjtelv <- c(base.args, model = D ~ 'Ceanothus2_num' + 'Elvpcl_buff3')
 args.Dnjtcan <- c(base.args, model = D ~ 'Ceanothus2_num' + 'Canopy2')
arglist <- list(null = args.0, Dcan = args.Dcan, Delv = args.Delv, Dnjt = args.Dnjt, Dnjtelv = args.Dnjtelv, Dnjtcan = args.Dnjtcan)
fits <- par.secr.fit(arglist)


First I attempted without method=Nelder-Mead and then with it. Both had the same outcome:

Error in getmaskpar(!CL, D, data$m, sessnum, details$unmash, attr(data$capthist, :
bad densities in 'secrloglikfn' (try different optimisation method, link, or model?


I'm unclear how to troubleshoot ie "try different optimisation method, link, or model" exactly. Pretty new to R!

Thank you for any assistance.
Angela

Re: Density covariates par.secr.fit

PostPosted: Thu Oct 21, 2021 5:37 pm
by murray.efford
I have no idea either. Maybe some bad covariates in there? If you still want to pursue this, send me the data offline.
Murray