Analyze subset of encounter history

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Analyze subset of encounter history

Postby jCeradini » Fri Jul 11, 2025 7:10 pm

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!
jCeradini
 
Posts: 74
Joined: Mon Oct 13, 2014 3:53 pm

Re: Analyze subset of encounter history

Postby jlaake » Fri Jul 11, 2025 9:24 pm

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.
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Analyze subset of encounter history

Postby jCeradini » Sat Jul 12, 2025 6:30 pm

Thanks Jeff. Sounds like a plan.
jCeradini
 
Posts: 74
Joined: Mon Oct 13, 2014 3:53 pm


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest

cron