Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with predict Function for tMsPGOcc Models #50

Open
Xuletajr opened this issue Feb 19, 2025 · 1 comment
Open

Issue with predict Function for tMsPGOcc Models #50

Xuletajr opened this issue Feb 19, 2025 · 1 comment

Comments

@Xuletajr
Copy link

Hi Jeff,

I hope this message finds you well. I am writing to check if the predict function is fully operational for models generated by the Multi-Species Multi-Season Occupancy Models (tMsPGOcc).

I followed the documentation and tutorial for multi-season (spatio-temporal) occupancy models ("spaceTimeModels") to prepare the data for prediction. However, when attempting to use the predict function, I encountered the following error:

Error in eta.samples[, i, t.indx[j]] : subscript out of bounds

I am unsure whether this issue arises from something I might be doing incorrectly or if the functionality for tMsPGOcc models is still under development. Could you please provide some guidance on this matter?

Thank you very much for your attention and for all the support you have provided whenever I needed it. I truly appreciate your work on the spOccupancy package.

I look forward to hearing from you.

Best wishes,
José

@doserjef
Copy link
Collaborator

Hi José,

Apologies for the delay. The predict functionality should work properly for tMsPGOcc. However, I will point out that it is not possible to predict at a future point in time, so in that sense, prediction is only for time periods that were observed in the model. I'd like to add that functionality at some point in the future, but not sure when I'll get to it. With that in mind, the error you have indicates there's something wrong when trying to extract the AR 1 temporal random effect values. This is likely related to something the function is not expecting with the t.cols argument of the model. This could be related to trying to predict at new years, or just specifying t.cols in the wrong place. There is definitely a chance there is a bug though as well. If you're not trying to predict at new time points and can't figure it out, then feel free to send me your code/data or some other reproducible example of the error and I'll dig into it.

Thanks,

Jeff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants