Hello, I am trying to run a multi-state, multi-season model, on a mac, using RPresence 2.15.18 in R version 4.3.1 (not the latest version or R, but that which the package was developed in).
I'm running into an error with 'do.ms.2' models, with my own data, and the working example (see below).
occMod() returns:
Error in rep(data$unitnames, l) : invalid 'times' argument
I've tried various versions of the package and R with no luck(in RStudio: Version 2025.05.0).
Any help here would be great!
#example code returning error:
cat('# --- MULTI-SEASON MULTI-STATE EXAMPLE (3 OCCUPANCY STATES, PSI-R PARAMETEIZATION) ----\n')
hstfrq=genpresEVms(N=100,K=4,psi=.75,R=.8, Cpsi=c(.66,.1,.15),CR=c(.72,.77,0),
p1=.4,p2=.3,dlta=.6,nstates=3,SPS=2)
pao=createPao(data=hstfrq$hst,
frq=hstfrq$frq,title="exp. value data",
nsurveyseason=c(2,2))
m1=occMod(list(psi~1,Cpsi~STATE,R~1,CR~STATE,p~STATE,delta~1), data=pao,type='do.ms.2', outfile='./data/occModOutputs/modname')