Error data cloning with profile interval

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

Error data cloning with profile interval

Postby violetblue » Wed Sep 07, 2022 3:41 am

Hi,

I wonder if anyone can explain this error message I am getting when attempting to data clone a model exported with RMark. Sorry if I've posted in the wrong subforum, I'm not sure if this is an RMark or MARK issue.

I will reproduce the problem with the dipper dataset;

1. First I run the fully time-dependent dipper data in RMark with
profile interval requested for real parameter 20.
Code: Select all
data(dipper)

dipper.processed=process.data(dipper,groups=("sex"))
dipper.ddl=make.design.data(dipper.processed)

Phisex.time=list(formula=~sex*time)
psex.time=list(formula=~sex*time)

dipper.phisex.time.psex.time   =mark(dipper.processed,dipper.ddl,
                                   model.parameters=list(Phi=Phisex.time,p=psex.time))


2. Export it for MARK.
[/code] export.MARK(dipper.processed,"dipper2",dipper.phisex.time.psex.time,profile.int=c(20))[/code]

2. Open MARK
File > RMARK import and open dipper2.Rinp

3. Choose to Data Clone x100 and then I get the error message
Error--expecting a group statement, but found: Profile intervals chat=1 20
but still MARK continues to run the data clone and produces the expected excel spreadsheet.

Is the data cloned profile likelihood for real parameter 20 reliable, or should I disregard the result?
What does the error message mean and how can I fix it? Do I need to adjust chat before cloning?

I'd be grateful for any thoughts please.
violetblue
 
Posts: 23
Joined: Tue Nov 06, 2018 11:16 pm

Re: Error data cloning with profile interval

Postby jhines » Wed Sep 07, 2022 10:22 am

When requesting a profile conf. interval, Mark appends "Profile c-hat=1.0000" to the output of that parameter. It appears that the error message about expecting a group statement is due to this extra output. In general, I don't think it matters, but Gary will have to confirm to be sure.

According to the Mark help file (under "profile likelihood confidence intervals"), you can check the profile conf. intervals by running the same model with the parameter fixed to the lower (or upper) 95% limit. The resulting deviance should be 3.84 units larger than the deviance of the original model.

The mark help file also indicates that there could be problems with parameters near a boundary, or if some parameters are not identifiable. In the dipper data, the model you specified does have parameters which are not identifiable (last phi and last p for each group are confounded).

If you want the profile conf. interval with a c-hat>1, then you'll need to set c-hat in Mark, then re-run the model (in mark), asking for the profile conf. interval, then do the data-cloning.

fyi: The "profile.int=c(20)" argument should be in the mark function, not the export.MARK function.
jhines
 
Posts: 632
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: Error data cloning with profile interval

Postby jlaake » Wed Sep 07, 2022 12:21 pm

This is what I got when I ran your code

export.MARK(dipper.processed,"dipper2",dipper.phisex.time.psex.time,profile.int=c(20))
Error in export.MARK(dipper.processed, "dipper2", dipper.phisex.time.psex.time, :
unused argument (profile.int = c(20))


As it should, since as Jim pointed out profile.int is not an argument to export.MARK. So not sure where your problem lies. Data cloning is in MARK and not an RMark problem.

--jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Error data cloning with profile interval

Postby violetblue » Thu Sep 08, 2022 2:51 am

Apologies, the profile.int wasn't meant to be in export.MARK, that was a typo when I was posting the question.

I actually ran
Code: Select all
dipper.phisex.time.psex.time   = mark(dipper.processed,dipper.ddl,
                                   model.parameters=list(Phi=Phisex.time,p=psex.time),profile.int=c(20))

export.MARK(dipper.processed,"dipper2",dipper.phisex.time.psex.time,replace=T)


Thank you for suggesting checking the profile CI by fixing to a 95% limit and checking the deviance. I had missed that and it sounds very useful.
violetblue
 
Posts: 23
Joined: Tue Nov 06, 2018 11:16 pm


Return to RMark

Who is online

Users browsing this forum: No registered users and 2 guests