Error parameter name 'd' in RDMSOpenMCSeas

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Error parameter name 'd' in RDMSOpenMCSeas

Postby monicaarso » Mon Jun 26, 2023 11:02 am

Hi,
I am rerunning some analysis with added years, with the model RDMSOpenMCSeas. I have not changed anything compared to last time (probably back in 2021?), but I do get a new error which one of my colleagues also gets (and she ran the same models last year). A bit of background and the error below, any help would be appreciated:

Data are 6 years of reproductive histories of seals, GOF test on CJS model all looking good. The model is open RD multi state with state uncertainty and seasonal effects. Under this model the following parameters are estimated: S, Psi, pim, Omega, p, Delta, pent, d, alpha and c.

Code: Select all
time.interval.w=c(rep(0,5),1,rep(0,5),1,rep(0,5),1,rep(0,5),2,rep(0,5),1,rep(0,5))

#process data (N =  non-breeder to be estimated; B =  breeder)
fec.proc<-process.data(markdata_week,model="RDMSOpenMCSeas",begin.time = 2016,time.intervals = time.interval.w,strata.labels = c("B","N"))

#create design data
fec.ddl=make.design.data(fec.proc)


#fix deltaN; i.e. cannot estimate delta for N as not visible
fec.ddl$Delta$fix=NA
fec.ddl$Delta$fix[fec.ddl$Delta$N=="1"]=0

#define parameters
S.dot=list(formula=~1) #constant over time and state
Psi.stratum=list(formula=~stratum:tostratum) # constant over time, stratum dependant.
pi.dot=list(formula=~1) #constant
Omega.dot=list(formula=~1) # constant
...
d.state.time=list(formula=~stratum + secondary.time)

#model
pv01=make.mark.model(fec.proc, fec.ddl, parameters=list(S=S.dot, Psi=Psi.stratum, pi=pi.dot, Omega=Omega.dot, p=p.dot, Delta=Delta.dot, pent=pent.state.time, d=d.state.time, alpha=alpha.time, c=c.time), mlogit0=TRUE)

pv01=run.mark.model(pv01)


When I run the model I get the following error:

ERROR – The parameter name ‘d’ is not correct and thus known.

Any thoughts?
Many thanks!
Monica
monicaarso
 
Posts: 33
Joined: Wed Feb 22, 2012 2:58 pm

Re: Error parameter name 'd' in RDMSOpenMCSeas

Postby gwhite » Mon Jun 26, 2023 1:57 pm

The current set of parameters for RDMSOpenMCSeas (data type 142) is: "S","Psi","pi","Omega","p","Delta","pent","Phi","alpha","c";

with d changed to Phi to be consistent with other similar models. That is, instead of d=probability of departure, Phi=probability of remaining. So Phi = 1 - d.

However, I caution about use of this data type. Bill Kendall has never revised the write-up, and I've not been able to figure out why there is a slight difference in parameter estimates for test cases against RDMSOpenMisClass (data type 126) and RDMSOpenMCSeas2 (data type 184). 184 is a more general model than 142, so by fixing parameters, you should get identical results from 184 or 142 data.

Gary
gwhite
 
Posts: 340
Joined: Fri May 16, 2003 9:05 am

Re: Error parameter name 'd' in RDMSOpenMCSeas

Postby monicaarso » Tue Jun 27, 2023 4:54 am

Hi Gary,
Thanks for clarifying, it now works. Jeff also emailed separatedly and told me how to modify the parameters.txt file within R package so that the change would work. Here are his instructions in case someone else bumps into this:

Edit parameters.txt file in RMark directory under your R packages. Find the model and d parameter and change to Phi. Also need to change your code specifying d to Phi.


Just make sure your RMark package is actually installed under the R directory > library rather than on a temp location.

I had not seen the option of the data type RDMSOpenMCSeas2 but will keep that in mind (I actually cannot manage to see the list of data types with associated numbers within MARK > Help > Data types as I get an error message of "Cannot find the C:\Program Files (x86)\MARK\mrk5753z.tmp file")

Many thanks again, the model now runs!
Cheers,
Monica
monicaarso
 
Posts: 33
Joined: Wed Feb 22, 2012 2:58 pm

Re: Error parameter name 'd' in RDMSOpenMCSeas

Postby monicaarso » Thu Jul 06, 2023 4:51 am

Hi,
The models are now running (with the change of parameter from "d" to "Phi") but I had not realised on my very quick test that the output is not complete. A couple of errors occur:

In all models the derived parameters (Residency Time, Attribute duration) are not computed with the following error:
Warning message:
In extract.mark.output(out, model, adjust, realvcv, vcvfile) :
Not all parameters were estimated but not able to find non-estimable parameters


In some models the same occurs but with this added error message:
Warning: output from MARK was not complete

Note: only 25 parameters counted of 35 specified parameters

AICc and parameter count have been adjusted upward
Error in `.rowNamesDF<-`(x, value = value) : invalid 'row.names' length
In addition: Warning message:
In extract.mark.output(out, model, adjust, realvcv, vcvfile) :
Not all parameters were estimated but not able to find non-estimable parameters

Problem extracting output. Look at MARK output file to see what is wrong.


I've not provided any code but happy to put some.
Any thoughts? I've not really changed anything else a part from adding 2 more years of data and having unequal intervals (there is now 1 year with no data - primary occasion)

Many thanks,
Monica
monicaarso
 
Posts: 33
Joined: Wed Feb 22, 2012 2:58 pm

Re: Error parameter name 'd' in RDMSOpenMCSeas

Postby jlaake » Thu Jul 06, 2023 8:54 am

Did you look at the MARK output file like it suggests? If model run from MARK does not complete successfully then RMark won't be able to extract the results properly.
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Error parameter name 'd' in RDMSOpenMCSeas

Postby monicaarso » Thu Jul 06, 2023 9:37 am

Hi Jeff,
I did. Actually an output is generated (text file e.g. mark001.out) which looks like a truncated version of a proper output, i.e. it stops when the derived parameter section at the very end would start.

EDIT: all outputs are cut after the last alpha parameter estimated, some outputs have not other warning messages included, but some have either a * * WARNING * * Numerical underflow occurred during optimization of this model. or * * WARNING * * Number of parameters estimated from gap method (=32) and threshold method (=21) differ. Inspect full output.

Monica
monicaarso
 
Posts: 33
Joined: Wed Feb 22, 2012 2:58 pm


Return to RMark

Who is online

Users browsing this forum: No registered users and 0 guests

cron