Closed Xuletajr closed 1 year ago
Hi José,
Thanks for reaching out. Here are a few ideas as to what could be going on:
det.covs
object of the data
argument as site x visit matrices. Also, do you have a lot of missing values in the data (i.e., different numbers of visits at each site?) msPGOcc()
checks for misalignment between the NA values in det.covs
and the detection-nondetection data, but it could have missed something. occ.formula
and det.formula
arguments? Sometimes if there are large numbers in the covariate values this can lead to problems with the model fitting. If none of those thoughts help figure out what's going on, feel free to send me your code and data and I can try to reproduce the error to see what's going on.
Jeff
Hi Jeff,
thank you very much for fast reply.
det.covs
and the detection-nondetection data, and they look identical (e.g. identical(which(is.na(y[1,,])), which(is.na(sampling_day))) is resulting TRUE).occ.formula
and det.formula
arguments.I'll check if I can share the data with you. I asked for permission to do so.
José
We determined this was a problem related to the repeated surveys at each site. All spOccupancy functions assumed the data were formatted such that the dimension of the detection-nondetection data corresponding to repeat visits was equal to the maximum number of repeat surveys at any given site. This leads to problems when the repeat visits are supplied as was done in this case, with the 89 visits corresponding to different sampling days and each site only surveyed at a subset of those sampling days. This is now fixed in the GitHub development version of the package, where I have updated all single-species and multi-species functions to work in this case. I'm leaving the issue open for now until I get the updated version on CRAN (likely in a month or so). Thanks again to José for raising this issue.
Updated on CRAN in v0.5.0
Hi Jeff,
I am running a multi-species occupancy models using "msPGOcc" function. The msPGOcc is working well for model with a null model (intercept only) and with site-level covariates. However, when I add observational-level covariates (e.g., Julian day) for detection portion of the model the R session is aborted.
Do you any idea what could have caused this issue?
Thank you very much for your attention.