| MarihuanaAlcohol {cmm} | R Documentation |
Panel study with five time points. A group of 269 youths were interviewed at ages 13, 14, 15, 16, and 17, and asked (among other things) about their marijuana and alcohol use (Eliot, Huizinga & Menard, 1989). The data are tabulated in Bergsma, Croon, and Hagenaars (2009, p. 128). 208 observations do not have missing values.
Sections 4.2 and 4.4 in Bergsma, Croon, and Hagenaars (2009).
data(MarihuanaAlcohol)
A data frame with 269 observations on the following variables.
GenderM1M2M1M3M1M4M1M5M1A1M1A2M1A3M1A4M1A5M1US National Youth Survey (NYS): teenage marijuana and alcohol use (Elliot, Huizinga and Menard, 1989)
Bergsma, W. P., Croon, M. A., & Hagenaars, J. A. P. (2009). Marginal models for dependent, clustered, and longitudinal categorical data. New York: Springer.
Elliot, D. S., Huizinga, D. & Menard, S. (1989). Multiple problem youth: Delinquency, substance use, and metal health problems. New York: Springer.
data(MarihuanaAlcohol)
# Table MA: marginal loglinear analysis (BCH Section 4.2.1)
# listwise deletion of missing values and deletion of Gender and Alcohol use
dat <- MarihuanaAlcohol[-row(MarihuanaAlcohol)[is.na(MarihuanaAlcohol)],2:6]
# at yields the vectorized 5x3 table MA (marijuana use x age)
at <- MarginalMatrix( c("M1", "M2", "M3", "M4", "M5"), list(c("M1"), c("M2"), c("M3"), c("M4"), c("M5")), c(3, 3, 3, 3, 3) )
obscoeff <- SampleStatistics(dat, list("log", at), CoefficientDimensions = c(5,3), Labels = c("Age", "M"), ShowCoefficients = FALSE, ShowParameters = TRUE)