search for: abhlth

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

Did you mean: abbath
2004 Sep 21
1
Problems with boot and optim
...as.matrix(z) K <-ncol(X) M <-ncol(Z) b <- as.matrix(par[1:K]) gamma <- as.matrix(par[K+1:M]) mu <- (X%*%b) sd <- exp(Z%*%gamma) mu.sd <-(mu/sd) #Form Likelihood log.phi <- pnorm(ifelse(Y == 0, -1, 1) * mu.sd, log.p = TRUE) 2 * sum(log.phi) } y <- as.matrix(abhlth) x <- as.matrix(reliten) ones = rep(1, nrow(x)) x = cbind(ones,x) z = as.matrix(abinfo) data.het <- as.matrix(cbind(y,x,z)) het.fit <- function(data){ mod <- optim(c(1,0,0), lik.hetprobit, Y=data$y, X=data$x, Z=data$z, method="BFGS", control=list...