I'm super new to RMark. I have a CJS model with p(.) and phi that depends on age at release (decimal years), weight at release, and their interaction. I want to predict the survival at a range of weights at 2-3 ages (that differ from the ages used for the model). The manuals seem to provide examples with a single continuous variable, where PIMS are used for intercept/categorical variable states.
My release ages are 0.83 and 1.08, but say I want to calculate survival at age 0.5, 0.7, and 1, across weights 10:300. How do I get that using covariate.predictions?
Thank you in advance for your patience....
try <- structure(list(ch = c("10000000000", "00001100000", "00010010010",
"00010000010", "00010100000", "01000000101", "10000000000", "00000101100",
"10000000000", "10000000000", "10000000000", "00001100000", "10000000000",
"10000000000", "10000000000", "10000000000", "10000000000", "00010100000",
"10000000000", "10000000000", "10000000000", "10000000000", "10000000000",
"10000000000", "00010100000", "10000000000", "10000000000", "10000000000",
"00010000010", "10000000000", "00010000010", "10000000000", "10000000000",
"00000011010", "10000000000", "10000000000", "10000000000", "00010000010",
"00010100000", "10000000000", "00000101100", "10000000000", "00010011010",
"10000000000", "10000000000", "00001100000", "00101000100", "00001100000",
"00010000010", "00001100000"), Release.Weight = c(123.1, 49.2,
37.1, 36.9, 121, 57.1, 95.7, 113.4, 96, 91.1, 34.3, 74.8, 36.7,
97.4, 48.9, 122.9, 69, 67.2, 137, 52.2, 43.5, 111, 120.4, 137.9,
63.3, 70.7, 133.5, 32.4, 86.2, 113, 19.7, 163.6, 50.4, 47.9,
32.8, 38.8, 35.8, 84, 86.6, 57.1, 45.8, 103.9, 41.2, 96.5, 53.7,
64, 43, 78, 55, 34), Release.Age = c(1.08, 0.83, 0.83, 0.83,
1.08, 0.83, 1.08, 1.08, 1.08, 0.83, 0.83, 0.83, 0.83, 1.08, 0.83,
1.08, 0.83, 0.83, 1.08, 0.83, 0.83, 1.08, 1.08, 1.08, 0.83, 1.08,
1.08, 0.83, 0.83, 1.08, 0.83, 1.08, 0.83, 0.83, 0.83, 0.83, 0.83,
0.83, 0.83, 0.83, 0.83, 1.08, 0.83, 1.08, 0.83, 0.83, 0.83, 0.83,
0.83, 0.83)), .Names = c("ch", "Release.Weight", "Release.Age"
), row.names = c(64L, 81L, 82L, 102L, 122L, 160L, 179L, 194L,
195L, 205L, 211L, 222L, 229L, 251L, 279L, 283L, 320L, 355L, 371L,
410L, 427L, 542L, 548L, 645L, 649L, 686L, 727L, 760L, 782L, 799L,
809L, 828L, 831L, 859L, 882L, 918L, 950L, 954L, 973L, 988L, 1030L,
1102L, 1105L, 1176L, 1187L, 1225L, 1242L, 1417L, 1419L, 1740L
), class = "data.frame")
try.proc <- process.data(try, model="CJS", begin.time=1990)
try.ddl <- make.design.data(try.proc)
try.analysis=function(){
Phi.weight.x.age.release=list(formula = ~Release.Weight*Release.Age)
p.1=list(formula=~1)
cml=create.model.list("CJS")
mark.wrapper(cml,data=try.proc,ddl=try.ddl,output=FALSE)
}
try.results <- try.analysis()