Greetings all,
I am fairly new to RMark (have been using MARK) and can't seem to be able to add a design covariate (ie water flow (CFS) for each time of capture). I have 16 capture occasions - thus 15 values for time.interval. I keep getting the error listed below. Does anyone have any ideas? I have read the Appendix C.6.(pg C-31) and the help file for merge.occasion.data numerous times but to no avail - I can run the dipper example, and have set up my code similarly. Am I missing something? I have tried running it by dropping the first values leaving 15 values for flow and the time (in the data.frame), and I get the same error. Any help would be appreciated.
> flow<-c(5.83, 1.96, 1.64, 0.15, 17.5, 16.1, 13.6, 11.5, 21.2, 15.3, 3.54, 3.68, 3.65, 5.38, 5.71, 5.91) #=CFS per sampling occasion, 16 values
> ltime<-c(29,2,26,49,1,7,1,13,1,42,1,1,25,1,1) #lengths of time between capture occasions, 15 values
> t<-c(0,29,2,26,49,1,7,1,13,1,42,1,1,25,1,1) # time component for flow covariate 16 values
> sp<- convert.inp("nov.inp", group.df=data.frame(sex=c("female","male")), covariates=c("length"), use.comments=TRUE)
> m<- process.data(sp,model="CJS", begin.time=127, time.intervals=c(ltime),groups="sex") #begin.time=day of yer
> sp.ddl=make.design.data(m)
> df=data.frame(time=c(t),cfs=c(flow))
> sp.ddl=merge.occasion.data(m, sp.ddl,"Phi",df)
Error in merge.occasion.data(m, sp.ddl, "Phi", df) :
df does not contain a time value for each time in design data
> list (df)
[[1]]
time cfs
1 0 5.83
2 29 1.96
3 2 1.64
4 26 0.15
5 49 17.50
6 1 16.10
7 7 13.60
8 1 11.50
9 13 21.20
10 1 15.30
11 42 3.54
12 1 3.68
13 1 3.65
14 25 5.38
15 1 5.71
16 1 5.91