http://www.phidot.org/forum/viewtopic.php?f=21&t=2864&p=9117&hilit=covariate.predictions+include+time#p9117
I have a time varying individual covariate for body size (which has been assumed for the capture occasions when animals were not observed, given what we know about growth rates), and i would like to use covariate.predictions to estimate a survival rate for each of 4 possible body sizes at each sampling occasion.
My model says S~size+time, and I have tried writing covariate.predictions like this:
- Code: Select all
predS1 <- covariate.predictions(modT1,data=data.frame(index=rep(c(1),148),
t1.1=c(t.values),siz1.1=rep(c(size.values),each=37)))
where t.values is a list of my sampling occasions (I have irregular length intervals, hence why the occasion names have gaps int he sequence) which looks like this:
- Code: Select all
t1.1
1 1.1
2 2.1
3 7.1
4 8.1
5 9.1
6 10.1
7 11.1
8 12.1
9 13.1
10 14.1
11 15.1
12 20.1
13 21.1
14 22.1
15 23.1
16 24.1
17 26.1
18 34.1
19 35.1
20 36.1
21 37.1
22 38.1
23 39.1
24 40.1
25 47.1
26 48.1
27 49.1
28 50.1
29 51.1
30 52.1
31 53.1
32 61.1
33 63.1
34 66.1
35 74.1
36 76.1
37 79.1
and size.values looks like this:
- Code: Select all
[1] 2 3 4 5
The function will produce predictions, but within a particular size class, all predictions are the same regardless of time.
I have also tried creating a covariate to index time, where each sampling occasion was given a number from 1 to 37 and then standardized, and S~size+timeindex. This method does produce a unique prediction for each size class at each occasion, but when i graph these values, they are clearly highly correlated with one another, so if body size 2 has S=0.5 at time 1, then body size 3 has S=0.6, and body size 4 has S=0.7, and so on, they are not varying independently of one another.
So i'm wondering if there is a way to use time, as the "Robust" model defines it in RMark, in covariate.predictions to remedy this problem.
Thanks!