Fixing Psi as the average of two other Psi's (Multistate)

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

Fixing Psi as the average of two other Psi's (Multistate)

Postby RBond » Thu Jun 22, 2017 12:29 pm

All, Currently I have created a multistate model in Rmark with a total of 6 states: 3 observable (A,B,C) and three unobservable (a,b,c). I would like to fix the transition from PsiAa to be the mean of PsiBb and PsiCc. Does anyone know how to code this in Rmark? I attempted to fix it using the code below but the result was not the mean of the other two estimates.

Code: Select all
 w<-c(test.ddl$Psi$fix[test.ddl$Psi$stratum=="B"& test.ddl$Psi$tostratum=="b"],
      test.ddl$Psi$fix[test.ddl$Psi$stratum=="C"& test.ddl$Psi$tostratum=="c"])
 test.ddl$Psi$fix[test.ddl$Psi$stratum=="A"& test.ddl$Psi$tostratum=="a"] <- mean(w, na.rm = FALSE)


I also tried fixing PsiAa to PsiBb using the code below which also didn't give the same estimate for both transitions.
Code: Select all
test.ddl$Psi$fix[test.ddl$Psi$stratum=="A"& test.ddl$Psi$tostratum=="a"] <-test.ddl$Psi$fix[test.ddl$Psi$stratum=="B"& test.ddl$Psi$tostratum=="b"]


Thank you for your help!
-RB
RBond
 
Posts: 3
Joined: Wed Jun 21, 2017 6:43 pm

Re: Fixing Psi as the average of two other Psi's (Multistate

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

I have never done what you are requesting. I'm confused by the code you sent. Have you specified real Psi values with fix for PsiBb and PsiCc? The only place where I have fixed Psi values is when they are 0 or 1. Psi values must sum to 1 (ie PsiBA+PsiBB+PsiBC+PsiBa+PsiBb+PsiBc=1) so I'm not sure what you are asking to do is even possible.

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

Re: Fixing Psi as the average of two other Psi's (Multistate

Postby RBond » Thu Jun 22, 2017 5:43 pm

Thank you for the quick response.
RBond
 
Posts: 3
Joined: Wed Jun 21, 2017 6:43 pm

Re: Fixing Psi as the average of two other Psi's (Multistate

Postby RBond » Fri Jun 23, 2017 5:44 pm

jlaake wrote: Have you specified real Psi values with fix for PsiBb and PsiCc? --jeff


I did not specify real values. Perhaps a better question is, is there a way to explicitly fix PsiAa = PsiBb = PsiCc ? My hope is that my fixing these transitions to eachother MARK will estimate one transition value.

Thank you again for your help.
RBond
 
Posts: 3
Joined: Wed Jun 21, 2017 6:43 pm

Re: Fixing Psi as the average of two other Psi's (Multistate

Postby jlaake » Mon Jun 26, 2017 1:06 pm

There is no way to set PsiAa=PsiBb=PsiCc on the real scale with the mlogit link but you can set their beta's to be all equal but as mentioned earlier, each strata transition matrix is normalized separately (ie, pr(A) to all 6 states sums to 1, Pr(B) to all 6 states sum to 1, etc). To help you understand this create a simple example with 3 states (A,B,C) in which Pr transition from A,B,C all have same beta. Now, let's say that beta is 1. Beta from A to B is 2 and beta from B to A is 1 and beta from C to A is 0 and Pr(C to B),Pr(A to A) and Pr(B to B) are computed by subtraction.

Then PsiAC=exp(1)/(1+exp(1)+exp(2)) = 0.245
PsiBC=exp(1)/(1+exp(1)+exp(1)) = 0.422
PsiCC=exp(1)/(1+exp(1)+exp(0)) = 0.576

Not what you want. Now maybe it is possible to fix reals using the logit link and relying on MARK to keep sum's to 1. I don't know. Haven't tried it but regardless the probabilities have to sum to 1.

--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 15 guests

cron