search for: l3l

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

Did you mean: 3l
2012 May 13
2
Discrete choice model maximum likelihood estimation
...-exp(b2+b*(t==1))) return(P) } P1 <- function(b1,b,t) { P <- exp(b1+b*(t==1))/(1-exp(b1+b*(t==1))) return(P) } # Likelihood functions for discrete choices for a=3, a=2 and a=1 respectively L3 <- function(b1,b2,b3,b,t) { P11 <- P1(b1,b,t) P22 <- P2(b2,b,t) P33 <- P3(b3,b,t) L3l <- (P11=1)*(P22=1)*(P33=1) return(L3l) } L2 <- function(b1,b2,b3,b,t) { P11 <- P1(b1,b,t) P22 <- P2(b2,b,t) P33 <- P3(b3,b,t) L2l <- (P11=1)*(P22=1)*(P33=0) return(L2l) } L1 <- function(b1,b2,b,t) { P11 <- P1(b1,b,t) P22 <- P2(b2,b,t) L1l <- (P11=1)*(P22=0) return(...