# NOT RUN {
# predict employment levels, cluster on group
require(plm)
data(EmplUK)
emp.1 <- plm(emp ~ wage + log(capital+1), data = EmplUK, model = "within",
index=c("firm", "year"))
cluster.wild.plm(mod=emp.1, dat=EmplUK, cluster="group", ci.level = 0.95,
boot.reps = 1000, report = TRUE, prog.bar = TRUE)
# cluster on time
cluster.wild.plm(mod=emp.1, dat=EmplUK, cluster="time", ci.level = 0.95,
boot.reps = 1000, report = TRUE, prog.bar = TRUE)
# }
Run the code above in your browser using DataLab