Using SAS, Stata, HLM, R, SPSS, And Mplus

2y ago
123 Views
47 Downloads
1.37 MB
35 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Braxton Mach
Transcription

Multilevel Modeling TutorialUsing SAS, Stata, HLM, R, SPSS, and MplusUpdated: March 2015

Multilevel Modeling TutorialTable of ContentsIntroduction . 3Model Considerations . 3Intraclass Correlation Coefficient . 4Example Dataset . 4Intercept-only Model (Unconditional Model) . 4Random Intercept with One Fixed Level-1 Factor (Non-Random Slope). 10Random Intercept and Slope for One Level-1 Factor . 14Random Slope for Two Level-1 Factors . 18One Level-2 Factor and Two Random Level-1 Factors (No Interactions) . 23One Level-2 Factor and Two Random Level-1 Factors with Interaction . 28Overall Summary. 34References . 352The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialIntroductionThis document serves to compare the procedures and output for two-level hierarchical linearmodels from six different statistical software programs: SAS, Stata, HLM, R, SPSS, and Mplus.We compare these packages using the popular.csv dataset, with permission, from Chapter 2 ofJoop Hoxโ€™s Multilevel Analysis (2010), which can be downloaded e six models described below are all variations of a two-level hierarchical model, also referredto as a multilevel model, a special case of mixed model. This comparison is only valid forcompletely nested data (not data from crossed or other designs, which can be analyzed withmixed models). Although the website for the HLM software states that it can be used for crosseddesigns, this has not been confirmed. The procedures used in SAS, Stata, R, SPSS, and Mplusbelow are part of their multilevel or mixed model procedures, and can be expanded to non-nesteddata. But for the purposes of this comparison, we will only investigate a fully nested dataset.The code/syntax used for each model is included below for all programs except HLM, which iscompletely run by a GUI. We have provided screen shots of HLM and SPSS for each model. Inaddition, each model is specified in a hierarchical format as well as a mixed format. Althoughthese two expressions of the models are equivalent, some research fields prefer to visualize thehierarchical structure because it is easier to see the separation between levels, while others preferthe mixed format, where it is easier to distinguish between fixed and random effects.Model ConsiderationsWhen adding predictors into the six models discussed in this document, we chose to grandmean center them, meaning that we subtracted the overall mean of that variable from eachsubjectโ€™s score. Centering at the grand mean, as opposed to the group mean (where the mean ofeach group is subjected from the score of subjects within that group), will not be appropriate forall models, as discussed in detail by Enders & Tofighi (2007). The choice of which centeringmethod to use should be driven by the specific research question being asked.Another consideration is the method of estimation used by these programs to produce theparameter estimates, either maximum likelihood (ML) or restricted maximum likelihood(REML). Each has its own advantages and disadvantages. ML is better for unbalanced data, butit produces biased results. REML is unbiased, but it cannot be used when comparing two nestedmodels with a likelihood ratio test. Both methods will produce the same estimates for fixedeffects, yet they do differ on the random effect estimates (Albright & Marinova, 2010).As weโ€™ll see in the models discussed below, the two methods produce very similar results, anddo not greatly affect the p-values of the random factors. However, it is important to be awarethat the choice of method can impact the estimate, standard error, and p-values of the random3The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling Tutorialfactors and could potentially impact the decision of declaring a random factor significant or not.SAS, HLM, R, and SPSS use REML by default, while Stata and Mplus use ML. In the Stataexamples throughout this document, we tell Stata to use REML in order to compare the outputwith the other four programs. However, Mplus does not have such an option, but can only useML, so you will see minor differences in the random variance estimates in the Mplus outputcompared to the other programs throughout this document.Intraclass Correlation CoefficientWe have also reported the intraclass correlation coefficient (ICC), ฯ, for each model. The ICC isthe proportion of variance in the outcome variable that is explained by the grouping structure ofthe hierarchical model. It is calculated as a ratio of group-level error variance over the total errorvariance:๐œŒ ๐œŽ๐‘ข20๐œŽ๐‘ข20 ๐œŽ๐‘’2,where ๐œŽ๐‘ข20 is the variance of the level-2 residuals and ๐œŽ๐‘’2 is the variance of the level-1 residuals.In other words, the ICC reports on the amount of variation unexplained by any predictors in themodel that can be attributed to the grouping variable, as compared to the overall unexplainedvariance (within and between variance).Dataset DescriptionThe popular dataset consists of students from different classes and because each student belongsto one unique class, it is a nested design. The dependent variable is Popular, a self-ratedpopularity scale ranging from 0-10. Predictors include Sex (dichotomous) and Extrav(continuous self-rated extraversion score) at the student level and Texp (teacher experience inyears, which is continuous) at the class level.Intercept-only Model (Unconditional Model)Mixed Model๐‘ƒ๐‘œ๐‘๐‘ข๐‘™๐‘Ž๐‘Ÿ๐‘–๐‘— ๐›พ00 ๐‘ข0๐‘— ๐‘’๐‘–๐‘—Hierarchical Model๐‘ƒ๐‘œ๐‘๐‘ข๐‘™๐‘Ž๐‘Ÿ๐‘–๐‘— ๐›ฝ0๐‘— ๐‘’๐‘–๐‘—๐›ฝ0๐‘— ๐›พ00 ๐‘ข0๐‘—The unconditional mixed model specification resembles a one-factor ANOVA with ๐›พ00as theoverall mean and ๐‘ข0๐‘— as the class effect. However, we are considering ๐‘ข0๐‘— as a random effect (anormally distributed variable with a mean of zero), not a fixed factor effect as in ANOVA. Thus,we interpret the estimate for ๐‘ข0๐‘— as the variance of the mean for each class around the overallmean Popular score.4The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialThe estimate for ๐›พ00 is the mean of the means of Popular for each class, instead of the mean ofall students in the study. If the data were completely balanced (i.e. same number of students inevery class), then the results of the unconditional model will equal those from an ANOVAprocedure.SAS Resultsproc mixed data popdata covtest;model popular /solution;random intercept /subject class type un;run;Fixed EffectsIntercept (๐›พ00)Estimate5.078St. Error0.087t-stat58.1p-value 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate1.2210.702St. Error0.0400.109z-stat30.86.46p-value 0.001 0.001The โ€œcovtestโ€ option is needed to report the standard errors of the variancecomponent estimates. Also, you need to specify the unstructured covariance matrixtype, which is what HLM and R use by default, and we use here for comparison.The output from SAS is equal to the results in Table 2.1 of Hoxโ€™s book. We canconclude that mean Popular score among classes is 5.078, and that there is morevariation within the classes (1.221) than among the different classes (0.702). Thiswill be discussed further when we calculate the ICC for this model.Stata Resultsxtmixed popular class: , variance remlFixed EffectsIntercept (๐›พ00)Estimate5.078St. Error0.087Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate1.2210.702St. Error0.0400.109z-stat58.1p-value 0.0015The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialStataโ€™s xtmixed command requires the dependent variable followed by โ€œ โ€ whichspecifies the separation between the fixed and random variables. We must includethe variance option to see the estimates for the variance components in the output, aswell as the reml option to estimate using restricted maximum likelihood.Also note that Stata does not output the p-values of the random component estimates,but significance can be determined by whether or not zero is contained in theconfidence interval. These results exactly match those from SAS.HLM ResultsFixed EffectsIntercept (๐›พ00)Estimate5.078St. Error0.087t-stat58.1Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate1.2220.702St. Dev.*1.1050.838Chi-square p-value1227.3p-value 0.001 0.001HLM does not report the standard error of the variance components, but rather theirsquare-root (the standard deviation estimate). However, it does report the Chisquared statistic and p-value for the intercept random effect. These results equalthose from the other programs.R Resultslibrary(lme4)library(lmerTest)lmer(popular 1 (1 class))summary(my intonly)6The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialFixed EffectsIntercept (๐›พ00)Estimate5.078St. Error0.087Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate1.2210.702St. Dev.*1.1050.838t-stat58.1p-value 0.001Similar to HLM, R does not provide standard errors of the variance components (onlythe square-root of the variance estimates, reported as โ€œstandard deviationโ€). Also, theoriginal lme4 package reports the t-statistic of the fixed effects, but not the p-values.However, calling the lmerTest package will overwrite the lmer( ) function from thelme4 package and produces identical results, except it includes the p-values of thefixed effects. These results equal those from the other programs.SPSS ResultsMIXED popular/FIXED SSTYPE(3)/METHOD REML/PRINT SOLUTION TESTCOV/RANDOM INTERCEPT SUBJECT(class) COVTYPE(UN).Or follow the screen shots below:7The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialFixed EffectsIntercept (๐›พ00)Estimate5.078St. Error0.087t-stat58.1p-value 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate1.2210.702St. Error0.0400.109z-stat30.86.46p-value 0.001 0.001You can specify the unstructured covariance type in the โ€œRandomโ€ window (althoughthis is unnecessary for the intercept-only model). Be sure to select โ€œinclude interceptโ€in the Random options box, and โ€œtests for covariance parametersโ€ in the Statisticsoptions box. The SPSS results equal those from the other programs.8The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialMplus ResultsTITLE: HLM Popular Data - Unconditional ModelDATA: FILE IS C:\popular mplus.csv;VARIABLE: NAMES ARE pupil class extrav sex texp popular popteach ZextravZsex Ztexp Zpopular Zpopteach Cextrav Ctexp Csex;USEVARIABLES ARE class popular;CLUSTER class;ANALYSIS: TYPE twolevel random;MODEL: %WITHIN%%BETWEEN%OUTPUT: sampstat;Fixed EffectsIntercept (๐›พ00)Estimate5.078St. Error0.087t-stat58.4p-value 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate1.2220.695St. Error0.0470.108t-stat26.26.4p-value 0.001 0.001Because this is an unconditional model, we donโ€™t need to specify any WITHIN orBETWEEN variables. The criteria for listing variables in the MODEL statementare below. Weโ€™ll see examples of the first three in the following sections:1.2.3.4.%WITHIN% โ€“ Level-1 fixed factors (non-random slope)%WITHIN% with latent slope variable โ€“ Level-1 random factors%BETWEEN% โ€“ Level-2 fixed factorsDonโ€™t specify in either statement โ€“ Variables measured at the student levelbut with a Level-1 and Level-2 variance estimate (weโ€™re not sure if/when thiswould be applicable for a multilevel model, and we wonโ€™t see this in any ofthe models discussed in this document).The above table shows the results from the โ€œModel Resultsโ€ section at the bottom ofthe Mplus output. Mplus does report p-values for each estimate, and all estimatesmatch those from the other programs except for the variance estimate of the randomintercept, which differs by about 0.007. This difference is due to the fact that Mplususes ML estimation. Despite this difference, we do not see a change in thesignificance of any variables.9The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialModel SummaryOverall, the six programs produce very similar results for the intercept-only model (with the onlydifferences occurring in the Mplus estimate of the random effect). The only difference is howthey report the precision of the random variance estimates.The ICC for this model is equal to:๐œŒ ๐œŽ๐‘ข20๐‘—๐œŽ๐‘ข20๐‘— ๐œŽ๐‘’2๐‘–๐‘— . 702 0.365 ,. 702 1.221which tells us that about one-third of the total variation in Popular can be accounted for bywhich class each student is in.Random Intercept with One Fixed Level-1 Factor (Non-Random Slope)Mixed Model๐‘ƒ๐‘œ๐‘๐‘ข๐‘™๐‘Ž๐‘Ÿ๐‘–๐‘— ๐›พ00 ๐›พ10 ๐‘ฌ๐’™๐’•๐’“๐’‚๐’—๐’Š๐’‹ ๐‘ข0๐‘— ๐‘’๐‘–๐‘—Hierarchical Model๐‘ƒ๐‘œ๐‘๐‘ข๐‘™๐‘Ž๐‘Ÿ๐‘–๐‘— ๐›ฝ0๐‘— ๐›ฝ1๐‘— ๐‘ฌ๐’™๐’•๐’“๐’‚๐’—๐’Š๐’‹ ๐‘’๐‘–๐‘—๐›ฝ0๐‘— ๐›พ00 ๐‘ข0๐‘—๐›ฝ1๐‘— ๐›พ10This model has added one student-level fixed factor, Extrav, the self-reported extraversion score.The mixed model looks like an ANCOVA based on class with the covariate Extrav, butremember we still consider ๐‘ข0๐‘— to be a random effect, not a fixed effect. Thus, the estimate for๐›พ10 differs from what would be found by an ANCOVA procedure.In the real application of this data, it does not make sense that Extrav should have a fixed effectinstead of a random effect, since levels of student extraversion should vary by class. However,for the purposes of comparing the four programs, we still want to investigate a case with onestudent-level fixed factor.SAS Resultsproc mixed data popdata covtest;model popular extrav c /solution;random intercept /subject class type un;run;10The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialFixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0780.486St. Error0.0940.020t-stat53.924.1p-value 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate0.9300.841St. Error0.0300.127z-stat30.86.64p-value 0.001 0.001We now have an estimate for the fixed effect of Extrav. For every one unit increasein a studentโ€™s reported extraversion score, there is a 0.486 increase in their popularityscore. These results equal those from the other programs which use REML.Stata Resultsxtmixed popular cextrav class: , variance cov(un) remlFixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0780.486St. Error0.0940.020Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate0.9300.841St. Error0.0300.127z-stat53.924.1p-value 0.001 0.001As we add predictors to the model in Stata, we add the cov(un) option, specifying anunstructured covariance matrix. We placed the centered Extraversion variable beforethe โ€œ โ€ to indicate that it is a fixed factor (with a non-random slope). These resultsequal those from the other programs.HLM Results11The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialFixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0780.486St. Error0.0940.020t-stat53.924.1Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate0.9300.841St. Dev.*0.9650.917Chi-square p-value1865.7p-value 0.001 0.001 0.001R Resultsmy 1fixed - lmer(popular 1 c extrav (1 class))summary(my 1fixed)Fixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0780.486St. Error0.0940.020Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate0.9300.841St. Dev.*0.9650.917t-stat53.924.1p-value 0.001 0.001SPSS ResultsMIXED popular WITH Cextrav/FIXED INTERCEPT Cextrav SSTYPE(3)/METHOD REML/PRINT SOLUTION TESTCOV/RANDOM INTERCEPT SUBJECT(class) COVTYPE(UN).12The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialFixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0780.486St. Error0.0940.020t-stat53.924.1p-value 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate0.9300.841St. Error0.0300.127z-stat30.86.64p-value 0.001 0.001Mplus ResultsTITLE: HLM Popular Data - Unconditional ModelDATA: FILE IS C:\popular mplus.csv;VARIABLE: NAMES ARE pupil class extrav sex texp popular popteach ZextravZsex Ztexp Zpopular Zpopteach Cextrav Ctexp Csex;USEVARIABLES ARE class popular Cextrav;WITHIN Cextrav;CLUSTER class;ANALYSIS: TYPE twolevel random;MODEL: %WITHIN%popular ON Cextrav;%BETWEEN%popular;OUTPUT: sampstat;Fixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0780.486St. Error0.0940.027t-stat54.218.3p-value 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Estimate0.9300.831St. Error0.0280.126t-stat33.56.6p-value 0.001 0.001We now include the centered Extrav variable in the WITHIN option of theVARIABLE statement. We must use the โ€œONโ€ option for the within-level MODELspecification to tell Mplus that Extrav is a fixed level-1 factor. Again, you can seethat there are minor differences in many of the estimates and standard error of theestimates (and therefore the t-statistics) due to using ML estimation instead of REML.Because the estimate for the variance of ๐‘ข0๐‘— is different than the other programs, theICC reported by Mplus differs from what is reported below.13The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialModel SummaryFor this model, the first five programs have exactly the same results, while the estimates fromMplus are off by very small margins. The ICC for this model is larger than for the unconditionalmodel (as expected, since we are controlling for some student-level variation by adding afixed factor):๐œŒ . 841 0.475. 841 .930With one student-level fixed factor, almost one-half of the total variation in Popular can beaccounted for by both the class of the student and the student-level fixed factor Extraversion.Random Intercept and Slope for One Level-1 FactorMixed Model๐‘ƒ๐‘œ๐‘๐‘ข๐‘™๐‘Ž๐‘Ÿ๐‘–๐‘— ๐›พ00 ๐›พ10 ๐‘ฌ๐’™๐’•๐’“๐’‚๐’—๐’Š๐’‹ ๐‘ข1๐‘— ๐‘ฌ๐’™๐’•๐’“๐’‚๐’—๐’Š๐’‹ ๐‘ข0๐‘— ๐‘’๐‘–๐‘—Hierarchical Model๐‘ƒ๐‘œ๐‘๐‘ข๐‘™๐‘Ž๐‘Ÿ๐‘–๐‘— ๐›ฝ0๐‘— ๐›ฝ1๐‘— ๐‘ฌ๐’™๐’•๐’“๐’‚๐’—๐’Š๐’‹ ๐‘’๐‘–๐‘—๐›ฝ0๐‘— ๐›พ00 ๐‘ข0๐‘—๐›ฝ1๐‘— ๐›พ10 ๐‘ข1๐‘—This model contains a random slope for Extrav, which means that we are allowing the slope ofour regression equation to vary by class. This model is more appropriate than the previousmodel for the variables being used since it is intuitive to assume that extraversion varies fromclass to class.SAS Resultsproc mixed data popdata covtest;model popular extrav c /solution;random intercept extrav c /subject class type un;run;Fixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0310.493St. Error0.0970.025t-stat51.919.4p-value 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Estimate0.8950.8920.026St. Error0.0300.1350.009z-stat30.06.62.8p-value 0.001 0.0010.00314The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialThe estimate for the random Extrav slope is significant (p-value of 0.003), andtherefore we would say that the student extraversion scores do vary by class. Theseresults exactly match those from the other programs, except for some smalldiscrepancies in the t-statistics for the fixed effects.Stata Resultsxtmixed popular cextrav class: cextrav, variance cov(un) remlFixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0310.493St. Error0.0970.025z-stat51.919.4p-value 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Estimate0.8950.8920.026St. Error0.0300.1350.009Fixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0310.493St. Error0.0970.025t-stat52.119.5p-value 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Estimate0.8950.8920.026St. Dev.*0.9460.9440.162Chi-square p-valueHLM Results1,589.4180.6 0.001 0.00115The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialR Resultsmy 1rnd - lmer(popular 1 c extrav (1 c extrav class))summary(my 1rnd)Fixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0310.493St. Error0.0970.025Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Estimate0.8950.8920.026St. Dev.*0.9460.9440.161t-stat51.919.4p-value 0.001 0.001SPSS ResultsMIXED popular WITH Cextrav/FIXED INTERCEPT Cextrav SSTYPE(3)/METHOD REML/PRINT SOLUTION TESTCOV/RANDOM INTERCEPT Cextrav SUBJECT(class) COVTYPE(UN).Fixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0310.493St. Error0.0970.025t-stat51.919.4p-value 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Estimate0.8950.8920.026St. Error0.0300.1350.009z-stat30.06.62.8p-value 0.001 0.0010.00516The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialMplus ResultsTITLE: HLM Popular Data - Unconditional ModelDATA: FILE IS C:\popular mplus.csv;VARIABLE: NAMES ARE pupil class extrav sex texp popular popteach ZextravZsex Ztexp Zpopular Zpopteach Cextrav Ctexp Csex;USEVARIABLES ARE class popular Cextrav;WITHIN Cextrav;CLUSTER class;ANALYSIS: TYPE twolevel random;MODEL: %WITHIN%randoms1 popular ON Cextrav;%BETWEEN%popular;OUTPUT: sampstat;Fixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Estimate5.0450.485St. Error0.0950.026t-stat52.918.3p-value 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Estimate0.8940.8920.029St. Error0.0270.1300.010t-stat33.26.52.8p-value 0.001 0.0010.005This time we included a latent slope variable in the WITHIN statement to specifyExtrav as a random factor, which tells Mplus not to look for โ€œrandoms1โ€ in thedataset because it is not observed. You can interpret the output for this variable as therandom slope component of Extrav. We must do this because Mplus is designed forstructural equation models, and its multilevel model capability is an adaptation of itsunderlying latent analysis procedures.Model SummaryOverall, the first five programs produce the same results for this model, while Mplus againdiffers by a small amount due to ML estimation. The ICC for this model is:๐œŒ . 892 0.500. 892 .895By changing the effect of Extrav from fixed to random, the ICC increases slightly since we areconsidering more random variation at the student level.17The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialRandom Slope for Two Level-1 FactorsMixed Model๐‘ƒ๐‘œ๐‘๐‘ข๐‘™๐‘Ž๐‘Ÿ๐‘–๐‘— ๐›พ00 ๐›พ10 ๐‘ฌ๐’™๐’•๐’“๐’‚๐’—๐’Š๐’‹ ๐›พ20 ๐‘บ๐’†๐’™๐’Š๐’‹ ๐‘ข1๐‘— ๐‘ฌ๐’™๐’•๐’“๐’‚๐’—๐’Š๐’‹ ๐‘ข2๐‘— ๐‘บ๐’†๐’™๐’Š๐’‹ ๐‘ข0๐‘— ๐‘’๐‘–๐‘—Hierarchical Model๐‘ƒ๐‘œ๐‘๐‘ข๐‘™๐‘Ž๐‘Ÿ๐‘–๐‘— ๐›ฝ0๐‘— ๐›ฝ1๐‘— ๐‘ฌ๐’™๐’•๐’“๐’‚๐’—๐’Š๐’‹ ๐›ฝ2๐‘— ๐‘บ๐’†๐’™๐’Š๐’‹ ๐‘’๐‘–๐‘—๐›ฝ0๐‘— ๐›พ00 ๐‘ข0๐‘—๐›ฝ1๐‘— ๐›พ10 ๐‘ข1๐‘—๐›ฝ2๐‘— ๐›พ20 ๐‘ข2๐‘—For this model, we are including a second student-level variable, Sex, which also has a randomslope, ๐‘ข2๐‘— . This means that we are accounting for both the gender of the students as well as theirextraversion score, and we are allowing the effects/slopes of both of these factors to vary byclass.SAS Resultsproc mixed data popdata covtest;model popular extrav c sex c /solution;random intercept extrav c sex c /subject class type un;run;Fixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Sex (๐›พ20)Estimate5.0280.4431.244St. Error0.0840.0230.036t-stat59.818.934.1p-value 0.001 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Sex (๐‘ข2๐‘— )Estimate0.5540.6740.030 0.001St. Error0.0190.1020.008-z-stat29.96.63.8-p-value 0.001 0.001 0.001-In this output, we can see that gender does have a significant effect on a studentโ€™sself-reported popularity (p-value 0.001). The fixed estimate for Sex, ๐›พ20, meansthat female students (Sex 1) have a Popular score that is 1.244 higher than malestudents (the baseline group, Sex 0), holding Extrav constant.18The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialSAS did not like that the estimated variance for Sex was so close to zero in thismodel, and therefore did not output a standard error or p-value. Because ๐‘ข2๐‘— isextremely close to zero, we would conclude that gender does not vary significantly byclass. These results equal the other programs within a few thousandths of a unit.Stata Resultsxtmixed popular cextrav csex class: cextrav csex, variance cov(un) remlFixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Sex (๐›พ20)Estimate5.0280.4431.244St. Error0.0840.0230.036Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Sex (๐‘ข2๐‘— )Estimate0.5530.6740.0300.005St. Error.z-stat59.818.934.1p-value 0.001 0.001 0.001Stata cited an error when running this model: standard error calculation failed,meaning that the standard errors for the random effects were not calculated. Wefound that by removing the cov(un) option, this error did not appear. However, all ofthe estimates in that output differed from the other programs, so we choose to reportthe output with the unstructured covariance matrix specification. We are not sure ifthis is a common problem with running this type of model in Stata, but it is importantto be aware that it can happen.HLM Results19The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialFixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Sex (๐›พ20)Estimate5.0270.4431.244St. Error0.0840.0230.036t-stat60.119.034.7Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Sex (๐‘ข2๐‘— )Estimate0.5530.6730.0300.007St. Dev.*0.7430.8200.1720.081Chi-square p-value1,331.2168.280.3p-value 0.001 0.001 0.001 0.001 0.001 0.5These estimates roughly equal the results from the other programs, except in theestimate for the random gender effect. Since this effect was so close to zero, theprograms do no report exactly the same value, but all show that it is far fromsignificant.R Resultsmy 2fixedrnd - lmer(popular 1 c extrav c sex (1 c extrav c sex class))summary(my 2rnd)Fixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Sex (๐›พ20)Estimate5.0210.4431.245St. Error0.8410.0230.037Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Sex (๐‘ข2๐‘— )Estimate0.5530.6740.0300.005St. Dev.*0.7440.8210.1730.073t-stat59.718.933.4p-value 0.001 0.001 0.001SPSS ResultsMIXED popular WITH Cextrav Csex/FIXED INTERCEPT Cextrav Csex SSTYPE(3)/METHOD REML/PRINT SOLUTION TESTCOV/RANDOM INTERCEPT Cextrav Csex SUBJECT(class) COVTYPE(UN).20The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialFixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Sex (๐›พ20)Estimate5.0280.4431.244St. Error0.0830.0230.038t-stat60.618.833.1p-value 0.001 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Sex (๐‘ข2๐‘— )Estimate0.5540.6540.0300.008St. e 0.001 0.001 0.0010.71021The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialMplus ResultsTITLE: HLM Popular Data - Unconditional ModelDATA: FILE IS C:\popular mplus.csv;VARIABLE: NAMES ARE pupil class extrav sex texp popular popteach ZextravZsex Ztexp Zpopular Zpopteach Cextrav Ctexp Csex;USEVARIABLES ARE class popular Cextrav Csex;WITHIN Cextrav Csex;CLUSTER class;ANALYSIS: TYPE twolevel random;MODEL: %WITHIN%randoms1 popular ON Cextrav;randoms2 popular ON Csex;%BETWEEN%popular;OUTPUT: sampstat;Fixed EffectsIntercept (๐›พ00)Extraversion (๐›พ10 )Sex (๐›พ20)Estimate5.0310.4411.254St. Error0.0830.0240.036t-stat60.618.335.3p-value 0.001 0.001 0.001Variance ComponentsResidual (๐‘’๐‘–๐‘— )Intercept (๐‘ข0๐‘— )Extraversion (๐‘ข1๐‘— )Sex (๐‘ข2๐‘— )Estimate0.5520.6470.0310.005St. e 0.001 0.001 0.0010.8This time we included two latent slope variables in the WITHIN statement tospecify Extrav and Sex as a random factors. We can interpret the output forโ€œrandoms1โ€ as the estimates for Extrav and โ€œrandoms2โ€ as the estimates for Sex.The output from Mplus for this model has estimates that are further away from theother programs that in the previous models. We see that as the model must estimatemore random parameters, the difference in estimation procedures (ML vs. REML)become more apparent. However, Mplus agrees with the other programs that allestimates except the random variance component of Sex are highly significant.22The Department of Statistics and Data Sciences, The University of Texas at Austin

Multilevel Modeling TutorialModel SummaryFor a random effect with a variance very close to zero, the six programs handle the estimate indifferent ways. SAS and Stata were unable to report the standard errors or p-values of therandom effects, while the others had fairly different values for both the estimates and thestandard errors. The Mplus results also show greater differences than in the previous models.The ICC for this model is:๐œŒ . 654 0.542. 654 .553Again, the ICC has increased slightly as we add another student-level effect, including arandom slope, into the model.One Level-2 Factor and Two Random Level-1 Factors (No Interactions)Mixed Model๐‘ƒ๐‘œ๐‘๐‘ข๐‘™๐‘Ž๐‘Ÿ๐‘–๐‘— ๐›พ00 ๐›พ01 ๐‘ป๐’†๐’™๐’‘๐’‹

%WITHIN% โ€“ Level-1 fixed factors (non-random slope) 2. %WITHIN% with latent slope variable โ€“ Level-1 random factors 3. %BETWEEN% โ€“ Level-2 fixed factors 4. Donโ€™t specify in either statement โ€“ Variables measured at the student level but with a Level-1 and Level

Related Documents:

POStERallows manual ordering and automated re-ordering on re-execution pgm1.sas pgm2.sas pgm3.sas pgm4.sas pgm5.sas pgm6.sas pgm7.sas pgm8.sas pgm9.sas pgm10.sas pgm1.sas pgm2.sas pgm3.sas pgm4.sas pgm5.sas pgm6.sas pgm7.sas pgm8.sas pgm9.sas pgm10.sas 65 min 45 min 144% 100%

SAS OLAP Cubes SAS Add-In for Microsoft Office SAS Data Integration Studio SAS Enterprise Guide SAS Enterprise Miner SAS Forecast Studio SAS Information Map Studio SAS Management Console SAS Model Manager SAS OLAP Cube Studio SAS Workflow Studio JMP Other SAS analytics and solutions Third-party Data

Both SAS SUPER 100 and SAS SUPER 180 are identified by the โ€œSAS SUPERโ€ logo on the right side of the instrument. The SAS SUPER 180 air sampler is recognizable by the SAS SUPER 180 logo that appears on the display when the operator turns on the unit. Rev. 9 Pg. 7File Size: 1MBPage Count: 40Explore furtherOperating Instructions for the SAS Super 180www.usmslab.comOPERATING INSTRUCTIONS AND MAINTENANCE MANUALassetcloud.roccommerce.netAir samplers, SAS Super DUO 360 VWRuk.vwr.comMAS-100 NT Manual PDF Calibration Microsoft Windowswww.scribd.comโ€œSAS SUPER 100/180โ€, โ€œDUO SAS SUPER 360โ€, โ€œSAS .archive-resources.coleparmer Recommended to you b

Stata is available in several versions: Stata/IC (the standard version), Stata/SE (an extended version) and Stata/MP (for multiprocessing). The major difference between the versions is the number of variables allowed in memory, which is limited to 2,047 in standard Stata/IC, but can be much larger in Stata/SE or Stata/MP. The number of

MasterSeal HLM 5000 is a one-component, moisture-curing, bitumen-modified polyurethane elastomeric waterproofing membrane for exterior below-grade or between-slab applications. It is available in four grades: MasterSeal HLM 5000 SL (self-leveling/squeegee) MasterSeal HLM 5000 S (spray) MasterSeal HLM 5000 T (trowel) MasterSeal HLM 5000 R (roller)

MasterSeal HLM 5000 SL, HLM 5000 S y HLM 5000 R: cubetas de 18.95 L (5 gal) y tambores de 208 L (55 gal) disponible por pedido MasterSeal HLM 5000 T: cubetas de 18.95 L (5 gal) MasterSeal 995 (Sonoshield Reinforcing Fabric): rollos de 91 por 0.9 m (300 ft

Categorical Data Analysis Getting Started Using Stata Scott Long and Shawna Rohrman cda12 StataGettingStarted 2012โ€05โ€11.docx Getting Started Using Stata โ€“ May 2012 โ€“ Page 2 Getting Started in Stata Opening Stata When you open Stata, the screen has seven key parts (This is Stata 12. Some of the later screen shots .

Both SAS SUPER 100 and SAS SUPER 180 are identified by the โ€œSAS SUPER 100โ€ logo on the right side of the instrument. International pbi S.p.AIn ยซ Sas Super 100/180, Duo Sas 360, Sas Isolator ยป September 2006 Rev. 5 8 The SAS SUPER 180 air sampler is recognisable by the SAS SUPER 180 logo that appears on the display when the .File Size: 1019KB