RDMSMisClass strata

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

RDMSMisClass strata

Postby bam59 » Wed Jul 10, 2019 8:33 am

Hi all,
I'm using the RDMSMisClass model for a disease scenario where an animal's infection status is sometimes not assessed (making it 'uncertain'). In the input file, I have coded 'N's and 'P's to denote positive and negative infection states and 'u's for the uncertain state.

When I look at the design data fields generated, I see a "stratum" field consisting of Ns and Ps, and two dummy variable columns (labeled N and P) that contain 0s and 1s. If I run a model with a stratum effect (~stratum), the estimates labeled with N and P are the reverse of what I get if I use the dummy variables (~N or ~P) to specify the model. What am I missing here?

With ~P
Code: Select all
> S.P$results$real
                         estimate           
S sP gHE c1 a0 t1       0.3184553             
S sN gHE c1 a0 t1       0.4859625


With ~N
Code: Select all
> S.N$results$real
                         estimate           
S sP gHE c1 a0 t1       0.3184554             
S sN gHE c1 a0 t1       0.4859623


With ~stratum
Code: Select all
> S.strat$results$real
                         estimate         
S sP gHE c1 a0 t1       0.4654214           
S sN gHE c1 a0 t1       0.3199899


I'm also wondering how to decipher (or to dictate) whether the prevalence term in this model (Omega) is giving me the proportion of the population in state P or in state N.

Thanks for any help!
Brittany
bam59
 
Posts: 14
Joined: Wed Jul 03, 2013 6:24 pm
Location: University of Vermont

Re: RDMSMisClass strata

Postby jlaake » Thu Jul 11, 2019 4:24 pm

I assume that the -2Lnl and AIC were the same for all 3 models. The labeling of real estimates in MARK output became unreliable when I started simplifying PIMs. The labels in model$results$reals are the labels used in MARK for the simplified PIMs. Try

get.real(model,parameter="S",se=T)

and see if they are all labelled the same way. If that isn't the problem, send me your data and code and I'll debug. I probably should remove labels on model$results$reals to avoid confusion.

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

Re: RDMSMisClass strata

Postby jlaake » Thu Jul 11, 2019 4:45 pm

Forgot to answer your other question. The stratum value in ddl$Omega that is missing is computed by subtraction so the one it represents is the one that is in the ddl. I happen to be looking at subtract.stratum values for some parameters of HidMarkov where I have not coded the option to have user specified subtract.stratum and I see that I did the same thing for RDMSMisClass set of models. Will have to add that for those models as well. Clearly getting more forgetful in retirement as well as getting damn old. Well that's my excuse anyhow.

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

Re: RDMSMisClass strata

Postby bam59 » Mon Jul 15, 2019 9:01 pm

Thanks, Jeff.

Oddly, the AICc and -2Lnl are not the same when I look at the three models. The model using the "P" dummy variable matches the one using "~stratum", but the one using the "N" dummy variable is different (by a whopping 6 AIC units). The get.real() function returns estimates that match the model$results$real output. Here's another confusing point -- if I rerun this model repeatedly, sometimes the labels come out one way and sometimes another. But in every case the get.real() and $results$real match.

Perhaps I can get in touch via email with a dataset so you can have a look. I can post the resolution here once we have it.

As for getting forgetful in retirement...I'm sure it's just that you have more exciting things to think about these days! Thanks very much for continuing to contribute here though -- it's much appreciated.

Brittany
bam59
 
Posts: 14
Joined: Wed Jul 03, 2013 6:24 pm
Location: University of Vermont

Re: RDMSMisClass strata

Postby bam59 » Mon Jul 29, 2019 8:31 am

Just an update for anyone following along at home -- the issues I was having were not related to labeling in RMark, as I originally thought. Jeff diagnosed a convergence/optimization problem. I'm trying to work around this by building simpler models, using simulated annealing, and providing starting values.

Brittany
bam59
 
Posts: 14
Joined: Wed Jul 03, 2013 6:24 pm
Location: University of Vermont


Return to RMark

Who is online

Users browsing this forum: No registered users and 7 guests