unitnames error in 'do.ms.2' model

posts related to the RPresence library, which may not be of general interest to users of 'classic' PRESENCE.

unitnames error in 'do.ms.2' model

Postby mbarton » Thu Jun 26, 2025 11:25 am

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')
mbarton
 
Posts: 1
Joined: Thu Jun 26, 2025 10:59 am

Re: unitnames error in 'do.ms.2' model

Postby jhines » Mon Jun 30, 2025 3:13 pm

Please download the latest version of RPresence (2.15.19) and try again. The earlier version had a bug in the do.ms.2 model.
jhines
 
Posts: 632
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA


Return to RPresence

Who is online

Users browsing this forum: No registered users and 1 guest

cron