EDF9850_Review_Example6a
Overview
Lesa Hoffman reviews longitudinal and cross-classified multilevel models, then works through a simulated example of 1,000 students associated with both primary and secondary schools. She explains how to separate within- and between-school effects, interpret multiple variance components, test a random interaction for students sharing both schools, and decide when random slopes and contextual effects belong in a model.
Key takeaways
- Longitudinal data require modeling ordered occasions and potentially correlated level-one residuals; Hoffman identifies nlme’s gls and lme functions as options when lme4’s lmer cannot represent the needed residual correlation structure.
- A nonsignificant school-level predictor does not establish that students are independent within schools; random intercepts may still be necessary, and cluster-corrected standard errors alone do not resolve within-between coefficient mixing.
- In a crossed primary-secondary school design, separate random intercepts can attribute variance to both school dimensions; the example assigns about 23% to primary schools, 10% to secondary schools, and 67% to students.
- A unique primary-secondary combination can be modeled as an additional random effect when multiple students share both schools, but Hoffman’s example found that component small and nonsignificant at about 3.6% of variance.
- When a predictor varies at multiple levels, entering only its student-level value can produce a smooshed slope; adding school means as contextual effects separates the student association from primary- and secondary-school context.
- Cross-level interactions should match the grouping dimension of a random slope: primary-school predictors can explain primary-school slope variation, while secondary-school predictors can explain secondary-school slope variation.
Chapters
- Lesa Hoffman describes a topic-organized page built with Claude, linking each subject to lectures, worked examples, and YouTube playlists.
- The index includes recent courses and older versions from Nebraska, Kansas, and Iowa, helping locate examples across teaching materials.
- Hoffman notes that three classes remain, with formative assessment 6, example 6A, peer reviews, and one final formative assessment on the schedule.
- Unlike people within a cluster, repeated occasions have a meaningful order, so longitudinal models must address how residual correlations change over time.
- For level-one residual correlation and heterogeneous variance, Hoffman points students from lme4’s lmer function toward the nlme package’s gls or lme functions.
- Time-varying predictors still need within-person and between-person components separated, as in clustered-data models.
- Cohort and accelerated longitudinal designs may require separating age or occasion from historical context, such as whether being 60 means the same thing across decades.
- When people change clusters, researchers must test whether a cluster’s influence persists, decays, or is temporary; seeing multiple physicians is one example.
- Value-added models use cross-classified student and teacher effects to estimate teacher performance across students and years, but shrink extreme estimates toward the mean.
- Teacher estimates can be confounded by nonrandom student assignment, omitted student context such as free or reduced-price lunch, and misspecified functional forms.
- Cross-classification is appropriate when units cannot be represented by a single hierarchy, such as children associated with both neighborhoods and Head Start programs.
- If a true tree diagram cannot represent the data structure, the clustering is crossed rather than nested.
- Repeated-measures designs can cross subjects with items; explanatory item response models can estimate subject ability and item difficulty or discrimination.
- Hoffman recommends Don Hedeker’s workshop as a starting resource for cross-classified models, with SAS and Stata examples that can be translated to R.
- A researcher with data from 20 schools should not drop multilevel structure merely because school-level predictors are nonsignificant.
- Random intercepts account for student dependence within schools and adjust uncertainty even when no school-level predictor is included.
- Cluster-corrected standard errors can address dependence, but they do not fix a student-level coefficient that mixes within-school and between-school effects.
- With only 20 schools, estimates of school-level variance and effects are likely noisy and have limited power.
- A predictor in a four-level model can add multiple fixed effects, random effects, and covariance parameters, so model complexity can grow quickly.
- Retain necessary random effects when the data contain dependence or slope variation, since omitting them can distort standard errors for the fixed effects.
- Contextual effects may be needed to separate level-specific relationships when predictors have not been cluster-mean centered.
- Hoffman advises using research questions and plausible counterarguments to select additional controls, then simplifying nonsignificant effects when level-specific components are already separated.
- The simulated dataset contains 1,000 students, ninth-grade achievement, socioeconomic status, and primary and secondary school identifiers.
- Each student is associated with a prior primary school and a current secondary school, so neither school dimension is simply nested in the other.
- Hoffman creates school-level means for achievement and socioeconomic status, plus a unique identifier for each primary-secondary school combination.
- She prepares predictor versions centered within primary school, within secondary school, and within the unique combination.
- The association between socioeconomic status and achievement differs across the student level, primary-school means, secondary-school means, and combined school contexts.
- Centering on only primary or only secondary school does not remove association with all relevant means; Hoffman shows that centering on the unique combination achieves this in the example.
- Sixty percent of unique primary-secondary combinations contain only one student, while 40% have multiple students and could reveal extra dependence from sharing both schools.
- Researchers should check for repeated observations within each combined cluster because that dependence may warrant its own random interaction effect.
- Hoffman uses composite subscripts to represent child, primary-school, and secondary-school dimensions without assigning the single fixed intercept to multiple equations.
- The R model specifies primary- and secondary-school random intercepts in separate parenthetical terms, preventing an unintended correlation between those effects.
- The variance decomposition attributes about 23% of achievement variance to primary schools, 10% to secondary schools, and 67% to differences across students.
- In this crossed design, correlations differ by shared grouping: about 0.23 for a shared primary school and 0.10 for a shared secondary school.
- A third random effect for the unique primary-secondary combination tests whether students sharing both schools are more alike than the two school effects alone predict.
- The unique-combination component accounts for about 3.6% of variance and is not significant by a likelihood-ratio test.
- Adding the interaction changes the maximum reported intraclass correlation from about 0.334 to 0.367, a small difference in this example.
- Hoffman therefore proceeds with primary- and secondary-school random intercepts without the unique-combination effect.
- Hoffman tests denominational status for primary schools, secondary schools, and their interaction; these effects are initially nonsignificant.
- A student-level socioeconomic-status predictor has a positive association with achievement, but entering it alone assumes a shared, potentially smooshed slope across student and school levels.
- Adding primary-school, secondary-school, and unique-combination socioeconomic means makes the level-specific contextual effects explicit.
- Hoffman prefers contextual effects for interpreting what each school context adds beyond a student’s own status, while noting that cluster-mean-centered within and between effects are also valid.
- A student-level socioeconomic slope could vary across primary schools, secondary schools, or the unique school combination.
- Hoffman centers the predictor at the unique-combination mean before testing a random slope, to avoid mixing within- and between-school variation.
- The example does not support a primary-school random slope; if it had, primary-school predictors would be candidates to explain its variation through cross-level interactions.
- The same logic applies to a secondary-school random slope: secondary-school characteristics, rather than primary-school characteristics, would explain variation in that slope.
- Hoffman says citing a textbook is acceptable for general statistical methods, while a package-specific method should also cite its relevant paper or documentation.
- She describes Jonathan Templin’s more technology-focused teaching style, including R demonstrations and a planned interactive tool to guide students through model-building decisions.
- The upcoming course format is designed around about one hour of class time, with preparation outside class and in-class coding practice; recorded or asynchronous participation may be available.
- Hoffman emphasizes accessible explanations and an encouraging approach, and confirms that office hours will continue the following week.
Transcript excerpt
0:00 [snorts] So, my new friend Claude today helped me make this page. This is an organization of everything I've taught by topic. So, you can click on various families of models and see where it was covered in terms of the most recent classes and then I have older versions at previous universities where I have additional examples that I didn't have time for in the more recent versions. And then each topic has a link to where the lecture is, where the example is, and the corresponding YouTube playlist. So, this is meant to be like something searchable, like I need to do this kind of model. Has she talked about it ever? And then you can go through this list. So, I hope this might be useful um not just for y'all, but for anyone else who wants to figure out where things are, including myself. So, I get questions from folks all the time, and I'm like, I
0:49 know I have an example on that. What class was it? And then I have to go through like what did my classroom look like? Was it the Nebraska classroom, the Kansas classroom, the Iowa classroom, or this one? And then from there, I narrow it down in my memory. I figured no, this is a better job for for uh electronic assistance. So I did that. >> His visual. [laughter] >> Yeah, it's how I think. Like I I'm not like a visual learner, but I have a visual memory for certain things. And so that's my point of orientation is to figure out what where I who what the room I was talking to looked like at the time and I have a very it was always the same room. I I was very particular about that. So okay, there's that. So yes,
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Lesa Hoffman.