search for: yelmon

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

2009 Oct 31
1
Help me improving my code
...w$female > wba <- pennw$wba > age <- pennw$age > bpw <- pennw$bp1000 > dur <- pennw$inuidur1 > fw <- factor(wage) > Ik <- model.matrix(~fw-1) > I1 <- Ik[,1] > I2 <- Ik[,2] > I3 <- Ik[,3] > I4 <- Ik[,4] > I5 <- Ik[,5] > yelmon <- function(theta,x){ + mu1 <- theta[1] + mu2 <- theta[2] + mu3 <- theta[3] + mu4 <- theta[4] + mu5 <- theta[5] + beta <- theta[6] + logL <- sum((Ik*log((exp(mu2-(x*beta))/(1+exp(mu2-(x*beta))))-(exp(mu1-(x*beta))/(1+exp(mu1-(x*beta))))))+(Ik*log((exp(mu3-(x*beta))/(1...