# \donttest{
# Poisson with random parameters
data("Articles")
poisson.ran <- Rchoice(art ~ fem + mar + kid5 + phd + ment,
data = Articles, family = poisson,
ranp = c(kid5 = "n", phd = "n", ment = "n"),
R = 10)
## Plot the distribution of the conditional mean for ment
plot(poisson.ran, par = "ment", type = "density")
## Plot the conditional mean for the first 20 individuals
plot(poisson.ran, par = "ment", ind = TRUE, id = 1:20, col = "blue")
## Plot the compensating variation with respect to fem
plot(poisson.ran, par = "ment", effect = "cv", wrt = "fem", type = "histogram")
# }
Run the code above in your browser using DataLab