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.
Gender
M1
M2
M1
M3
M1
M4
M1
M5
M1
A1
M1
A2
M1
A3
M1
A4
M1
A5
M1
US 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)