I am running a robust design analysis in Rmark with 54 capture histories (12 primary occasions and secondary occasions varying from 2 to 7). The samples were collected every three months, except for two occasions, one with a six month interval and the other one with 12 month interval.
I want to test a set of occasion covariates but I am having problems to input the covariates into the design matrix. I am including 12 primary occasions covariates (effort) and I am getting a design matrix with effort for each secondary sampling occasion.
Can anyone help me to see what I am missing?
- Code: Select all
#convert inp file
rd.data=convert.inp("C:/R/RD/Qi 2-3 (5th fortnight-all days)_without calves and sightings(identified dolphins).inp",use.comments=T)
#Process data specifying primary and secondary capture occasions
time.intervals=c(0,0,0,0,0,3,0,0,3,0,3,0,0,0,3,0,0,0,0,0,3,0,0,0,0,3,0,0,0,0,3,0,0,0,12,0,0,0,0,0,0,3,0,0,3,0,0,3,0,0,0,0,0)
rd.process=process.data(rd.data,begin.time=1,model="Robust",time.intervals=time.intervals)
#Create the design data
rd.ddl=make.design.data(rd.process)
df=data.frame(time=c(1:12),effort=c(2,4,5,4,5,6,17,28,89,120,91,22))
summary(rd.ddl$p)
rd.ddl$p=merge_design.covariates(rd.ddl$p,df)
summary(rd.ddl$p)
> rd.ddl$p
time par.index model.index group session Time c effort
1 1 1 188 1 1 0 0 2
2 2 2 189 1 1 1 0 4
3 3 3 190 1 1 2 0 5
4 4 4 191 1 1 3 0 4
5 5 5 192 1 1 4 0 5
6 6 6 193 1 1 5 0 6
7 1 7 194 1 4 0 0 2
8 2 8 195 1 4 1 0 4
9 3 9 196 1 4 2 0 5
10 1 10 197 1 7 0 0 2
11 2 11 198 1 7 1 0 4
12 1 12 199 1 10 0 0 2
13 2 13 200 1 10 1 0 4
14 3 14 201 1 10 2 0 5
15 4 15 202 1 10 3 0 4
16 1 16 203 1 13 0 0 2
17 2 17 204 1 13 1 0 4
18 3 18 205 1 13 2 0 5
19 4 19 206 1 13 3 0 4
20 5 20 207 1 13 4 0 5
21 6 21 208 1 13 5 0 6
22 1 22 209 1 16 0 0 2
23 2 23 210 1 16 1 0 4
24 3 24 211 1 16 2 0 5
25 4 25 212 1 16 3 0 4
26 5 26 213 1 16 4 0 5
27 1 27 214 1 19 0 0 2
28 2 28 215 1 19 1 0 4
29 3 29 216 1 19 2 0 5
30 4 30 217 1 19 3 0 4
31 5 31 218 1 19 4 0 5
32 1 32 219 1 22 0 0 2
33 2 33 220 1 22 1 0 4
34 3 34 221 1 22 2 0 5
35 4 35 222 1 22 3 0 4
36 1 36 223 1 34 0 0 2
37 2 37 224 1 34 1 0 4
38 3 38 225 1 34 2 0 5
39 4 39 226 1 34 3 0 4
40 5 40 227 1 34 4 0 5
41 6 41 228 1 34 5 0 6
42 7 42 229 1 34 6 0 17
43 1 43 230 1 37 0 0 2
44 2 44 231 1 37 1 0 4
45 3 45 232 1 37 2 0 5
46 1 46 233 1 40 0 0 2
47 2 47 234 1 40 1 0 4
48 3 48 235 1 40 2 0 5
49 1 49 236 1 43 0 0 2
50 2 50 237 1 43 1 0 4
51 3 51 238 1 43 2 0 5
52 4 52 239 1 43 3 0 4
53 5 53 240 1 43 4 0 5
54 6 54 241 1 43 5 0 6