Hi,
I am using robust design models for single species multi season occupancy models. So I have 4 primary occasions and secondary occasions 81,92,91,64.
I am trying to use merge_design.covariates to add a secondary occasion specific covariate to psi for two of my models using the RDOPG model. I am trying to follow this example viewtopic.php?f=21&t=1736 but I still haven't gotten it to work.
First, I created a ddl
Coyote.RDOPG<-process.data(coyote,model = "RDOccupPG", begin.time=1,
time.intervals = c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0))
coyote.ddl2 = make.design.data(coyote.RDOPG)
coyote.ddl2$Gamma$eps = 1
Then I made a separate .inp file for the human presence covariate and tried to merge it to psi by adding a time_new column like this:
coyote.ddl2$Psi$time_new<-data.frame(coyote.ddl2$Psi$time,rbind(1:81,1:92,1:91,1:64))
but got this message
Warning message:
In rbind(1:81, 1:92, 1:91, 1:64) :
number of columns of result is not a multiple of vector length (arg 1)
and when I check I can see it only counts up to 92 for some reason for each of the 4 rows.
The human presence .inp file has 46 rows for "ch" for each of my 46 sites and a "freq" of 1. A sample is below.
10000000000000000000000000000000000000000000100000000000000000000000000000000000000000000010000000000000000000000000010000000000000000000000000000000000000.............................................................................................................................................................................
1;
I read it in like this
human_presence<-convert.inp("C:/R_work/human_presence.inp",covariates=NULL,use.comments=FALSE)
and I was hoping to merge it to psi like this
coyote.ddl2$psi<- merge_design.covariates(coyote.ddl2$psi,human_presence,bygroup=FALSE,bytime=TRUE)
but I am not sure how to get this to merge correctly because I can't get the time column to work.
I would appreciate any help. Thanks!