Displaying 1 result from an estimated 1 matches for "ll_calc".
Did you mean:
pll_calc
2008 Oct 15
1
MLE Constraints
...= exp(-(b h*x1 e*x2 k*x3))
p3 = exp(-(c i*x1 f*x2 l*x3))
### Set P
t5 = 0
while(t5<M)
{
t5 = t5 1
if(states[t5]==1) {prob_ok = p1[1]}
if(states[t5]==2) {prob_ok = p2[1]}
if(states[t5]==3) {prob_ok = p3[1]}
prob_fn[t5] = c(prob_ok)
}
prob_fn[prob_fn==0] = 0.0000000000001
### LL
ll_calc = -(sum(Y*log(prob_fn)))
return(ll_calc)
}
res = mle2(Model, start=list(a=1, b=1, c=1, d=0.15, e=0.15,
f=0.15, g=0.9, h=0.9, i=0.9, j=0.1, k=0.1, l=0.1), method = "Nelder-
Mead")
res
Best regards,
LFRC
--
View this message in context: http://www.nabble.com/MLE-Constraints-tp19994553p1...