data(race)
if (FALSE) {
mle.estimates.multi <- ictreg(y ~ male + college, data = multi,
constrained = TRUE)
draws <- mvrnorm(n = 3, mu = coef(mle.estimates.multi),
Sigma = vcov(mle.estimates.multi) * 9)
bayes.fit <- ictregBayesHier(y ~ male + college,
formula.level.2 = ~ 1,
delta.start.level.1 = list(draws[1, 8:9], draws[1, 2:3], draws[1, 5:6]),
data = multi, treat = "treat",
delta.tune = list(rep(0.005, 2), rep(0.05, 2), rep(0.05, 2)),
alpha.tune = rep(0.001, length(unique(multi$state))),
J = 3, group.level.2 = "state",
n.draws = 100, burnin = 10, thin = 1)
bayes.predict <- predict(bayes.fit, interval = "confidence", se.fit = TRUE)
}
Run the code above in your browser using DataLab