Hi all,
I am trying to fit a model with repeated counts. I have used unmarked before and have successfully fitted functions in the library in the past but have no clue what is wrong here.
I keep getting the error when I run the code below. any ideas at what is causing this?
"Error in pcount(~1, ~1, occu_umf) :
Data is not an unmarkedFramePCount object."
# observation data
R <- 16 # number of sites
J <- 11 # number of visits
y <- matrix(c(
1,1,1,0,0,3,1,0,1,0,NA,
1,1,2,1,0,1,2,1,1,4,NA,
1,0,0,0,2,0,1,1,0,NA,NA,
1,0,0,2,1,0,2,1,1,NA,NA,
1,1,1,3,1,2,3,2,0,0,NA,
0,0,1,0,0,1,0,1,1,1,NA,
0,1,0,2,0,1,0,1,0,NA,NA,
1,0,0,0,1,1,1,0,1,0,NA,
0,2,0,0,0,0,0,0,0,0,1,
1,1,0,2,1,1,0,1,1,2,NA,
0,0,0,0,0,0,0,1,1,NA,NA,
0,0,0,0,0,0,0,0,0,0,0,
3,0,1,1,1,0,0,1,0,0,1,
0,0,1,2,0,1,1,0,0,0,NA,
0,0,1,2,0,1,0,0,0,0,NA,
1,0,0,0,0,0,0,0,0,0,0)
, nrow=R, ncol=J, byrow=TRUE)
occu_umf<-unmarkedFramePCount(y = y)
test<-pcount(~1,~1,occu_umf)