Page 1 of 1

Analyze subset of encounter history

PostPosted: Fri Jul 11, 2025 7:10 pm
by jCeradini
Hey all,

Wondering if I can tell RMark to only analyze a subset of an encounter history (occupancy model) and, if that is possible, will RMark also be able to keep track of the time-varying covariates that are named based on the full EH?

Full EH is 11 occasions and there are several time-varying covariates.
For various reasons, would like to also run an analysis that is only occasions 4-8.
Can I tell RMark (via begin.time in process.data?) that I only want to use occasions 4-8? Will those occasions stay paired with their respective time-varying covariates that are labeled with 4-8 suffixes?

Or, I just need to make a new dataframe that is only those occasions and then relabel the time-varying covariates appropriately (starting at 1)?

Analysis note: I have analyzed all the occasions and included interactions to test for differing effects that I'm interested in for these "middle occasions"...but still would like to do this subset analysis.

Thanks!

Re: Analyze subset of encounter history

PostPosted: Fri Jul 11, 2025 9:24 pm
by jlaake
No facility to do that in RMark. Create a copy of your data frame. Use substr function on ch field to select the set you want. Delete the individual covariates you aren't going to use and rename the ones you want to keep and away you go. Likely less than 10 lines of R code.

Re: Analyze subset of encounter history

PostPosted: Sat Jul 12, 2025 6:30 pm
by jCeradini
Thanks Jeff. Sounds like a plan.