MSLiveDead inconsistencies

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

MSLiveDead inconsistencies

Postby awan » Mon Jun 19, 2017 9:44 am

Hi all,

I have previously constructed MultiState models in RMark, and now I am attempting to fit MSLiveDead. I have 18 sampling occasions, thus 17 time intervals and 36 characters in the input (LD format). Begin time is 2008 and intervals are 0.5.

I don't know why but the MSLiveDead would not accept the 17 time intervals I define (whereas MultiState does) when running process.data. I had to include an 18th time interval. Upon further inspection of the data, the first "time" data point in the design data for Psi is 2008.5 (same as p, but the first "time" should actually be 2008 as per the S and r parameters). As a consequence, end.time is 2017 but it should be 2016.5. Is there a reason that the design of Psi behaves differently between the MSLiveDead and MultiState models? I have not read anything to suggest that this would be the case.

As a consequence, all the transitions between summer and winter are now reversed, and I wonder if this design inconsistency has a knock-on effect to other parameters estimated in the model?

Thanks in advance for your help

Andy
awan
 
Posts: 16
Joined: Fri Feb 10, 2017 10:52 am

Re: MSLiveDead inconsistencies

Postby awan » Thu Jun 22, 2017 5:55 am

Hi again,

So I read the post about "how do I run this model", and thus learnt about the parameters and models text files in the RMark directory. I managed to make some changes so that it became 17 time intervals but of course then the input file failed when transferred to Mark. After examining the structure of the PIM for each parameter in Mark, I made the following changes for RMark and now the models appear to be running as I would expect:

Parameters.txt (MSLiveDead lines)
Psi had a -1 in the begin column, which is why I think it started a year later. I changed this to 0 to match the structure of S and r.
I changed the column "num" to -1 for Psi and p so that it consists of, nocc - 1 time intervals and thus does not attempt to calculate impossible parameters.
I assume that Mark relies on the death report to estimate the survival in the final occasion, since there is no nocc + 1 resighting. Hence the S and r parameters still have a 0 in the "num" column, and thus time intervals = nocc's for these two parameters.

This is my first foray into manipulating these files, so i would appreciate it if someone could confirm that my changes make sense? If yes, perhaps this could be included in later versions so that I do not have to manipulate the parameters file again in future versions of RMark.

/Andy
awan
 
Posts: 16
Joined: Fri Feb 10, 2017 10:52 am

Re: MSLiveDead inconsistencies

Postby jlaake » Thu Jun 22, 2017 3:36 pm

Andy-

I've been out with the flu all week. Was not my intention for you to have to manipulate either models.txt or parameters.txt but good on you for digging into it.

Below is what is in the file currently
[code]MSLiveDead S 0 0 1 Triang all logit ~1 TRUE
MSLiveDead p 1 -1 0 Triang all logit ~1 TRUE
MSLiveDead Psi -1 0 0 Triang all mlogit ~-1+stratum:tostratum TRUE TRUE
MSLiveDead r 0 0 0 Triang all logit ~1 TRUE
[code]

From what you said the only change necessary would be for Psi to be 0 -1 0 which matches what it is in MS model. I've added a number of these models without having an adequate dataset for the model and occasionally something like this pops up. If you can send me a snippet of your data file to jefflaake@gmail.com I'll test with it.

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

Re: MSLiveDead inconsistencies

Postby awan » Fri Jun 23, 2017 3:19 am

Hi Jeff,

Sorry to hear about the flu but I hope you are feeling better. Yes, the change sounds about what I have done. I have sent an example dataset that I have been working with. I hope it is large enough, otherwise I can send more individuals through.

Thanks for your help.

Andy
awan
 
Posts: 16
Joined: Fri Feb 10, 2017 10:52 am

Re: MSLiveDead inconsistencies

Postby jlaake » Mon Jan 14, 2019 10:42 pm

I dropped the ball on this and never made this patch. If you are using the MSLiveDead model, the parameter definition for Psi is not correct in the version on CRAN. If you need a corrected version download the zip file at

https://drive.google.com/open?id=1A5HLlvulE4paqtbJQUv-E1dW2KfuNYfm

I'll be pushing a new version to CRAN soon.

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


Return to RMark

Who is online

Users browsing this forum: No registered users and 17 guests