Title: | Functions and Datasets for WWGbook |
---|---|
Description: | Book is "Linear Mixed Models: A Practical Guide Using Statistical Software" published in 2006 by Chapman Hall / CRC Press. |
Authors: | Shu Chen, Andrzej Galecki <[email protected]> |
Maintainer: | Shu Chen <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0.2 |
Built: | 2024-10-31 22:23:30 UTC |
Source: | CRAN |
The data comes from researchers at the University of Michigan as part of a prospective longitudinal study of 214 children.
data(autism)
data(autism)
A data frame with 612 observations on the following 4 variables.
: Age in years (2, 3, 5, 9, 13); the time variable
: Vineland Socialization Age Equivalent: parent-reported socialization, the dependent variable measured at each age
: Sequenced Inventory of Communication Development Expressive Group: categorized expressive language score at age 2 years (1 = Low, 2 = Medium, 3 = High)
: Unique child identifier
Oti, R., Anderson, D., Risi, S., Pickles, A. & Lord, C., Social Trajectories Among Individuals with Autism Spectrum Disorders, Developmental Psychopathology (under review), 2006.
West, B., Welch, K. & Galecki, A, Linear Mixed Models: A Practical Guide Using Statistical Software, Chapman Hall / CRC Press, first edition, 2006.
attach(autism) sicdegp.f <- factor(sicdegp) age.f <- factor(age) detach(autism) # Add the new variables to a new data frame object. autism.updated <- data.frame(autism, sicdegp.f, age.f) dim(autism.updated) names(autism.updated)
attach(autism) sicdegp.f <- factor(sicdegp) age.f <- factor(age) detach(autism) # Add the new variables to a new data frame object. autism.updated <- data.frame(autism, sicdegp.f, age.f) dim(autism.updated) names(autism.updated)
The Study of Instructional Improvement (SII; Hill, Rowan, and Ball, 2004) was carried out by researchers at the University of Michigan to study the math achievement scores of first- and third-grade students in randomly selected classrooms from a national U.S. sample of elementary schools.
data(classroom)
data(classroom)
A data frame with 1190 observations on the following 12 variables.
: Indicator variable (0 = boys, 1 = girls)
: Indicator variable (0 = non-minority students, 1 = minority students)
: Student math score in the spring of their kindergarten year
: Student gain in math achievement score from the spring of kindergarten to the spring of first grade (the dependent variable)
: Student socioeconomic status
: First grade teacher years of teaching experience
: First grade teacher mathematics content knowledge: based on a scale based composed of 30 items (higher values indicate higher content knowledge)
: Percentage of households in the neighborhood of the school below the poverty level
: First grade teacher mathematics preparation: number of mathematics content and methods courses
: Classroom ID number
: School ID number
: Student ID number
Hill, H.C., Rowan, B., and Ball, D.L. (In Press). Effect of Teacher's Mathematical Knowledge for Teaching on Student Achievement, American Educational Research Journal, Learning Mathematics for Teaching (LMT) Project.
West, B., Welch, K. & Galecki, A, Linear Mixed Models: A Practical Guide Using Statistical Software, Chapman Hall / CRC Press, first edition, 2006.
attach(classroom) #### Boxplots for Figure 4.2 classroom.first8 <- classroom[classroom$schoolid <= 8,] par(mfrow=c(4,2)) for (i in 1:8) {boxplot(classroom.first8$mathgain[classroom.first8$schoolid==i] ~ classroom.first8$classid[classroom.first8$schoolid==i], ylab="Mathgain", xlab="classid" )}
attach(classroom) #### Boxplots for Figure 4.2 classroom.first8 <- classroom[classroom$schoolid <= 8,] par(mfrow=c(4,2)) for (i in 1:8) {boxplot(classroom.first8$mathgain[classroom.first8$schoolid==i] ~ classroom.first8$classid[classroom.first8$schoolid==i], ylab="Mathgain", xlab="classid" )}
The data used in this example were originally reported by Douglas, et al. (2004). The aim of their experiment was to examine nucleotide activation (guanine nucleotide bonding) in seven different brain nuclei (i.e., brain regions) among five adult male rats.
data(rat.brain)
data(rat.brain)
A data frame with 30 observations on the following 4 variables.
: Unique identifier for each rat
: Level of drug treatment (1 = Basal, 2 = Carbachol)
: Brain nucleus (1 = BST, 2 = LS, 3 = VDB)
: Nucleotide activation (the dependent variable)
Douglas, C.L., Demarco, G.J., Baghdoyan, H.A., and Lydic, R, Pontine and basal forebrain cholinergic interaction: implications for sleep and breathing, Respiratory Physiology and Neurobiology, 143, 251, 2004.
West, B., Welch, K. & Galecki, A, Linear Mixed Models: A Practical Guide Using Statistical Software, Chapman Hall / CRC Press, first edition, 2006.
attach(rat.brain) region.f <- region region.f[region == 1] <- 1 region.f[region == 2] <- 2 region.f[region == 3] <- 0 region.f <- factor(region.f) treat <- treatment treat[treatment == 1] <- 0 treat[treatment == 2] <- 1 treat <- factor(treat) detach(rat.brain) rat.brain <- data.frame(rat.brain, region.f, treat) str(rat.brain)
attach(rat.brain) region.f <- region region.f[region == 1] <- 1 region.f[region == 2] <- 2 region.f[region == 3] <- 0 region.f <- factor(region.f) treat <- treatment treat[treatment == 1] <- 0 treat[treatment == 2] <- 1 treat <- factor(treat) detach(rat.brain) rat.brain <- data.frame(rat.brain, region.f, treat) str(rat.brain)
The data come from a study in which 30 female rats were randomly assigned to receive one of three doses (High, Low, or Control) of an experimental compound.
data(ratpup)
data(ratpup)
A data frame with 322 observations on the following 6 variables.
: Unique identifier for each rat pup
: Birth weight of the rat pup (the dependent variable)
: Sex of the rat pup (Male, Female)
: Litter ID number
: Litter size (i.e., number of pups per litter)
: Dose level of the experimental compound assigned to the litter (High, Low, Control)
Pinheiro, J.C. and Bates, D.M., Mixed-effects models in S and S-PLUS, Springer-Verlag Inc., Berlin, New York, 2000.
West, B., Welch, K. & Galecki, A, Linear Mixed Models: A Practical Guide Using Statistical Software, Chapman Hall / CRC Press, first edition, 2006.
str(ratpup)
str(ratpup)
The Dental Veneer data were collected by researchers at the University of Michigan Dental School, in a study investigating the impact of veneer placement on subsequent gingival (gum) health among adult patients (Ocampo, 2005).
data(veneer)
data(veneer)
A data frame with 110 observations on the following 7 variables.
: Patient ID variable (Level 3 ID)
: Tooth number (Level 2 ID)
: Age of patient when veneer was placed, constant for all observations on the same patient
: Baseline measure of Gingival Crevicular Fluid for the tooth, constant for all observations on the same tooth
: Average contour difference in the tooth after veneer placement, constant for all observations on the same tooth
: Time points of longitudinal measures (3 = Three Months, 6 = Six Months)
: Gingival Crevicular Fluid adjacent to the tooth, collected at each time point (Dependent Variable)
Ocampo, J., Data taken from M.S. Thesis, Effect of Porcelain Laminate Contour on Gingival Inflammation, University of Michigan School of Dentistry, 2005
West, B., Welch, K. & Galecki, A, Linear Mixed Models: A Practical Guide Using Statistical Software, Chapman Hall / CRC Press, first edition, 2006.
str(veneer)
str(veneer)