search for: prob_fn

Displaying 1 result from an estimated 1 matches for "prob_fn".

Did you mean: prob_1
2008 Oct 15
1
MLE Constraints
...(0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1) x1 = c(0.50, 0.50, 0.50, 0.50, 0.50, 0.50, 0.50, 0.50, 0.50, 0.50, 0.25, 0.25, 0.25, 0.25) x2 = c(-1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 1) x3 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) states = c(1, 1, 2, 3, 1, 2, 3, 1, 1, 2, 2, 3, 1, 1) prob_fn = rep(0,M) Model=function(a, b, c, d, e, f, g, h, i, j, k, l) { p1 = exp(-(a g*x1 d*x2 j*x3)) p2 = 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(sta...