[R] Discrete choice model maximum likelihood estimation
infinitehorizon
barisvardar at hotmail.com
Mon May 14 15:28:11 CEST 2012
By the way, in my last post I forgot to return negative of llfn, hence the
llfn will be as follows:
llfn <- function(param) {
bx <- param[1]
b1 <- param[2]
b2 <- param[3]
b3 <- param[4]
b <- param[5]
lL1 <- log(L1(bx,b1,b2,b,tt))
lL2 <- log(L2(bx,b1,b2,b3,b,tt))
lL3 <- log(L3(bx,b1,b2,b3,b,tt))
llfn <- (a==1)*lL1+(a==2)*lL2+(a==3)*lL3
return(-llfn)
}
However, it does not fix the problem, I still receive the same error..
--
View this message in context: http://r.789695.n4.nabble.com/Discrete-choice-model-maximum-likelihood-estimation-tp4629877p4629930.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list