# NOT RUN {
if (require(AER)) {
data("NMES1988", package="AER")
nmes <- NMES1988[, c(1, 6:8, 13, 15, 18)]
plot(log(visits+1) ~ cutfac(chronic), data = nmes,
ylab = "Physician office visits (log scale)",
xlab = "Number of chronic conditions", main = "chronic")
plot(log(visits+1) ~ cutfac(hospital, c(0:2, 8)), data = nmes,
ylab = "Physician office visits (log scale)",
xlab = "Number of hospital stays", main = "hospital")
}
# }
# NOT RUN {
<!-- %\donttest{ -->
# }
# NOT RUN {
<!-- %# countreg not yet on CRAN -->
# }
# NOT RUN {
<!-- %if (require(countreg)) { -->
# }
# NOT RUN {
<!-- %data("CrabSatellites", package = "countreg") -->
# }
# NOT RUN {
<!-- % -->
# }
# NOT RUN {
<!-- %# jittered scatterplot -->
# }
# NOT RUN {
<!-- %plot(jitter(satellites) ~ width, data=CrabSatellites, -->
# }
# NOT RUN {
<!-- % ylab="Number of satellites (jittered)", xlab="Carapace width", -->
# }
# NOT RUN {
<!-- % cex.lab=1.25) -->
# }
# NOT RUN {
<!-- %with(CrabSatellites, lines(lowess(width, satellites), col="red", lwd=2)) -->
# }
# NOT RUN {
<!-- % -->
# }
# NOT RUN {
<!-- %# boxplot, using deciles -->
# }
# NOT RUN {
<!-- %plot(satellites ~ cutfac(width), data=CrabSatellites, -->
# }
# NOT RUN {
<!-- % ylab="Number of satellites", xlab="Carapace width (deciles)") -->
# }
# NOT RUN {
<!-- %} -->
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab