building a time-varying model

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

building a time-varying model

Postby megpetrie » Fri Feb 18, 2011 5:33 pm

Hello,
I'm hoping to get some help with building a model in RMark that specifies different parameters for the first recapture occassions (t2) for different groups, then keeps t3, t4, and t5 the same for each group. In MARK the PIMS would look like this:

Group 1 (p)
5 6 7 8
6 7 8
7 8
8

Group 2 (p)
9 6 7 8
6 7 8
7 8
8

Group 3 (p)
10 6 7 8
6 7 8
7 8
8

Could someone steer me in the direction of some documentation on how to specify this situation in RMark?

Thanks,
Megan
megpetrie
 
Posts: 23
Joined: Tue Feb 06, 2007 4:48 pm

Re: building a time-varying model

Postby aswea » Fri Feb 18, 2011 6:59 pm

Hi Megan,

You can alter the design data list to create a parameter that combines the time intervals plus a second parameter that specifies the intervals you don’t want combined.

Megan.ddl$Phi$Newpar=0
Megan.ddl$Phi$Newpar[Megan.ddl$Phi$time=="6"| Megan.ddl$Phi$time=="7"| Megan.ddl$Phi$time=="8"]=1
Megan.ddl$Other=0
Megan.ddl$Other[Megan.ddl$Phi$Newpar=="0"]=1

Then include these in your model
Phi.Megan=list(formula=~time:group:Other+time:Newpar)

I got this from the RMark appendix somewhere-- probably under More Complex Examples.

I hope this helps,

~Aswea
aswea
 
Posts: 27
Joined: Sat Oct 17, 2009 3:32 pm
Location: Gander NL

Re: building a time-varying model

Postby jlaake » Sun Feb 20, 2011 9:29 pm

Somethng like Aswea's solution would work except that it used Phi instead of p and mistakenly used pim numbers 6,7,8 for times 3,4,5. But a possibly simpler solution is to specify a variable in the design data for p that is 0 except for group 2 and time 2 where it is 1 and then do the same thing for group 3 and time 2. I'll call these g2 and g3. Then your formula would be

~time+g2+g3

g2 is the amount added to p for time 2 group 1 to get the value for group 2 and g3 is the same for group 3.

If this doesn't make sense let me know.

--jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to RMark

Who is online

Users browsing this forum: No registered users and 2 guests