Download presentation
Presentation is loading. Please wait.
Published byNorah Ward Modified over 8 years ago
1
Multilevel Modeling Programs David A. Kenny January 23, 2014
2
Presumed Background Multilevel Modeling Nested
3
Example Kashy (1991) Study of Gender and Intimacy respondents completed a survey each night for two weeks outcome is the average intimacy rating of each interaction partner(from 1 to 7, bigger numbers more intimacy) Levels level 1: intimacy of the interaction (1-7), partner gender (-1=male; 1=female) level 2: respondent gender (-1=male; 1=female) 3
4
4
5
Syntax MIXED intimacy WITH resp_gender partner_gender /FIXED = resp_gender partner_gender resp_gender*partner_gender /PRINT = SOLUTION TESTCOV /RANDOM INTERCEPT partner_gender | SUBJECT(id) COVTYPE(UNR). 5
6
Random Effects 6
7
Example: Fixed Effects 7
8
Output from Other Programs HLM SAS R: lmer MLwiN not included: Stata 8
9
9 HLM: Formulation
10
10 HLM
11
11 SAS: Syntax PROC MIXED COVTEST; CLASS ID; MODEL INTIMACY = Part_Gen Resp_Gen Resp_Gen*Part_Gen / DDFM=SATTERTH SOLUTION; RANDOM INTERCEPT Part_Gen / TYPE=UN SUB=ID ; RUN; QUIT;
12
12 SAS: Output
13
library(foreign);library(lme4);library(lmerTest) ifilename="c:/kashy.sav" OrDa = read.spss (ifilename,use.value.labels=FALSE,max.value.labels=Inf,to.data.frame=TRUE) OrDa$int= OrDa$resp_gender*OrDa$partner_gender model <- lmer(intimacy ~ 1 + resp_gender + partner_gender + int + (partner_gender|id), data=OrDa) modelA <- lmer(intimacy ~ 1 + resp_gender + partner_gender + int + ((1)|id) + (0+partner_gender|id), data=OrDa) modelB <- lmer(intimacy ~ 1 + resp_gender + partner_gender + int + ((1)|id), data=OrDa) model anova(model) anova(model,modelB) anova(modelA,modelB) 13 R: lmer
14
14 REML criterion at convergence: 5181.537 Random effects: Groups Name Std.Dev. Corr id (Intercept) 0.9236 partner_gender 0.1444 -0.12 Residual 1.3751 Analysis of Variance Table of type 3 with Satterthwaite approximation for degrees of freedom Df Sum Sq Mean Sq F value Denom Pr(>F) resp_gender 1 9.1697 9.1697 5.0353 77.372 0.0276940 * partner_gender 1 0.4822 0.4822 1.3104 77.166 0.2558666 int 1 30.0729 30.0729 15.9047 77.166 0.0001503 *** --- Df logLik deviance Chisq Chi Df Pr(>Chisq)..1 6 -2584.5 5168.9 object 7 -2584.0 5168.0 0.9498 1 0.3298 R: lmer
15
15 MLwiN
16
16 More Webinars References Growth Curve Repeated Measures Two-Intercept Model Crossed Design Other Topics
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.