10.07.2015 Views

New Developments in Mplus Version 7: Part 2 - Muthén & Muthén

New Developments in Mplus Version 7: Part 2 - Muthén & Muthén

New Developments in Mplus Version 7: Part 2 - Muthén & Muthén

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7:<strong>Part</strong> 2Bengt <strong>Muthén</strong> & Tihomir Asparouhov<strong>Mplus</strong>www.statmodel.comPresentation at Johns Hopk<strong>in</strong>s UniversityAugust 2012Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 1/ 159


Table of Contents I1 Two-Level Random Load<strong>in</strong>gs <strong>in</strong> IRT: The PISA Data2 Two-Level Random Load<strong>in</strong>gs: Individual Differences FactorAnalysis3 Advances <strong>in</strong> Mixture Model<strong>in</strong>g: 3-Step Mixture Model<strong>in</strong>g4 Advances <strong>in</strong> Mixture Model<strong>in</strong>g: Latent Transition AnalysisSimplificationsLTA Example 1: Stage-Sequential Development <strong>in</strong> Read<strong>in</strong>gUs<strong>in</strong>g ECLS-K DataLTA Example 2: Mover-Stayer LTA Model<strong>in</strong>g of PeerVictimization Dur<strong>in</strong>g Middle SchoolLatent Transition Probabilities: TECH15The LTA CalculatorProbability ParameterizationMover-Stayer LTAMover-Stayer LTA <strong>in</strong> Probability Parameterization5 Advances <strong>in</strong> Mixture Model<strong>in</strong>g: Exploratory LCA Us<strong>in</strong>g BayesianAnalysisBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 2/ 159


Table of Contents II6 3-Level AnalysisTypes of Observed Variables and Random Slopes for 3-LevelAnalysis3-Level Regression3-Level Regression: Nurses Data3-Level Path Analysis: UG Example 9.213-Level MIMIC Analysis3-Level Growth AnalysisTYPE=THREELEVEL COMPLEX3-Level and Cross-Classified Multiple Imputation7 Cross-Classified AnalysisCross-Classified RegressionCross-Classified Regression: UG Example 9.24Cross-Classified Regression: Pupcross DataCross-Classified Path Analysis: UG Example 9.25Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 3/ 159


Two-Level Random Load<strong>in</strong>gs In IRT: The PISA DataFox, J.-P., and A. J. Verhagen (2011). Random item effectsmodel<strong>in</strong>g for cross-national survey data. In E. Davidov & P.Schmidt, and J. Billiet (Eds.), Cross-cultural Analysis: Methodsand ApplicationsFox (2010). Bayesian Item Response Model<strong>in</strong>g. Spr<strong>in</strong>gerProgram for International Student Assessment (PISA 2003)9,769 students across 40 countries8 quantitative math itemsBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 4/ 159


Random Load<strong>in</strong>gs In IRTY ijk - outcome for student i, <strong>in</strong> country j and item kP(Y ijk = 1) = Φ(a jk θ ij + b jk )a jk ∼ N(a k ,σ a,k ),b jk ∼ N(b k ,σ b,k )Both discrim<strong>in</strong>ation (a) and difficulty (b) vary across countryThe θ ability factor is decomposed asθ ij = θ j + ε ijθ j ∼ N(0,v),ε ij ∼ N(0,v j ), √ v j ∼ N(1,σ)The mean and variance of the ability vary across countryFor identification purposes the mean of √ v j is fixed to 1, thisreplaces the traditional identification condition that v j = 1Model preserves common measurement scale whileaccommodat<strong>in</strong>g measurement non-<strong>in</strong>variance as long as thevariation <strong>in</strong> the load<strong>in</strong>gs is not bigBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 5/ 159


Random Load<strong>in</strong>gs In IRT, Outl<strong>in</strong>eThree two-level factor models with random load<strong>in</strong>gsTest<strong>in</strong>g for significance of the random load<strong>in</strong>gsTwo methods for add<strong>in</strong>g cluster specific factor variance <strong>in</strong>addition to the random load<strong>in</strong>gsAll models can be used with cont<strong>in</strong>uous outcomes as wellBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 6/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>uedModel 1 - without cluster specific factor variance, cluster specificdiscrim<strong>in</strong>ation, cluster specific difficulty, cluster specific factormeanP(Y ijk = 1) = Φ(a jk θ ij + b jk )a jk ∼ N(a k ,σ a,k ),b jk ∼ N(b k ,σ b,k )θ ij = θ j + ε ijε ij ∼ N(0,1)θ j ∼ N(0,v)Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 7/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>uedNote that cluster specific factor variance is confounded withcluster specific factor load<strong>in</strong>gs (it is not straight forward toseparate the two). Ignor<strong>in</strong>g cluster specific factor varianceshould not lead to misfit. It just <strong>in</strong>creases variation <strong>in</strong> the factorload<strong>in</strong>gs which absorb the variation <strong>in</strong> the factor varianceModel 1 setup <strong>in</strong> <strong>Mplus</strong>: the factor f is used on both levels torepresent the with<strong>in</strong> ε ij and the between θ j part of the factorAll between level components are estimated as <strong>in</strong>dependent.Dependence can be <strong>in</strong>troduced by add<strong>in</strong>g factor models on thebetween level or covariancesBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 8/ 159


PISA Results - Discrim<strong>in</strong>ation (Mean Of Random Load<strong>in</strong>gs)and DifficultyBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 9/ 159


PISA Results - Random Variation Across CountriesBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 10/ 159


Country Specific Mean Ability ParameterFactor scores can be obta<strong>in</strong>ed for the mean ability parameter us<strong>in</strong>g thecountry specific factor load<strong>in</strong>gs. Highest and lowest 3 countries.Country Estimate and confidence limitsFIN 0.749 ( 0.384 , 0.954 )KOR 0.672 ( 0.360 , 0.863 )MAC 0.616 ( 0.267 , 1.041 )BRA -0.917 ( -1.166 , -0.701 )IDN -1.114 ( -1.477 , -0.912 )TUN -1.156 ( -1.533 , -0.971 )Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 11/ 159


Country Specific Distribution For The Mean Ability ParameterFor FINBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 12/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>uedRandom load<strong>in</strong>gs have small variances, however even smallvariance of 0.01 implies a range for the load<strong>in</strong>g of 4*SD=0.4,i.e., substantial variation <strong>in</strong> the load<strong>in</strong>gs across countriesHow can we test significance for the variance components? Ifvariance is not near zero the confidence <strong>in</strong>tervals are reliable.However, when the variance is near 0 the confidence <strong>in</strong>tervaldoes not provide evidence for statistical significanceExample: Var(S2)=0.078 with confidence <strong>in</strong>terval [0.027,0.181]is significant but Var(S7)=0.006 with confidence <strong>in</strong>terval[0.001,0.027] is not clear. Caution: if the number of clusters onthe between level is small all these estimates will be sensitive tothe priorBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 13/ 159


Test<strong>in</strong>g For Non-Zero Variance Of Random Load<strong>in</strong>gsVerhagen & Fox (2012) Bayesian Tests of MeasurementInvarianceTest the null hypothesis σ = 0 us<strong>in</strong>g Bayesian methodologySubstitute null hypothesis σ < 0.001Estimate the model with σ prior IG(1,0.005) with mode 0.0025(If we push the variances to zero with the prior, would the dataprovide any resistance?)BF = P(H 0) P(σ < 0.001|data) P(σ < 0.001|data)= =P(H 1 ) P(σ < 0.001)0.7%BF > 3 <strong>in</strong>dicates load<strong>in</strong>g has 0 variance, i.e., load<strong>in</strong>g <strong>in</strong>varianceBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 14/ 159


Test<strong>in</strong>g For Non-Zero Variance Of Random Load<strong>in</strong>gsOther cutoff values are possible such as 0.0001 or 0.01Implemented <strong>in</strong> <strong>Mplus</strong> <strong>in</strong> Tech16Estimation should be done <strong>in</strong> two steps. First estimate a modelwith non-<strong>in</strong>formative priors. Second <strong>in</strong> a second run estimate themodel with IG(1,0.005) variance prior to test the significanceHow well does this work? The problem of test<strong>in</strong>g for zerovariance components is difficult. ML T-test or LRT doesn’tprovide good solution because it is a borderl<strong>in</strong>e test<strong>in</strong>g<strong>New</strong> method which is not studied well but there is no alternativeparticularly for the case of random load<strong>in</strong>gs. The randomload<strong>in</strong>g model can not be estimated with ML due to too manydimensions of numerical <strong>in</strong>tegrationBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 15/ 159


Test<strong>in</strong>g For Non-Zero Variance Of Random Load<strong>in</strong>gsSimulation: Simple factor analysis model with 5 <strong>in</strong>dicators,N=2000, variance of factor is free, first load<strong>in</strong>g fixed to 1.Simulate data with Var(f)=0.0000001. Us<strong>in</strong>g different BITERcommands with different number of m<strong>in</strong> iterationsBITER=100000; rejects the non-zero variance hypothesis 51%of the timeBITER=100000(5000); rejects the non-zero variance hypothesis95% of the timeBITER=100000(10000); rejects the non-zero variancehypothesis 100% of the timeConclusion: The variance component test needs good number ofiterations due to estimation of tail probabilitiesPower: if we generate data with Var(f)=0.05, the power to detectsignificantly non-zero variance component is 50% comparable toML T-test of 44%Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 16/ 159


Test<strong>in</strong>g For Non-Zero Variance Of Random Load<strong>in</strong>gsIn The PISA ModelAdd IG(1,0.005) prior for the variances we want to testBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 17/ 159


Test<strong>in</strong>g For Non-Zero Variance Of Random Load<strong>in</strong>gsIn The PISA ModelBayes factor greater than 3 <strong>in</strong> any column <strong>in</strong>dicatenon-significance (at the correspond<strong>in</strong>g level). Fort example,Bayes factor greater than 3 <strong>in</strong> the second column <strong>in</strong>dicatesvariance is less than 0.001.Bayes factor=10 <strong>in</strong> column 3 means that a model with variancesmaller than 0.001 is 10 times more likely than a model withnon-zero varianceThe small variance prior that is used applies to a particularvariance threshold hypothesis. For example, if you want to testthe hypothesis v < 0.001, use the prior v ∼ IG(1,0.005), and lookfor the results <strong>in</strong> the second column. If you want to test thehypothesis v < 0.01, use the prior v ∼ IG(1,0.05), and look forthe results <strong>in</strong> the third column.Parameters 9-16 variances of the difficulty parametersParameters 26-33 variances of the discrim<strong>in</strong>ation parametersBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 18/ 159


Results: Tech16Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 19/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>uedEstimate a model with fixed and random load<strong>in</strong>gs. Load<strong>in</strong>g 3 is now afixed parameter rather than random.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 20/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>uedModel 2 - Between level factor has different (non-random)load<strong>in</strong>gsP(Y ijk = 1) = Φ(a jk θ ij + c k θ j + b jk )a jk ∼ N(a k ,σ a,k ),b jk ∼ N(b k ,σ b,k )θ ij ∼ N(0,1)θ j ∼ N(0,1)Model 2 doesn’t have the <strong>in</strong>terpretation that θ j is the betweenpart of the θ ij s<strong>in</strong>ce the load<strong>in</strong>gs are differentBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 21/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>uedModel 3 - Between level factor has load<strong>in</strong>gs equal to the mean ofthe random load<strong>in</strong>gsP(Y ijk = 1) = Φ(a jk θ ij + a k θ j + b jk )a jk ∼ N(a k ,σ a,k ),b jk ∼ N(b k ,σ b,k )θ ij ∼ N(0,1)θ j ∼ N(0,v)Model 3 has the <strong>in</strong>terpretation that θ j is approximately thebetween part of the θ ijModel 3 is nested with<strong>in</strong> Model 2 and can be tested by test<strong>in</strong>gthe proportionality of between and with<strong>in</strong> load<strong>in</strong>gsBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 22/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>uedModel 3 setup. The with<strong>in</strong> factor f now represents only θ ij , fbrepresents θ j .Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 23/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>ued:Add<strong>in</strong>g Cluster Specific Factor Variance: Method 1Replace Var(θ ij ) = 1 with Var(θ ij ) = 0.51 + (0.7 + σ j ) 2 where σ j is azero mean cluster level random effect. The constant 0.51 is needed toavoid variances fixed to 0 which cause poor mix<strong>in</strong>g. This approachcan be used for any variance component on the with<strong>in</strong> level.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 24/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>ued:Add<strong>in</strong>g Cluster Specific Factor Variance: Method 2Variability <strong>in</strong> the load<strong>in</strong>gs is confounded with variability <strong>in</strong> thefactor varianceA model is needed that can naturally separate theacross-<strong>in</strong>dividual variation <strong>in</strong> the factor load<strong>in</strong>gs and theacross-<strong>in</strong>dividual variation <strong>in</strong> the factor varianceFrom a practical perspective we want to have as much variation<strong>in</strong> the factor variance and as little as possible <strong>in</strong> the factorload<strong>in</strong>gs to pursue the concept of measurement <strong>in</strong>variance orapproximate measurement <strong>in</strong>varianceReplace Var(θ ij ) = 1 with Var(θ ij ) = (1 + σ j ) 2 where σ j is a zeromean cluster level random effect. This model is equivalent tohav<strong>in</strong>g Var(θ ij ) = 1 and the discrim<strong>in</strong>ation parameters asa jk = (1 + σ j )(a k + ε jk )Because σ j and ε jk are generally small, the product σ j · ε jk is ofsmaller magnitude so it is ignoredBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 25/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>ued:Add<strong>in</strong>g Cluster Specific Factor Variance: Method 2Factor analysis estimation tends to absorb most of the correlationbetween the <strong>in</strong>dicators with<strong>in</strong> the factor model and to m<strong>in</strong>imizethe residual variancesThus the model will try to expla<strong>in</strong> as much as possible thevariation between the correlation matrices across <strong>in</strong>dividual as avariation <strong>in</strong> the factor variance rather than as a variation <strong>in</strong> thefactor load<strong>in</strong>gs.Thus this model is ideal for evaluat<strong>in</strong>g and separat<strong>in</strong>g the load<strong>in</strong>gnon-<strong>in</strong>variance and the factor variance non-<strong>in</strong>varianceTest<strong>in</strong>g Var(ε jk ) = 0 is essentially a test for measurement<strong>in</strong>variance. Test<strong>in</strong>g Var(σ j ) = 0 is essentially a test for factorvariance <strong>in</strong>variance across the clusterBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 26/ 159


Random Load<strong>in</strong>gs In IRT Cont<strong>in</strong>ued:Add<strong>in</strong>g Cluster Specific Factor Variance: Method 2Method 2 setup. Optimal <strong>in</strong> terms of mix<strong>in</strong>g and convergence.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 27/ 159


Random Load<strong>in</strong>gs In IRTAsparouhov & <strong>Muthén</strong> (2012). General Random Effect LatentVariable Model<strong>in</strong>g: Random Subjects, Items, Contexts, andParameters.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 28/ 159


Two-Level Random Load<strong>in</strong>gs:Individual Differences Factor AnalysisJahng S., Wood, P. K.,& Trull, T. J., (2008). Analysis ofAffective Instability <strong>in</strong> Ecological Momentary Assessment:Indices Us<strong>in</strong>g Successive Difference and Group Comparison viaMultilevel Model<strong>in</strong>g. Psychological Methods, 13, 354-375An example of the grow<strong>in</strong>g amount of EMA data84 borderl<strong>in</strong>e personality disorder (BPD) patients. The moodfactor for each <strong>in</strong>dividual is measured with 21 self-ratedcont<strong>in</strong>uous items. Each <strong>in</strong>dividual is measured several times aday for 4 weeks for total of about 100 assessmentsFactor analysis is done as a two-level model wherecluster=<strong>in</strong>dividual, many assessments per clusterBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 29/ 159


Individual Differences Factor AnalysisThis data set is perfect to check if a measurement <strong>in</strong>strument is<strong>in</strong>terpreted the same way by different <strong>in</strong>dividuals. Some<strong>in</strong>dividuals response may be more correlated for some items, i.e.,the factor analysis should be different for different <strong>in</strong>dividuals.Example: suppose that one <strong>in</strong>dividual answers item 1 and 2always the same way and a second <strong>in</strong>dividual doesn’t. We needseparate factor analysis models for the two <strong>in</strong>dividuals,<strong>in</strong>dividually specific factor load<strong>in</strong>gs.If the with<strong>in</strong> level correlation matrix varies across cluster thatmeans that the load<strong>in</strong>gs are <strong>in</strong>dividually specificShould <strong>in</strong> general factors load<strong>in</strong>gs be <strong>in</strong>dividually specific? Thisanalysis can NOT be done <strong>in</strong> cross-sectional studies, onlylongitud<strong>in</strong>al studies with multiple assessmentsBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 30/ 159


Individual Differences Factor AnalysisLarge across-time variance of the mood factor is considered acore feature of BPD that dist<strong>in</strong>guishes this disorder from otherdisorders like depressive disorders.The <strong>in</strong>dividual-specific factor variance is the most importantfeature <strong>in</strong> this studyThe <strong>in</strong>dividual-specific factor variance is confounded with<strong>in</strong>dividual-specific factor load<strong>in</strong>gsHow to separate the two? Answer: Factor Model for theRandom Factor Load<strong>in</strong>gs as <strong>in</strong> the PISA dataBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 31/ 159


Individual Differences Factor AnalysisLet Y pij be item p, for <strong>in</strong>dividual i, at assessment j. Let X i be an<strong>in</strong>dividual covariate. The model is given byY pij = µ p + ζ pi + s pi η ij + ε pijη ij = η i + β 1 X i + ξ ijs pi = λ p + λ p σ i + ε piσ i = β 2 X i + ζ iβ 1 and β 2 represent the effect of the covariate X on the mean and thevariance of the mood factor.IDFA has <strong>in</strong>dividually specific: item mean, item load<strong>in</strong>g, factormean, factor variance.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 32/ 159


Individual Differences Factor Analysis Model SetupMany different ways to set up this model <strong>in</strong> <strong>Mplus</strong>. The setup belowgives the best mix<strong>in</strong>g/convergence performance.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 33/ 159


Individual Differences Factor Analysis ResultsAll variance components are significant. Percent Load<strong>in</strong>g Invariance= the percentage of the variation of the load<strong>in</strong>gs that is expla<strong>in</strong>ed byfactor variance variation.Var Var PercentRes of of Load<strong>in</strong>gitem Var Mean Mean Load<strong>in</strong>g Load<strong>in</strong>g InvarianceItem 1 0.444 1.505 0.287 0.261 0.045 0.29Item 2 0.628 1.524 0.482 0.377 0.080 0.32Item 3 0.331 1.209 0.057 0.556 0.025 0.77Item 4 0.343 1.301 0.097 0.553 0.030 0.73Item 5 0.304 1.094 0.017 0.483 0.053 0.54Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 34/ 159


Individual Differences Factor Analysis ConclusionClear evidence that measurement items are not <strong>in</strong>terpreted thesame way by different <strong>in</strong>dividuals and thus <strong>in</strong>dividual-specificadjustments are needed to the measurement model to properlyevaluate the underly<strong>in</strong>g factors: IDFA modelIDFA model clearly separates factor variance variation from thefactor load<strong>in</strong>gs variationAsparouhov & <strong>Muthén</strong>, B. (2012). General Random EffectLatent Variable Model<strong>in</strong>g: Random Subjects, Items, Contexts,and ParametersBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 35/ 159


Advances <strong>in</strong> Mixture Model<strong>in</strong>g: 3-Step Mixture Model<strong>in</strong>g1-step analysis versus 3-step analysis (analyze-classify-analyze)Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 36/ 159


Critique of 1-Step: Vermunt (2010)However, the one-step approach has certa<strong>in</strong> disadvantages.The first is that it may sometimes be impractical, especiallywhen the number of potential covariates is large, as willtypically be the case <strong>in</strong> a more exploratory study. Each timethat a covariate is added or removed not only the predictionmodel but also the measurement model needs to bereestimated. A second disadvantage is that it <strong>in</strong>troducesadditional model build<strong>in</strong>g problems, such as whether oneshould decide about the number of classes <strong>in</strong> a model withor without covariates. Third, the simultaneous approachdoes not fit with the logic of most applied researchers, whoview <strong>in</strong>troduc<strong>in</strong>g covariates as a step that comes after theclassification model has been built. Fourth, it assumes thatthe classification model is built <strong>in</strong> the same stage of a studyas the model used to predict the class membership, which isnot necessarily the case.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 37/ 159


Critique of 1-Step: An ExampleExample: Study of genotypes <strong>in</strong>fluenc<strong>in</strong>g phenotypes.Phenotypes may be observed <strong>in</strong>dicators of mental illness such as DSMcriteria. The <strong>in</strong>terest is <strong>in</strong> f<strong>in</strong>d<strong>in</strong>g latent classes of subjects and thentry<strong>in</strong>g to see if certa<strong>in</strong> genotype variables <strong>in</strong>fluence class membership.Possible objection to 1-step: If the genotypes are part of decid<strong>in</strong>g thelatent classes, the assessment of the strength of relationship iscompromised.3-step: Determ<strong>in</strong>e the latent classes based on only phenotype<strong>in</strong>formation. Then classify subjects. Then relate the classification tothe genotypes.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 38/ 159


Advantage of 1-Step Over 3-StepLow-entropy and/or small-sample cases are better handled by 1-stepDirect effects from covariates to latent class <strong>in</strong>dicators and/or distaloutcomes may be better handled by 1-step (?)Prediction from covariates to latent classes and from latent classes todistal outcomes is better handled by 1-stepBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 39/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>gHow do we explore a relationship between a latent class variableC and another observed variable X?1-step ML approach: Estimate the jo<strong>in</strong>t model = measurementmodel (such as LCA) and the C on X model togetherDrawback: Often the latent class formation is affected by X. Thelatent class variable will not have the <strong>in</strong>tended mean<strong>in</strong>gFor example, if there is a direct effect from X to an <strong>in</strong>dicatorvariable the class formation will change if X is <strong>in</strong>cluded <strong>in</strong> themodelHow can we estimate the C on X relationship <strong>in</strong>dependently ofthe measurement model?Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 40/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>g: The 3-StepApproachPrior to <strong>Mplus</strong> <strong>Version</strong> 7: Pseudo class (PC) approach. EstimateLCA model, impute C, regress imputed C on X<strong>New</strong> improved method <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7: 3-step approach1 Estimate the LCA model2 Create a nom<strong>in</strong>al most likely class variable N3 Use a mixture model for N, C and X, where N is a C <strong>in</strong>dicatorwith measurement error rates prefixed at the uncerta<strong>in</strong>ty rate of Nestimated <strong>in</strong> the step 1 LCA analysis<strong>Mplus</strong> Web Note 15. Asparouhov and <strong>Muthén</strong> (2012). AuxiliaryVariables <strong>in</strong> Mixture Model<strong>in</strong>g: A 3-Step Approach Us<strong>in</strong>g <strong>Mplus</strong>Vermunt (2010). Latent Class Model<strong>in</strong>g with Covariates: TwoImproved Three-Step Approaches. Political Analysis, 18,450-469Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 41/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>g: 5 OptionsAUXILIARY=X(r); estimates C on X regression us<strong>in</strong>g PCmethodAUXILIARY=Y(e); estimates Y on C, distal outcome model,estimates different mean parameter for Y <strong>in</strong> each classAUXILIARY=X(r3step); estimates C on X regression us<strong>in</strong>g the3-step methodAUXILIARY=Y(du3step); estimates Y on C distal outcomemodel, assum<strong>in</strong>g unequal variance of Y <strong>in</strong> each class, us<strong>in</strong>g the3-step methodAUXILIARY=Y(de3step); estimates Y on C distal outcomemodel, assum<strong>in</strong>g equal variance of Y <strong>in</strong> each class, us<strong>in</strong>g the3-step methodBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 42/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>g: Distal OutcomesSimulationLCA with 2 classes and 5 b<strong>in</strong>ary <strong>in</strong>dicators. Mean of Y <strong>in</strong> class 1 is 0and <strong>in</strong> class 2 is 0.7.Bias/MSE/CoverageN Entropy PC 3-step 1-step500 0.7 .10/.015/.76 .01/.007/.93 .00/.006/.94500 0.6 .16/.029/.50 .01/.009/.92 .00/.007/.94500 0.5 .22/.056/.24 .02/.036/.80 .01/.012/.962000 0.7 .10/.011/.23 .02/.002/.91 .00/.002/.932000 0.6 .15/.025/.03 .03/.003/.86 .00/.002/.942000 0.5 .22/.051/.00 .00/.015/.76 .00/.003/.94Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 43/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>g: Distal OutcomesSimulationThe 3-step procedure outperforms the PC procedure substantially<strong>in</strong> terms of bias, mean squared error and confidence <strong>in</strong>tervalcoverageThe 3-step procedure procedure loss of efficiency is notsubstantial when compared to the 1-step procedure when theclass separation is not poor (entropy of 0.6 or higher)The 3-step procedure with unequal variance is better than the3-step procedure with equal variance when the equal varianceassumption doesn’t hold.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 44/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>g: Latent ClassPredictor SimulationLCA with 2 classes and 5 b<strong>in</strong>ary <strong>in</strong>dicators. C on X is 0.5.Bias/MSE/CoverageN Entropy PC 3-step 1-step500 0.7 .13/.023/.84 .01/.015/.96 .01/.014/.95500 0.6 .20/.044/.59 .00/.020/.95 .01/.017/.96500 0.5 .28/.083/.24 .01/.035/.95 .03/.028/.972000 0.7 .13/.019/.24 .00/.004/.93 .00/.004/.942000 0.6 .20/.042/.01 .00/.004/.96 .00/.004/.942000 0.5 .29/.085/.00 .01/.010/.93 .01/.006/.95Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 45/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>g: Latent ClassPredictor SimulationThe 3-step procedure aga<strong>in</strong> outperforms the PC proceduresubstantially <strong>in</strong> terms of bias, mean squared error and confidence<strong>in</strong>terval coverageThe efficiency of the 3-step procedure is comparable to the1-step method when the entropy is 0.6 or higherBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 46/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>g: Other ApproachesClark & <strong>Muthén</strong> (2009). Relat<strong>in</strong>g latent class analysis results tovariables not <strong>in</strong>cluded <strong>in</strong> the analysisExtensive simulation of other methods, such as Most LikelyClass Membership Regression, Probability Regression,Probability-Weighted Regression, even Bayes Imputations, showthat all these methods have biased estimatesBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 47/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>g: Latent ClassPredictor ExampleBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 48/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>g: Latent ClassPredictor ExampleBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 49/ 159


Auxiliary Variables In Mixture Model<strong>in</strong>gThe latent class variable can be identified by any mixture model,not just LCA, for example Growth Mixture ModelsMultiple auxiliary variables can be analyzed at the same timeAuxiliary variables can be <strong>in</strong>cluded <strong>in</strong> a Montecarlo setupThe 3-step procedure can be setup manually for other types ofmodels, different from the distal outcome model and the latentclass regression. For example, distal outcomes regressed on thelatent class variable and another predictorBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 50/ 159


3-Step Mixture Model<strong>in</strong>g For Special ModelsHow can we estimate a mixture regression model <strong>in</strong>dependentlyof the LCA model that def<strong>in</strong>es CY = α c + β c X + εWe simulate data with α 1 = 0, α 2 = 1, β 1 = 0.5, β 2 = −0.5Step 1: Estimate the LCA model (without the auxiliary model)with the follow<strong>in</strong>g optionSAVEDATA: FILE=1.dat; SAVE=CPROB;The above option creates the most likely class variable NStep 2: Compute the error rate for N. In the LCA output f<strong>in</strong>dBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 51/ 159


3-Step Mixture Model<strong>in</strong>g For Special ModelsCompute the nom<strong>in</strong>al variable N parameterslog(0.835/0.165) = 1.621486log(0.105/0.895) = −2.14286Step 3: estimate the model where N is a latent class <strong>in</strong>dicatorwith the above fixed parameters and <strong>in</strong>clude the class specific Yon X modelWhen the class separation <strong>in</strong> the LCA is pretty good then N isalmost a perfect C <strong>in</strong>dicatorBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 52/ 159


3-Step Mixture Model<strong>in</strong>g For Special ModelsBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 53/ 159


3-Step Mixture Model<strong>in</strong>g For Special Models F<strong>in</strong>al ResultsBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 54/ 159


Latent Transition Analysis<strong>New</strong> developments <strong>in</strong> <strong>Version</strong> 7:TECH15 output with conditional class probabilities useful forstudy<strong>in</strong>g transition probabilities with an observed b<strong>in</strong>arycovariate such as treatment/control or a latent class covariateLTA transition probability calculator for cont<strong>in</strong>uous covariatesProbability parameterization to simplify <strong>in</strong>put for Mover-StayerLTA and other models with restrictions on the transitionprobabilitiesBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 55/ 159


LTA Example 1: Stage-Sequential Development <strong>in</strong> Read<strong>in</strong>gUs<strong>in</strong>g ECLS-K DataKaplan (2008). An overview of Markov cha<strong>in</strong> methods for the studyof stage-sequential developmental processes. DevelopmentalPsychology, 44, 457-467.Early Childhood Longitud<strong>in</strong>al Study - K<strong>in</strong>dergarten cohortFour time po<strong>in</strong>ts: K<strong>in</strong>dergarten Fall, Spr<strong>in</strong>g and Grade 1 Fall,Spr<strong>in</strong>g; n = 3,575Five dichotomous proficiency scores: Letter recognition,beg<strong>in</strong>n<strong>in</strong>g sounds, end<strong>in</strong>g letter sounds, sight words, words <strong>in</strong>contextB<strong>in</strong>ary poverty <strong>in</strong>dexLCA suggests 3 classes: Low alphabet knowledge (LAK), earlyword read<strong>in</strong>g (EWR), and early read<strong>in</strong>g comprehension (ERC)Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 56/ 159


LTA Example 1: ECLS-K, Cont<strong>in</strong>uedThree latent classes:Class 1: Low alphabet knowledge (LAK)Class 2: Early word read<strong>in</strong>g (EWR)Class 3: Early read<strong>in</strong>g comprehension (ERC)The ECLS-K LTA model has the special feature of specify<strong>in</strong>g nodecl<strong>in</strong>e <strong>in</strong> knowledge as zero transition probabilities. For example,transition from K<strong>in</strong>dergarten Fall to Spr<strong>in</strong>g:LATENT TRANSITION PROBABILITIESBASED ON THE ESTIMATED MODELc1 classes (rows) by c2 classes (columns)1 2 31 0.329 0.655 0.0172 0.000 0.646 0.3543 0.000 0.000 1.000Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 57/ 159


LTA Example 1: ECLS-K.Transition Tables for the B<strong>in</strong>ary Covariate Poverty us<strong>in</strong>gTECH15Poverty = 0 (cp=1)c2Poverty = 1 (cp=2)c21 2 3 1 2 31 0.252 0.732 0.017 0.545 0.442 0.013c1 2 0.000 0.647 0.353 0.000 0.620 0.3803 0.000 0.000 1.000 0.000 0.000 1.000Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 58/ 159


LTA Example 2: Mover-Stayer LTA Model<strong>in</strong>g of PeerVictimization Dur<strong>in</strong>g Middle SchoolNylund (2007) Doctoral dissertation: Latent Transition Analysis:Model<strong>in</strong>g Extensions and an Application to Peer VictimizationStudent’s self-reported peer victimization <strong>in</strong> Grade 6, 7, and 8Low SES, ethnically diverse public middle schools <strong>in</strong> the LosAngeles area (11% Caucasian, 17% Black, 48 % Lat<strong>in</strong>o, 12%Asian)n = 20456 b<strong>in</strong>ary items: Picked on, laughed at, called bad names, hit andpushed around, gossiped about, th<strong>in</strong>gs taken or messed up(Neary & Joseph, 1994 Peer Victimization Scale)Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 59/ 159


LTA Example 2: Mover-Stayer ModelClass 1: Victimized (G6-G8: 19%, 10%, 8%)Class 2: Sometimes victimized (G6-G8: 34%, 27%, 21%)Class 3: Non-victimized (G6-G8: 47%, 63%, 71%)Movers (60%)c2 (Grade 7) c3 (Grade 8)0.29 0.45 0.26 0.23 0.59 0.18c1 0.06 0.44 0.51 c2 0.04 0.47 0.49(Grade 6) 0.04 0.46 0.55 (Grade 7) 0.06 0.17 0.77Stayers (40%)c2 (Grade 7) c3 (Grade 8)1 0 0 1 0 0c1 0 1 0 c2 0 1 0(Grade 6) 0 0 1 (Grade 7) 0 0 1Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 60/ 159


Latent Transition Probabilities Influenced by aCategorical Covariate: Us<strong>in</strong>g TECH15Covariate treated as Knownclass<strong>New</strong> feature <strong>in</strong> <strong>Version</strong> 7: TECH 15 output - conditionalprobabilities for ”c ON c”Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 61/ 159


LTA with a B<strong>in</strong>ary Covariate as Knownclass: UG Ex8.13Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 62/ 159


LTA with a B<strong>in</strong>ary Covariate as Knownclass: UG Ex8.13TITLE: this is an example of a LTA with ab<strong>in</strong>ary covariate represent<strong>in</strong>g groupDATA: FILE = ex8.13.dat;VARIABLE: NAMES = u11-u15 u21-u25 g;CATEGORICAL = u11-u15 u21-u25;CLASSES = cg(2) c1(3) c2(3);KNOWNCLASS = cg(g=0 g=1);ANALYSIS: TYPE=MIXTURE;MODEL: %OVERALL%c1 c2 ON cg;MODEL cg: %cg#1%c2 ON c1;%cg#2%c2 ON c1;MODEL c1: %c1#1%[u11$1] (1);[u12$1] (2);[u13$1] (3);[u14$1] (4);[u15$1] (5);Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 63/ 159


ANALYSIS: TYPE=MIXTURE;LTA MODEL: with a B<strong>in</strong>ary %OVERALL% Covariate as Knownclass: UG Ex8.13,c1 c2 ON cg;Cont<strong>in</strong>uedMODEL cg: %cg#1%c2 ON c1;%cg#2%c2 ON c1;MODEL c1: %c1#1%[u11$1] (1);[u12$1] (2);[u13$1] (3);[u14$1] (4);[u15$1] (5);%c1#2%[u11$1] (6);[u12$1] (7);[u13$1] (8);[u14$1] (9);[u15$1] (10);%c1#3%[u11$1] (11);[u12$1] (12);[u13$1] (13);[u14$1] (14);[u15$1] (15);MODEL c2:%c2#1%Bengt <strong>Muthén</strong> [u21$1] & Tihomir (1); Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 64/ 159


%c1#3%LTA with a B<strong>in</strong>ary [u11$1] Covariate (11); as Knownclass: UG Ex8.13,[u12$1] (12);Cont<strong>in</strong>uedMODEL c2:OUTPUT:[u13$1] (13);[u14$1] (14);[u15$1] (15);%c2#1%[u21$1] (1);[u22$1] (2);[u23$1] (3);[u24$1] (4);[u25$1] (5);%c2#2%[u21$1] (6);[u22$1] (7);[u23$1] (8);[u24$1] (9);[u25$1] (10);%c2#3%[u21$1] (11);[u22$1] (12);[u23$1] (13);[u24$1] (14);[u25$1] (15);TECH1 TECH8 TECH15;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 65/ 159


Latent Transition Analysis: Review of Logit ParameterizationConsider the logit parameterization for CLASSES = c1(3) c2(3):c1c21 2 31 a1 + b11 a2 + b21 02 a1 + b12 a2 + b22 03 a1 a2 0where each row shows the coefficients for a mult<strong>in</strong>omial logisticregression of c2 on c1 with the last c2 class as reference class.Zero lower-triangular probabilities are obta<strong>in</strong>ed by fix<strong>in</strong>g the a1, a2,and b12 parameters at the logit value -15. The parameters b11, b21,and b22 are estimated.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 66/ 159


LTA Example 1: ECLS-K, <strong>Mplus</strong> InputTITLE: LTA of K<strong>in</strong>dergarten Fall and Spr<strong>in</strong>g (3 x 3)DATA: FILE = dp.analytic.dat;FORMAT = f1.0, 20f2.0;VARIABLE: NAMES = pov letrec1 beg<strong>in</strong>1 end<strong>in</strong>g1 sight1 wic1letrec2 beg<strong>in</strong>2 end<strong>in</strong>g2 sight2 wic2letrec3 beg<strong>in</strong>3 end<strong>in</strong>g3 sight3 wic3letrec4 beg<strong>in</strong>4 end<strong>in</strong>g4 sight4 wic4;USEVARIABLES = letrec1 beg<strong>in</strong>1 end<strong>in</strong>g1 sight1 wic1letrec2 beg<strong>in</strong>2 end<strong>in</strong>g2 sight2 wic2;! letrec3 beg<strong>in</strong>3 end<strong>in</strong>g3 sight3 wic3! letrec4 beg<strong>in</strong>4 end<strong>in</strong>g4 sight4 wic4;CATEGORICAL = letrec1 beg<strong>in</strong>1 end<strong>in</strong>g1 sight1 wic1letrec2 beg<strong>in</strong>2 end<strong>in</strong>g2 sight2 wic2;! letrec3 beg<strong>in</strong>3 end<strong>in</strong>g3 sight3 wic3! letrec4 beg<strong>in</strong>4 end<strong>in</strong>g4 sight4 wic4;CLASSES = c1(3) c2(3);MISSING = .;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 67/ 159


LTA Example 1: ECLS-K, <strong>Mplus</strong> Input, Cont<strong>in</strong>uedANALYSIS:MODEL:TYPE = MIXTURE;STARTS = 400 80;PROCESSORS = 8;%OVERALL%! fix lower triangular transition probabilities = 0:[c2#1@-15 c2#2@-15]; ! fix a1 = a2 = -15c2#1 ON c1#2@-15; ! fix b12 = -15c2#1 ON c1#1*15; ! start at 15 to make total logit start=0c2#2 ON c1#1-c1#2*15;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 68/ 159


LTA Example 1: ECLS-K, <strong>Mplus</strong> Input, Cont<strong>in</strong>uedMODEL c1:MODEL c2:OUTPUT:PLOT:%c1#1%[letrec1$1-wic1$1] (1-5) ;%c1#2%[letrec1$1-wic1$1] (6-10);%c1#3%[letrec1$1-wic1$1] (11-15);%c2#1%[letrec2$1-wic2$1] (1-5);%c2#2%[letrec2$1-wic2$1] (6-10);%c2#3%[letrec2$1-wic2$1] (11-15);TECH1 TECH15;TYPE = PLOT3;SERIES = letrec1-wic1(*) | letrec2-wic2(*);Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 69/ 159


Output: Latent Transition TableLATENT TRANSITION PROBABILITIESBASED ON THE ESTIMATED MODELc1 classes (rows) by c2 classes (columns)1 2 31 0.329 0.655 0.0172 0.000 0.646 0.3543 0.000 0.000 1.000Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 70/ 159


LTA Example 1: ECLS-K, <strong>Mplus</strong> Input, Add<strong>in</strong>g Poverty asKnownclassANALYSIS:MODEL:MODEL cp:MODEL c1:CLASSES = cp(2) c1(3) c2(3);KNOWNCLASS = cp(pov=0 pov=1);TYPE = MIXTURE;STARTS = 400 80; PROCESSORS = 8(STARTS);%OVERALL%c1 ON cp;[c2#1@-15 c2#2@-15];c2#1 ON c1#2@-15;%cp#1%c2#1 ON c1#1*15;c2#2 ON c1#1-c1#2*15;%cp#2%c2#1 ON c1#1*15;c2#2 ON c1#1-c1#2*15;%c1#1% etc as beforeBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 71/ 159


TECHNICAL 15 OutputP(CP=1)=0.808P(CP=2)=0.192P(C1=1|CP=1)=0.617P(C1=2|CP=1)=0.351P(C1=3|CP=1)=0.032P(C1=1|CP=2)=0.872P(C1=2|CP=2)=0.123P(C1=3|CP=2)=0.005P(C2=1|CP=1,C1=1)=0.252P(C2=2|CP=1,C1=1)=0.732P(C2=3|CP=1,C1=1)=0.017P(C2=1|CP=1,C1=2)=0.000P(C2=2|CP=1,C1=2)=0.647P(C2=3|CP=1,C1=2)=0.353Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 72/ 159


TECHNICAL 15 Output, Cont<strong>in</strong>uedP(C2=1|CP=1,C1=3)=0.000P(C2=2|CP=1,C1=3)=0.000P(C2=3|CP=1,C1=3)=1.000P(C2=1|CP=2,C1=1)=0.545P(C2=2|CP=2,C1=1)=0.442P(C2=3|CP=2,C1=1)=0.013P(C2=1|CP=2,C1=2)=0.000P(C2=2|CP=2,C1=2)=0.620P(C2=3|CP=2,C1=2)=0.380P(C2=1|CP=2,C1=3)=0.000P(C2=2|CP=2,C1=3)=0.000P(C2=3|CP=2,C1=3)=1.000Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 73/ 159


Latent Transition Probabilities Influenced by aCont<strong>in</strong>uous Covariate<strong>Muthén</strong> & Asparouhov (2011). LTA <strong>in</strong> <strong>Mplus</strong>: Transitionprobabilities <strong>in</strong>fluenced by covariates. <strong>Mplus</strong> Web Notes: No.13. July 27, 2011. www.statmodel.com<strong>New</strong> feature <strong>in</strong> <strong>Version</strong> 7: The LTA calculatorBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 74/ 159


Interaction Displayed Two Equivalent WaysBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 75/ 159


Review of Logit Parameterization with Covariates:Parameterization 2MODEL:%OVERALL%c1 ON x;c2 ON c1;MODEL c1:%c1#1%c2#1 ON x (g11);c2#2 ON x (g21);c1c21 2 31 a1 + b11 + g11 x a2 + b21 + g21 x 02 a1 + b12 + g12 x a2 + b22 + g22 x 03 a1 + g13 x a2 + g23 x 0%c1#2%c2#1 ON x (g12);c2#2 ON x (g22);%c1#3%c2#1 ON x (g13);c2#2 ON x (g23);Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 76/ 159


LTA with a Cont<strong>in</strong>uous Covariate: UG Ex8.14TITLE: this is an example of a LTA with acont<strong>in</strong>uous covariateDATA: FILE = ex8.14.dat;VARIABLE: NAMES = u11-u15 u21-u25 x;CATEGORICAL = u11-u15 u21-u25;CLASSES = c1(3) c2(3);ANALYSIS: TYPE=MIXTURE;PROCESSORS = 8;MODEL: %OVERALL%c1 ON x;c2 ON c1;MODEL c1: %c1#1%c2 ON x;[u11$1] (1);[u12$1] (2);[u13$1] (3);[u14$1] (4);[u15$1] (5);Bengt <strong>Muthén</strong> %c1#2% & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 77/ 159


ANALYSIS: TYPE=MIXTURE;LTA with a Cont<strong>in</strong>uous PROCESSORS = Covariate: 8; UG Ex8.14, Cont<strong>in</strong>uedMODEL:%OVERALL%c1 ON x;c2 ON c1;MODEL c1: %c1#1%c2 ON x;[u11$1] (1);[u12$1] (2);[u13$1] (3);[u14$1] (4);[u15$1] (5);%c1#2%c2 ON x;[u11$1] (6);[u12$1] (7);[u13$1] (8);[u14$1] (9);[u15$1] (10);%c1#3%c2 ON x;[u11$1] (11);[u12$1] (12);[u13$1] (13);[u14$1] (14);[u15$1] (15);MODEL c2: %c2#1%[u21$1] (1);[u22$1] (2);Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 78/ 159


[u11$1] (11);LTA with a Cont<strong>in</strong>uous [u12$1] (12); Covariate: UG Ex8.14, Cont<strong>in</strong>ued[u13$1] (13);[u14$1] (14);[u15$1] (15);MODEL c2: %c2#1%[u21$1] (1);[u22$1] (2);[u23$1] (3);[u24$1] (4);[u25$1] (5);%c2#2%[u21$1] (6);[u22$1] (7);[u23$1] (8);[u24$1] (9);[u25$1] (10);%c2#3%[u21$1] (11);[u22$1] (12);[u23$1] (13);[u24$1] (14);PLOT:OUTPUT:[u25$1] (15);TYPE=PLOT3;TECH1 TECH15;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 79/ 159


LTA Example 1: ECLS-K,Add<strong>in</strong>g Poverty as CovariateANALYSIS:USEVARIABLES = letrec1 beg<strong>in</strong>1 end<strong>in</strong>g1 sight1 wic1letrec2 beg<strong>in</strong>2 end<strong>in</strong>g2 sight2 wic2 pov;! letrec3 beg<strong>in</strong>3 end<strong>in</strong>g3 sight3 wic3! letrec4 beg<strong>in</strong>4 end<strong>in</strong>g4 sight4 wic4;CATEGORICAL = letrec1 beg<strong>in</strong>1 end<strong>in</strong>g1 sight1 wic1letrec2 beg<strong>in</strong>2 end<strong>in</strong>g2 sight2 wic2;! letrec3 beg<strong>in</strong>3 end<strong>in</strong>g3 sight3 wic3! letrec4 beg<strong>in</strong>4 end<strong>in</strong>g4 sight4 wic4;CLASSES = c1(3) c2(3);MISSING = .;TYPE = MIXTURE;STARTS = 400 80;PROCESSORS = 8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 80/ 159


LTA Exmple 1: ECLS-K,Add<strong>in</strong>g Poverty as Covariate, Cont<strong>in</strong>uedMODEL:%OVERALL%c1 ON pov;! do c2 ON pov <strong>in</strong> c1-specific model part to get <strong>in</strong>teraction[c2#1@-15 c2#2@-15]; ! to give zero probability of decl<strong>in</strong><strong>in</strong>gc2#1 ON c1#2@-15; ! to give zero probability of decl<strong>in</strong><strong>in</strong>gc2#1 ON c1#1*15;c2#2 ON c1#1-c1#2*15;MODEL c1:%c1#1%c2 ON pov; ! (g11) and (g21)%c1#2%c2#1 ON pov@-15; ! to give zero probability of decl<strong>in</strong><strong>in</strong>g (g12)c2#2 ON pov; ! (g22)! %c1#3% not mentioned due to g13=0, g23=0 by defaultBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 81/ 159


LTA Calculator Applied to PovertyBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 82/ 159


LTA Calculator Applied to Poverty, Cont<strong>in</strong>uedEstimated conditional probabilities for the latent class variables:Condition(s): POV = 1.000000P(C1=1)=0.872P(C1=2)=0.123P(C1=3)=0.005P(C2=1|C1=1)=0.545P(C2=2|C1=1)=0.442P(C2=3|C1=1)=0.013P(C2=1|C1=2)=0.000P(C2=2|C1=2)=0.620P(C2=3|C1=2)=0.380P(C2=1|C1=3)=0.000P(C2=2|C1=3)=0.000P(C2=3|C1=3)=1.000Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 83/ 159


Latent Transition Analysis: Probability ParameterizationLTA models that do not have cont<strong>in</strong>uous x’s can be more convenientlyspecified us<strong>in</strong>g PARAMETERIZATION=PROBABILITY. Considerthe probability parameterization for CLASSES = c1(3) c2(3):c1c21 2 31 p11 p12 02 p21 p22 03 p31 p32 0where the probabilities <strong>in</strong> each row add to 1 and the last c2 class arenot mentioned. The p parameters are referred to us<strong>in</strong>g ON. The latentclass variable c1 which is the predictor has probability parameters[c1#1 c1#2], whereas ”<strong>in</strong>tercept” parameters are not <strong>in</strong>cluded for c2.A transition probability can be conveniently fixed at 1 or 0 by us<strong>in</strong>gthe p parameters.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 84/ 159


LTA Example 1: ECLS-K, <strong>Mplus</strong> Input Us<strong>in</strong>g ProbabilityParameterizationCLASSES = c1(3) c2(3);ANALYSIS:MODEL:TYPE = MIXTURE;STARTS = 400 80;PROCESSORS = 8;PARAMETERIZATION=PROBABILITY;%OVERALL%c2 ON c1; ! frees 6 transition probabilities! fix lower triangular transition probabilities = 0:c2#1 ON c1#2-c1#3@0;c2#2 ON c1#3@0;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 85/ 159


Mover-Stayer LTABengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 86/ 159


Mover-Stayer LTA Model<strong>in</strong>g In Logistic ParameterizationFAQ: 9/23/11: LTA with Movers-Stayers (www.statmodel.com)This uses the regular logit parameterization which is complex forMover-Stayer model<strong>in</strong>g.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 87/ 159


Mover-Stayer LTA <strong>in</strong> Logistic Parameterization:No Covariatesc(2) is the mover-stayer latent class variable:c#1 is the mover class, c#2 is the stayer classc1(3), c2(3), c3(3) are time-specific latent class variablesMODEL:%OVERALL%! Relat<strong>in</strong>g c1, c2, c3 to c: (Movers)c1 c2 c3 ON c;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 88/ 159


! Relat<strong>in</strong>g c2 and c3 to c: (Stayers)[c2#1@-15]; !”a1” - probability of transition<strong>in</strong>g from problem!at time 1 to problem-free at time 2 is fixed!at zero for the stayer class[c2#2@-15];[c3#1@-15 c3#2@-15];!covariates are not used <strong>in</strong> this analysis:! c1#1 c1#2 ON female schsafe2 cdi2 sas2;! c2#1 c2#2 ON female schsafe4 cdi4 sas4;! c3#1 c3#2 ON female schsafe6 cdi6 sas6;! c#1 ON female afam lat<strong>in</strong>o asian birace;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 89/ 159


MODEL C:%c#1% !mover classc2 ON c1;c3 ON c2;%c#2% !stayer classc2#1 ON c1#1@30; !”b11” - stayer class has prob 1 of stay<strong>in</strong>gc2#1 ON c1#2@-45; !b12c2#2 ON c1#1@-45; !b21c2#2 ON c1#2@30; !b22c3#1 ON c2#1@30; !”b11” - stayer class has prob 1 of stay<strong>in</strong>gc3#1 ON c2#2@-45; !b12c3#2 ON c2#1@-45; !b21c3#2 ON c2#2@30; !b22Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 90/ 159


Measurement <strong>Part</strong> of the ModelMODEL C.C1:MODEL C.C2:%c#1.c1#1% !mover[bpvs1b$1- bpvs6b$1*-5] (1-6);%c#1.c1#2%[bpvs1b$1- bpvs6b$1*1] (7-12);%c#1.c1#3%[bpvs1b$1- bpvs6b$1*4] (13-18);%c#2.c1#1% !stayer[bpvs1b$1- bpvs6b$1*-5] (1-6);%c#2.c1#2%[bpvs1b$1- bpvs6b$1*1] (7-12);%c#2.c1#3%[bpvs1b$1- bpvs6b$1*4]] (13-18);%c#1.c2#1%[bpvs1d$1- bpvs6d$1*-5] (1-6);%c#1.c2#2%[bpvs1d$1- bpvs6d$1*1] (7-12);%c#1.c2#3%[bpvs1d$1- bpvs6d$1*4] (13-18);Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 91/ 159


MODEL C.C3:%c#2.c2#1%[bpvs1d$1- bpvs6d$1*-5] (1-6);%c#2.c2#2%[bpvs1d$1- bpvs6d$1*1] (7-12);%c#2.c2#3%[bpvs1d$1- bpvs6d$1*4] (13-18);%c#1.c3#1%[bpvs1f$1- bpvs6f$1*-5] (1-6);%c#1.c3#2%[bpvs1f$1- bpvs6f$1*1] (7-12);%c#1.c3#3%[bpvs1f$1- bpvs6f$1*4] (13-18);%c#2.c3#1%[bpvs1f$1- bpvs6f$1*-5] (1-6);%c#2.c3#2%[bpvs1f$1- bpvs6f$1*1] (7-12);%c#2.c3#3%[bpvs1f$1- bpvs6f$1*4] (13-18);Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 92/ 159


Mover-Stayer LTA <strong>in</strong> Probability ParameterizationBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 93/ 159


Mover-Stayer LTA <strong>in</strong> Probability ParameterizationPARAMETERIZATION = PROBABILITY;MODEL: %OVERALL% ! Relat<strong>in</strong>g c1 to c:c1 ON c;MODEL C: %c#1% ! Mover classc2 ON c1;c3 ON c2;%c#2% ! Stayer classc2#1 ON c1#1@1; c2#2 ON c1#1@0;c2#1 ON c1#2@0; c2#2 ON c1#2@1;c2#1 ON c1#3@0; c2#2 ON c1#3@0;c3#1 ON c2#1@1; c3#2 ON c2#1@0;c3#1 ON c2#2@0; c3#2 ON c2#2@1;c3#1 ON c2#3@0; c3#2 ON c2#3@0;!measurement part as beforeBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 94/ 159


Mover-Stayer LTAand Predict<strong>in</strong>g Mover-Stayer Class MembershipBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 95/ 159


CLASSES = cg(5) c (2) c1(3) c2(3) c3(3);KNOWNCLASS = cg(eth=0 eth=1 eth=2 eth=3 eth=4);ANALYSIS: TYPE = MIXTURE COMPLEX;STARTS = 400 100;PROCESS = 8 (STARTS);PARAMETERIZATION = PROBABILITY;MODEL: %OVERALL%c ON cg#1-cg#5 (b1-b5);c1 ON c;MODEL c: etcMODEL CONSTRAINT:NEW(logor2-logor5);! log of ratio of odds of be<strong>in</strong>g Mover vs Stayer for the groupslogor2 = log((b2/(1-b2))/(b1/(1-b1))); ! eth=1 (cg=2) vs 0 (cg=1)logor3 = log((b3/(1-b3))/(b1/(1-b1))); ! eth=2 (cg=3) vs 0logor4 = log((b4/(1-b4))/(b1/(1-b1))); ! eth=3 (cg=4) vs 0logor5 = log((b5/(1-b5))/(b1/(1-b1))); ! eth=4 (cg=5) vs 0Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 96/ 159


Exploratory LCA Us<strong>in</strong>g Bayesian AnalysisAsparouhov, T. & <strong>Muthén</strong>, B. (2011). Us<strong>in</strong>g Bayesian priors for moreflexible latent class analysis. Proceed<strong>in</strong>gs of the 2011 Jo<strong>in</strong>t StatisticalMeet<strong>in</strong>gs.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 97/ 159


Exploratory LCA Us<strong>in</strong>g Bayesian AnalysisLet Y i be b<strong>in</strong>ary observed variable (works only with b<strong>in</strong>ary<strong>in</strong>dicators), C latent class variable.Conditional <strong>in</strong>dependence LCA modelP(Y 1 ,...,Y m |C) = P(Y 1 |C)...P(Y m |C) = p 1c ...p mcLCA model without conditional <strong>in</strong>dependence us<strong>in</strong>g probit l<strong>in</strong>kThe jo<strong>in</strong>t distribution of Y iwhere Σ c is a correlation matrix.P(Y i = 1|C) = P(Y ∗ i > 0|C)Y ∗ i |C ∼ N(µ ic ,1)Y ∗ 1,...,Y ∗ m|C ∼ N(µ c ,Σ c )If Σ c = I the model is conditionally <strong>in</strong>dependentBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 98/ 159


Exploratory LCA Us<strong>in</strong>g Bayes Analysis, Cont<strong>in</strong>uedSpecify that with<strong>in</strong> class the items are approximately<strong>in</strong>dependentΣ ∼ marg<strong>in</strong>al correlation distribution of IW(I,DF).By <strong>in</strong>creas<strong>in</strong>g DF the prior forces more <strong>in</strong>dependence betweenthe <strong>in</strong>dicators, decreas<strong>in</strong>g DF allows for more dependencebetween the <strong>in</strong>dicators, DF are explored as a sensitivity analysisThis methodology formalizes the belief that conditional<strong>in</strong>dependence is only approximateAutomatically and easily detects residual correlations among<strong>in</strong>dicators, more flexible LCAThe ”t<strong>in</strong>y” prior leads to more stable estimation thanunconstra<strong>in</strong>ed correlations with un<strong>in</strong>formative priorsCan easily model any number of (full or partial) correlations(compared to ML which yields 1 dimension of <strong>in</strong>tegration forevery correlation)Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 99/ 159


Why Do We Need To Account For Residual CorrelationBetween Indicators?The number of classes can be overestimated.Example: 2-class, 6 b<strong>in</strong>ary <strong>in</strong>dicators, µ = ±1, n=5000In class 1: Corr(U 1 ,U 2 ) = 0.8Number of Classes Assumption BIC2 <strong>in</strong>dependence 323013 <strong>in</strong>dependence 318934 <strong>in</strong>dependence 319452 correlation 318583 correlation 31901Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 100/ 159


Qu-Tan-Kutner ExampleQu T, Tan M, Kutner MH. Random-effects models <strong>in</strong> latent classanalysis for evaluat<strong>in</strong>g accuracy of diagnostic tests. Biometrics52:797-810, 1996.4 b<strong>in</strong>ary <strong>in</strong>dicators, 2 class LCA model, correlation between<strong>in</strong>dicators 2 and 3 <strong>in</strong> class 2 us<strong>in</strong>g a factor variableLCA with unconstra<strong>in</strong>ed Σ and IW(I,15) (unidentified model)f<strong>in</strong>ds only one significant correlation: <strong>in</strong>dicators 2 and 3 <strong>in</strong> class2.Bayes LCA with one correlation yields the same results asQu-Kutner ML analysis.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 101/ 159


Qu-Tan-Kutner Example: Bayes Exploratory LCADATA:VARIABLE:ANALYSIS:MODEL:MODEL PRIORS:FILE = AlvordHIV1.dat;NAMES = u1-u4;CATEGORICAL = u1-u4;CLASSES = c(2);TYPE = MIXTURE;ESTIMATOR = BAYES;FBITERATIONS = 10000;%OVERALL%%c#1%u1-u4 WITH u1-u4 (p1-p6);%c#2%u1-u4 WITH u1-u4 (q1-q6);p1-p6∼IW(0, 15);pq-q6∼IW(0, 15);Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 102/ 159


Qu-Kutner Example: Bayes Exploratory LCAEstimate Posterior One-Tailed 95% C.I.S.D. P-Value Lower 2.5% Upper 2.5%Latent Class 1U1 WITHU2 0.138 0.186 0.235 -0.220 0.492U3 0.000 0.217 0.500 -0.423 0.417U4 -0.016 0.220 0.474 -0.461 0.384U2 WITHU3 -0.008 0.222 0.485 -0.422 0.428U4 -0.105 0.196 0.299 -0.479 0.283U3 WITHU4 -0.004 0.215 0.493 -0.414 0.411Latent Class 2U1 WITHU2 0.007 0.225 0.487 -0.440 0.428U3 0.001 0.219 0.499 -0.422 0.429U4 -0.018 0.206 0.465 -0.393 0.395U2 WITHU3 0.352 0.108 0.001 0.129 0.546U4 0.011 0.216 0.480 -0.414 0.417U3 WITHU4 0.008 0.218 0.487 -0.406 0.420Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 103/ 159


3-Level AnalysisCont<strong>in</strong>uous outcomes: ML and Bayesian estimationCategorical outcomes: Bayesian estimation (Bayes uses probit)Count and nom<strong>in</strong>al outcomes: Not yet availableBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 104/ 159


Types Of Observed Variables In 3-Level AnalysisEach Y variable is decomposed asY ijk = Y 1ijk + Y 2jk + Y 3k ,where Y 1ijk , Y 2jk , and Y 3k are components of Y ijk on levels 1, 2, and 3.Here, Y 2jk , and Y 3k may be seen as random <strong>in</strong>tercepts on respectivelevels, and Y 1ijk as a residualSome variables may not have variation over all levels. To avoidvariances that are near zero which cause convergence problemsspecify/restrict the variation levelWITHIN=Y, has variation on level 1, so Y 2jk and Y 3k are not <strong>in</strong>the modelWITHIN=(level2) Y, has variation on level 1 and level 2WITHIN=(level3) Y, has variation on level 1 and level 3BETWEEN= Y, has variation on level 2 and level 3BETWEEN=(level2) Y, has variation on level 2BETWEEN=(level3) Y, has variation on level 3Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 105/ 159


Types Of Random Slopes In 3-Level AnalysisType 1: Def<strong>in</strong>ed on the level 1%WITHIN%s | y ON x;The random slope s has variance on level 2 and level 3Type 2: Def<strong>in</strong>ed on the level 2%BETWEEN level2%s | y ON x;The random slope s has variance on level 3 onlyThe dependent variable can be an observed Y or a factor. Thecovariate X should be specified as WITHIN= for type 1 orBETWEEN=(level2) for type 2, i.e., no variation beyond thelevel it is used atBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 106/ 159


3-Level RegressionLevel 1 : y ijk = β 0jk + β 1jk x ijk + ε ijk , (1)Level 2a : β 0jk = γ 00k + γ 01k w jk + ζ 0jk , (2)Level 2b : β 1jk = γ 10k + γ 11k w jk + ζ 1jk , (3)Level 3a : γ 00k = κ 000 + κ 001 z k + δ 00k , (4)Level 3b : γ 01k = κ 010 + κ 011 z k + δ 01k , (5)Level 3c : γ 10k = κ 100 + κ 101 z k + δ 10k , (6)Level 3d : γ 11k = κ 110 + κ 111 z k + δ 11k , (7)wherex, w, and z are covariates on the different levelsβ are level 2 random effectsγ are level 3 random effectsκ are fixed effectsε, ζ and δ are residuals on the different levelsBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 107/ 159


3-Level Regression Example: UG Example 9.20With<strong>in</strong>s1xyws2s12ys1Between 2yBetween 3zs1s2s12Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 108/ 159


3-Level Regression Example: UG Example 9.20 InputTITLE: this is an example of a three-levelregression with a cont<strong>in</strong>uous dependentvariableDATA: FILE = ex9.20.dat;VARIABLE: NAMES = y x w z level2 level3;CLUSTER = level3 level2;WITHIN = x;BETWEEN =(level2) w (level3) z;ANALYSIS: TYPE = THREELEVEL RANDOM;MODEL:%WITHIN%s1 | y ON x;%BETWEEN level2%s2 | y ON w;s12 | s1 ON w;y WITH s1;%BETWEEN level3%y ON z;s1 ON z;s2 ON z;s12 ON z;y WITH s1 s2 s12;s1 WITH s2 s12;s2 WITH s12;OUTPUT: TECH1 TECH8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 109/ 159


3-Level Regression: Nurses DataSource: Hox (2010). Multilevel Analysis. Hypothetical datadiscussed <strong>in</strong> Section 2.4.3Study of stress <strong>in</strong> hospitalsReports from nurses work<strong>in</strong>g <strong>in</strong> wards nested with<strong>in</strong> hospitalsIn each of 25 hospitals, 4 wards are selected and randomlyassigned to experimental or control conditions(cluster-randomized trial)10 nurses from each ward are given a test that measuresjob-related stressCovariates are age, experience, gender, type of ward (0=generalcare, 1=special care), hospital size (0=small, 1=medium,2=large)Research question: Is the experimental effect different <strong>in</strong>different hospitals? - Random slope vary<strong>in</strong>g on level 3Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 110/ 159


3-Level Regression Example: Nurses DataBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 111/ 159


Input for Nurses DataTITLE: Nurses data from Hox (2010)DATA: FILE = nurses.dat;VARIABLE: NAMES = hospital ward wardid nurse age genderexperience stress wardtype hospsize expcon zagezgender zexperience zstress zwardtyi zhospsizezexpcon cexpcon chospsize;CLUSTER = hospital wardid;BETWEEN = (hospital) hospsize (wardid) expcon wardtype;USEVARIABLES = stress expcon age gender experiencewardtype hospsize;CENTERING = GRANDMEAN(expcon hospsize);ANALYSIS: TYPE = THREELEVEL RANDOM;ESTIMATOR = MLR;PROCESSORS = 8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 112/ 159


Input for Nurses Data, Cont<strong>in</strong>uedMODEL:OUTPUT:SAVEDATA:PLOT:%WITHIN%stress ON age gender experience;%BETWEEN wardid%s | stress ON expcon;stress ON wardtype;%BETWEEN hospital%s stress ON hospsize;s; s WITH stress;TECH1 TECH8 BAYES;SAVE = FSCORES;FILE = fs.dat;TYPE = PLOT2 PLOT3;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 113/ 159


Model Results for Nurses DataEstimates S.E. Est./S.E. Two-TailedP-ValueWITHIN Levelstress ONage 0.022 0.002 11.911 0.000gender -0.455 0.032 -14.413 0.000experience -0.062 0.004 -15.279 0.000Residual Variancesstress 0.217 0.011 20.096 0.000BETWEEN wardid Levelstress ONwardtype 0.053 0.076 0.695 0.487Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 114/ 159


Model Results for Nurses Data, Cont<strong>in</strong>uedEstimates S.E. Est./S.E. Two-TailedP-ValueResidual Variancesstress 0.109 0.033 3.298 0.001BETWEEN hospital Levels ONhospsize 0.998 0.191 5.217 0.000stress ONhospsize -0.041 0.152 -0.270 0.787s WITHstress -0.036 0.058 -0.615 0.538Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 115/ 159


Model Results for Nurses Data, Cont<strong>in</strong>uedEstimates S.E. Est./S.E. Two-TailedP-ValueInterceptsstress 5.753 0.102 56.171 0.000s -0.699 0.111 -6.295 0.000Residual Variancesstress 0.143 0.051 2.813 0.005s 0.178 0.087 2.060 0.039Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 116/ 159


3-Level Path Analysis: UG Example 9.21yWith<strong>in</strong>xuyBetween 2wuy2yBetween 3zuy2y3Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 117/ 159


3-Level Path Analysis: UG Ex 9.21 InputTITLE: this an example of a three-level pathanalysis with a cont<strong>in</strong>uous and acategorical dependent variableDATA: FILE = ex9.21.dat;VARIABLE: NAMES = u y2 y y3 x w z level2 level3;CATEGORICAL = u;CLUSTER = level3 level2;WITHIN = x;BETWEEN = y2 (level2) w (level3) z y3;ANALYSIS: TYPE = THREELEVEL;ESTIMATOR = BAYES;PROCESSORS = 2;BITERATIONS = (1000);MODEL: %WITHIN%u ON y x;y ON x;%BETWEEN level2%u ON w y y2;y ON w;y2 ON w;y WITH y2;%BETWEEN level3%u ON y y2;y ON z;y2 ON z;y3 ON y y2;y WITH y2;u WITH y3;OUTPUT: TECH1 TECH8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 118/ 159


3-Level Path Analysis: Monte Carlo Input for UG Ex 9.21TITLE:this an example of a Monte Carlo simulationfor a three-level path analysis modelwith a cont<strong>in</strong>uous and a categorical dependent variableMONTECARLO:names = y u x w y2 z y3;nobservations = 7500;nreps = 500;csizes = 50[30(5)];ncsize = 1[1];generate = u(1);categorical = u;with<strong>in</strong> = x;between = y2 (level2) w (level3) z y3;!save = ex9.21.dat;ANALYSIS:type = threelevel;estimator = bayes;processors = 2;biter = (1000);Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 119/ 159


3-Level Path Analysis: Monte Carlo Input for UG Example9.21, Cont<strong>in</strong>uedMODEL POPULATION:%with<strong>in</strong>%x@1;u ON y*.75 x*.5;y ON x*.25;y*1;%between level2%w@1;u ON w*1 y*.5 y2*.7;y ON w*.5;y2 ON w*.7;y with y2*.25;y*.5; y2*.5; u*.4;%between level3%z@1; y3@1;u ON y*.6 y2*.8;y ON z*.6;y2 ON z*.8;y3 ON y*.4 y2*.3;y with y2*.3;y*.4; y2*.5; u*.5 y3*.6;u with y3*.2;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 120/ 159


3-Level Path Analysis: Monte Carlo Input for UG Example9.21, Cont<strong>in</strong>uedMODEL:%with<strong>in</strong>%!x@1;u ON y*.75 x*.5;y ON x*.25;y*1;%between level2%!w@1;u ON w*1 y*.5 y2*.7;y ON w*.5;y2 ON w*.7;y with y2*.25;y*.5; y2*.5; u*.4;%between level3%!z@1; y3@1;u ON y*.6 y2*.8;y ON z*.6;y2 ON z*.8;y3 ON y*.4 y2*.3;y with y2*.3;y*.4; y2*.5; u*.5 y3*.6;u with y3*.2;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 121/ 159


3-Level Path Analysis: Monte Carlo Output for UG Ex 9.21mcex9-21outa.txtESTIMATES S. E. M. S. E. 95% % SigPopulation Average Std. Dev. Average Cover CoeffWith<strong>in</strong> LevelUONY 0.750 0.7574 0.0320 0.0320 0.0011 0.946 1.000X 0.500 0.5050 0.0296 0.0283 0.0009 0.934 1.000YONX 0.250 0.2507 0.0131 0.0124 0.0002 0.942 1.000Residual VariancesY 1.000 0.9997 0.0196 0.0183 0.0004 0.946 1.000Between LEVEL2 LevelUONW 1.000 1.0074 0.0531 0.0519 0.0029 0.934 1.000Y 0.500 0.5031 0.0686 0.0668 0.0047 0.952 1.000Y2 0.700 0.7038 0.0556 0.0575 0.0031 0.960 1.000YONW 0.500 0.5004 0.0220 0.0219 0.0005 0.956 1.000Y2ONW 0.700 0.7019 0.0191 0.0186 0.0004 0.942 1.000Y WITHY2 0.250 0.2495 0.0166 0.0169 0.0003 0.958 1.000Residual VariancesU 0.400 0.4129 0.0618 0.0568 0.0040 0.922 1.000Y2 0.500 0.5010 0.0179 0.0187 0.0003 0.962 1.000Y 0.500 0.5015 0.0253 0.0264 0.0006 0.950 1.000Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 122/ 159


Monte Carlo Output for UG Ex 9.21, Cont<strong>in</strong>uedBetween LEVEL3 LevelUONY 0.600 0.6295 0.2464 0.2428 0.0615 0.942 0.724Y2 0.800 0.7888 0.2020 0.1967 0.0409 0.952 0.970YONZ 0.600 0.5981 0.0952 0.0953 0.0090 0.952 1.000Y2ONZ 0.800 0.7996 0.1050 0.1052 0.0110 0.956 1.000Y3ONY 0.400 0.4163 0.2506 0.2532 0.0630 0.952 0.368Y2 0.300 0.2899 0.2098 0.2043 0.0440 0.940 0.322Y WITHY2 0.300 0.2824 0.0780 0.0831 0.0064 0.958 1.000U WITHY3 0.200 0.1907 0.0912 0.0931 0.0084 0.940 0.654InterceptsY2 0.000 0.0038 0.1071 0.1037 0.0115 0.950 0.050Y 0.000 0.0037 0.0931 0.0940 0.0087 0.944 0.056Y3 0.000 -0.0060 0.1141 0.1134 0.0130 0.958 0.042ThresholdsU$1 0.000 0.0067 0.1115 0.1094 0.0124 0.946 0.054Residual VariancesU 0.500 0.5103 0.1206 0.1242 0.0146 0.938 1.000Y2 0.500 0.4999 0.1007 0.1108 0.0101 0.964 1.000Y 0.400 0.4023 0.0848 0.0908 0.0072 0.968 1.000Y3 0.600 0.5914 0.1171 0.1300 0.0138 0.948 1.000Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 123/ 159


3-Level MIMIC Analysisy1With<strong>in</strong>x1fw1y2y3y4x2sfw2y5y6y1Between 2y2wsf2fb2y3ssy4y5sy6Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 124/ 159


3-Level MIMIC Analysis, Cont<strong>in</strong>uedy1Between 3y2y3zfb3ssf2ssy4y5y6Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 125/ 159


3-Level MIMIC Analysis InputTITLE: this is an example of a three-level MIMICmodel with cont<strong>in</strong>uous factor <strong>in</strong>dicators,two covariates on with<strong>in</strong>, one covariate onbetween level 2, one covariate on betweenlevel 3 with random slopes on both with<strong>in</strong>and between level 2DATA: FILE = ex9.22.dat;VARIABLE: NAMES = y1-y6 x1 x2 w z level2 level3;CLUSTER = level3 level2;WITHIN = x1 x2;BETWEEN = (level2) w (level3) z;ANALYSIS: TYPE = THREELEVEL RANDOM;MODEL: %WITHIN%fw1 BY y1-y3;fw2 BY y4-y6;fw1 ON x1;s | fw2 ON x2;%BETWEEN level2%fb2 BY y1-y6;sf2 | fb2 ON w;ss | s ON w;fb2 WITH s;%BETWEEN level3%fb3 BY y1-y6;fb3 ON z;s ON z;sf2 ON z;ss ON z;fb3 WITH s sf2 ss;s WITH sf2 ss;sf2 WITH ss;OUTPUT: TECH1 TECH8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 126/ 159


3-Level MIMIC Analysis, Monte Carlo Input:5 Students (14 Parameters) <strong>in</strong> 30 Classrooms (13 Parameters)<strong>in</strong> 50 Schools (28 Parameters)mcex9-22<strong>in</strong>p.txMONTECARLO:names = y1-y6 x1 x2 w z;nobservations = 7500;nreps = 500;csizes = 50[30(5)];ncsize = 1[1];! save = ex9.22.dat;with<strong>in</strong> = x1 x2;between = (level2) w (level3) z;ANALYSIS:type = threelevel random;estimator = mlr;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 127/ 159


3-Level MIMIC Analysis, Monte Carlo Input:5 Students (14 Parameters) <strong>in</strong> 30 Classrooms (13 Parameters)<strong>in</strong> 50 Schools (28 Parameters)MONTECARLO:ANALYSIS:NAMES = y1-y6 x1 x2 w z;NOBSERVATIONS = 7500;NREPS = 500;CSIZES = 50[30(5)];NCSIZE = 1[1];!SAVE = ex9.22.dat;WITHIN = x1 x2;BETWEEN = (level2) w (level3) z;TYPE = THREELEVEL RANDOM;ESTIMATOR = MLR;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 128/ 159


3-Level MIMIC Analysis, Monte Carlo OutputREPLICATION 499:THE STANDARD ERRORS OF THE MODEL PARAMETER ESTIMATES MAY NOT BETRUSTWORTHY FOR SOME PARAMETERS DUE TO A NON-POSITIVE DEFINITEFIRST-ORDER DERIVATIVE PRODUCT MATRIX. THIS MAY BE DUE TO THE STARTINGVALUES BUT MAY ALSO BE AN INDICATION OF MODEL NONIDENTIFICATION. THECONDITION NUMBER IS -0.239D-16. PROBLEM INVOLVING PARAMETER 51.THE NONIDENTIFICATION IS MOST LIKELY DUE TO HAVING MORE PARAMETERS THAN THENUMBER OF LEVEL 3 CLUSTERS. REDUCE THE NUMBER OF PARAMETERS.REPLICATION 500:THE STANDARD ERRORS OF THE MODEL PARAMETER ESTIMATES MAY NOT BETRUSTWORTHY FOR SOME PARAMETERS DUE TO A NON-POSITIVE DEFINITEFIRST-ORDER DERIVATIVE PRODUCT MATRIX. THIS MAY BE DUE TO THE STARTINGVALUES BUT MAY ALSO BE AN INDICATION OF MODEL NONIDENTIFICATION. THECONDITION NUMBER IS -0.190D-16. PROBLEM INVOLVING PARAMETER 52.THE NONIDENTIFICATION IS MOST LIKELY DUE TO HAVING MORE PARAMETERS THAN THENUMBER OF LEVEL 3 CLUSTERS. REDUCE THE NUMBER OF PARAMETERS.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 129/ 159


3-Level MIMIC Analysis, Monte Carlo Output, Cont<strong>in</strong>uedBetween LEVEL2 LevelFB2 BYY1 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000Y2 1.000 0.9980 0.0236 0.0237 0.0006 0.952 1.000Y3 1.000 0.9999 0.0237 0.0239 0.0006 0.940 1.000Y4 1.000 0.9987 0.0271 0.0272 0.0007 0.936 1.000Y5 1.000 1.0005 0.0265 0.0270 0.0007 0.948 1.000Y6 1.000 0.9987 0.0277 0.0269 0.0008 0.944 1.000FB2 WITHS 0.000 0.0001 0.0238 0.0222 0.0006 0.940 0.060Residual VariancesY1 0.500 0.5009 0.0343 0.0338 0.0012 0.940 1.000Y2 0.500 0.4988 0.0345 0.0338 0.0012 0.928 1.000Y3 0.500 0.5004 0.0347 0.0336 0.0012 0.936 1.000Y4 0.500 0.4995 0.0333 0.0339 0.0011 0.950 1.000Y5 0.500 0.4988 0.0337 0.0337 0.0011 0.946 1.000Y6 0.500 0.5002 0.0350 0.0339 0.0012 0.932 1.000FB2 0.500 0.5021 0.0327 0.0321 0.0011 0.934 1.000S 0.600 0.6018 0.0384 0.0374 0.0015 0.938 1.000Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 130/ 159


3-Level MIMIC Analysis, Monte Carlo Output, Cont<strong>in</strong>uedBetween LEVEL3 LevelFB3 BYY1 1.000 1.0000 0.0000 0.0000 0.0000 1.000 0.000Y2 1.000 1.0112 0.1396 0.1372 0.0196 0.934 1.000Y3 1.000 1.0091 0.1608 0.1403 0.0259 0.928 1.000Y4 1.000 1.0063 0.1491 0.1398 0.0222 0.912 1.000Y5 1.000 1.0094 0.1532 0.1420 0.0235 0.920 1.000Y6 1.000 1.0155 0.1585 0.1418 0.0253 0.932 1.000FB3 ONZ 0.500 0.5053 0.1055 0.0932 0.0111 0.906 1.000SONZ 0.300 0.2947 0.0859 0.0791 0.0074 0.912 0.940SF2 ONZ 0.200 0.1988 0.0834 0.0794 0.0069 0.922 0.704SSONZ 0.300 0.3016 0.0863 0.0790 0.0074 0.918 0.938FB3 WITHS 0.000 0.0018 0.0501 0.0466 0.0025 0.940 0.060SF2 0.000 0.0050 0.0499 0.0462 0.0025 0.944 0.056SS 0.000 0.0008 0.0487 0.0466 0.0024 0.932 0.068S WITHSF2 0.000 0.0033 0.0465 0.0442 0.0022 0.938 0.062SS 0.000 -0.0025 0.0448 0.0438 0.0020 0.944 0.056SF2 WITHSS 0.000 -0.0008 0.0471 0.0440 0.0022 0.940 0.060Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 131/ 159


3-Level MIMIC Analysis, Monte Carlo Output, Cont<strong>in</strong>uedInterceptsY1 0.500 0.4945 0.0995 0.1031 0.0099 0.966 0.996Y2 0.500 0.4924 0.1035 0.1031 0.0108 0.932 0.992Y3 0.500 0.4920 0.1051 0.1029 0.0111 0.942 0.998Y4 0.500 0.4967 0.1059 0.1034 0.0112 0.940 0.998Y5 0.500 0.4974 0.0996 0.1029 0.0099 0.946 1.000Y6 0.500 0.4975 0.1011 0.1033 0.0102 0.950 0.996S 0.200 0.1977 0.0837 0.0809 0.0070 0.926 0.664SF2 1.000 1.0051 0.0867 0.0814 0.0075 0.934 1.000SS 0.500 0.5042 0.0853 0.0808 0.0073 0.944 1.000Residual VariancesY1 0.200 0.1906 0.0556 0.0506 0.0032 0.872 0.996Y2 0.200 0.1893 0.0554 0.0499 0.0032 0.884 0.996Y3 0.200 0.1922 0.0545 0.0504 0.0030 0.892 0.994Y4 0.200 0.1928 0.0597 0.0502 0.0036 0.868 0.996Y5 0.200 0.1911 0.0550 0.0507 0.0031 0.872 0.998Y6 0.200 0.1907 0.0517 0.0504 0.0028 0.906 1.000FB3 0.300 0.2899 0.0901 0.0842 0.0082 0.892 0.992S 0.300 0.2885 0.0639 0.0622 0.0042 0.906 1.000SF2 0.300 0.2905 0.0656 0.0619 0.0044 0.888 1.000SS 0.300 0.2850 0.0673 0.0622 0.0047 0.870 1.000Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 132/ 159


3-Level Growth AnalysisBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 133/ 159


3-Level Growth Analysis, Cont<strong>in</strong>uedBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 134/ 159


3-Level Growth Analysis InputTITLE: this is an example of a three-level growthmodel with a cont<strong>in</strong>uous outcome and onecovariate on each of the three levelsDATA: FILE = ex9.23.dat;VARIABLE: NAMES = y1-y4 x w z level2 level3;CLUSTER = level3 level2;WITHIN = x;BETWEEN = (level2) w (level3) z;ANALYSIS: TYPE = THREELEVEL;MODEL: %WITHIN%iw sw | y1@0 y2@1 y3@2 y4@3;iw sw ON x;%BETWEEN level2%ib2 sb2 | y1@0 y2@1 y3@2 y4@3;ib2 sb2 ON w;%BETWEEN level3%ib3 sb3 | y1@0 y2@1 y3@2 y4@3;ib3 sb3 ON z;y1-y4@0;OUTPUT: TECH1 TECH8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 135/ 159


TYPE=THREELEVEL COMPLEXAsparouhov, T. and <strong>Muthén</strong>, B. (2005). Multivariate StatisticalModel<strong>in</strong>g with Survey Data. Proceed<strong>in</strong>gs of the FederalCommittee on Statistical Methodology (FCSM) ResearchConference.Available with ESTIMATOR=MLR when all dependentvariables are cont<strong>in</strong>uous.Cluster sampl<strong>in</strong>g: CLUSTER=cluster4 cluster3 cluster2; Forexample, cluster=district school classroom;cluster4 nested above cluster3 nested above cluster2cluster4 provides <strong>in</strong>formation about cluster sampl<strong>in</strong>g of level 3units, cluster3 is modeled as level 3, cluster2 is modeled as level2cluster4 affects only the standard errors and not the po<strong>in</strong>testimates, adjusts the standard error upwards fornon-<strong>in</strong>dependence of level 3 unitsBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 136/ 159


TYPE=THREELEVEL COMPLEX, Cont<strong>in</strong>uedOther sampl<strong>in</strong>g features: Stratification (nested above cluster3, 5levels total), f<strong>in</strong>ite population sampl<strong>in</strong>g and weightsThree weight variables for unequal probability of selectionweight=w1; bweight=w2; b2weight=w3;w3 = 1/P(level 3 unit is selected)w2 = 1/P(level 2 unit is selected|the level 3 unit is selected)w1 = 1/P(level 1 unit is selected|the level 2 unit is selected)Weights are scaled to sample size at the correspond<strong>in</strong>g levelOther scal<strong>in</strong>g methods possible:https://www.statmodel.com/download/Scal<strong>in</strong>g3.pdfBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 137/ 159


3-Level and Cross-Classified Multiple Imputation<strong>New</strong> Multiple Imputation MethodsMultiple imputations for three-level and cross-classified dataCont<strong>in</strong>uous and categorical variablesH0 imputations. Estimate a three-level or cross-classified modelwith the Bayes estimator. Not available as H1 imputation wherethe imputation model is setup as unrestricted model.The imputation model can be an unrestricted model or arestricted model. Restricted models will be easier to estimateespecially when the number of cluster<strong>in</strong>g units is not largeIn the <strong>in</strong>put file simply add the DATA IMPUTATION commandBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 138/ 159


Example Of Multiple Imputation For Three-Level DataBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 139/ 159


Cross-Classified AnalysisRegression analysisPath analysis (both subject and context are random modes)SEMRandom items (both subject and item are random modes)Longitud<strong>in</strong>al analysis (both subject and time are random modes)Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 140/ 159


Cross-Classified Data StructureStudents are cross-classified by school and neighbourhood at level 2.An example with 33 students:School 1 School 2 School 3 School 4Neighbourhood 1 XXXX XX X XNeighbourhood 2 X XXXXX XXX XXNeighbourhood 3 XX XX XXXX XXXXXXSource: Field<strong>in</strong>g & Goldste<strong>in</strong> (2006). Cross-classified and multiplemembership structures <strong>in</strong> multilevel models: An <strong>in</strong>troduction andreview. Research Report RR 791, University of Birm<strong>in</strong>gham.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 141/ 159


Cross-Classified DataY pijk is the p−th observation for person i belong<strong>in</strong>g to level 2cluster j and level 3 cluster k.Level 2 clusters are not nested with<strong>in</strong> level 3 clustersExamples:Natural Nest<strong>in</strong>g: Students performance scores are nested with<strong>in</strong>students and teachers. Students are nested with<strong>in</strong> schools andneighborhoods.Design Nest<strong>in</strong>g: Studies where observations are nested with<strong>in</strong>persons and treatments/situations.Complex Sampl<strong>in</strong>g: Observations are nested with<strong>in</strong> sampl<strong>in</strong>gunits and another variable unrelated to the sampl<strong>in</strong>g.Generalizability theory: Items are considered a random samplefrom a population of items.Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 142/ 159


Cross-Classified Model<strong>in</strong>gWhy do we need to model both sets of cluster<strong>in</strong>g?Discover the true predictor/explanatory effect stemm<strong>in</strong>g from theclustersIgnor<strong>in</strong>g cluster<strong>in</strong>g leads to <strong>in</strong>correct standard errorsModel<strong>in</strong>g with fixed effects leads to too many parameters andless accurate modelBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 143/ 159


Cross-Classified RegressionConsider an outcome y ijk for <strong>in</strong>dividual i nested with<strong>in</strong> thecross-classification of level 2a with <strong>in</strong>dex j and level 2b with <strong>in</strong>dex k.For example, level 2a is the school an <strong>in</strong>dividual goes to and level 2bis the neighborhood the <strong>in</strong>dividual lives <strong>in</strong>. This is not a three-levelstructure because a school an <strong>in</strong>dividual goes to need not be <strong>in</strong> theneighborhood the <strong>in</strong>dividual lives <strong>in</strong>. Follow<strong>in</strong>g is a simple model,y ijk = β 0 + β 1 x ijk + β 2a j + β 2b k + ε ijk , (8)β 2a j = γ 2a w 2a j + ζ 2a j , (9)β 2b k = γ 2b z 2b k + ζ 2b k , (10)wherex, w 2a , and z 2b are covariates on the different levelsβ 0 , β 1 , γ 2a and γ 2b are fixed effect coefficients on the differentlevelsε, β 2a j and β 2b k are random effects on the different levelsBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 144/ 159


Cross-Classified Regression: UG Example 9.24x1With<strong>in</strong>syx2Level 2aywsLevel 2byzsBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 145/ 159


Cross-Classified Regression: Input for UG Example 9.24TITLE: this is an example of a two-levelregression for a cont<strong>in</strong>uous dependentvariable us<strong>in</strong>g cross-classified dataDATA: FILE = ex9.24.dat;VARIABLE: NAMES = y x1 x2 w z level2a level2b;CLUSTER = level2b level2a;WITHIN = x1 x2;BETWEEN = (level2a) w (level2b) z;ANALYSIS: TYPE = CROSSCLASSIFIED RANDOM;ESTIMATOR = BAYES;PROCESSORS = 2;BITERATIONS = (2000);MODEL: %WITHIN%y ON x1;s | y ON x2;%BETWEEN level2a%y ON w;s ON w;y WITH s;%BETWEEN level2b%y ON z;s ON Z;y WITH s;OUTPUT: TECH1 TECH8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 146/ 159


An Example of Cross-Classified Model<strong>in</strong>g:The Hox Pupcross DataHox (2010). Multilevel Analysis. Second edition. Chapter 9.11000 pupils, attend<strong>in</strong>g 100 different primary schools, go<strong>in</strong>g on to30 secondary schoolsOutcome: Achievement measured <strong>in</strong> secondary schoolx covariate: pupil gender (0=male, 1=female), pupil sesw 2a covariate: pdenom (0=public, 1=denom); primary schooldenom<strong>in</strong>ationz 2b covariate: sdenom (0=public, 1=denom); secondary schooldenom<strong>in</strong>ationBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 147/ 159


Cross-Classified Model<strong>in</strong>g of Pupcross DatapupsexWith<strong>in</strong>pupsessachieveachievePschool (2a)pdenomsSschool (2b)achievesdenomsBengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 148/ 159


TITLE:DATA:VARIABLE:ANALYSIS:MODEL:OUTPUT:Pupcross: No covariatesFILE = pupcross.dat;NAMES = pupil pschool sschool achieve pupsex pupsespdenom sdenom;USEVARIABLES = achieve;CLUSTER = pschool sschool;ESTIMATOR = BAYES;TYPE = CROSSCLASSIFIED;PROCESSORS = 2;FBITER = 5000;%WITHIN%achieve;%BETWEEN PSCHOOL%achieve;%BETWEEN SSCHOOL%achieve;TECH1 TECH8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 149/ 159


Cluster <strong>in</strong>formation for SSCHOOLCluster <strong>in</strong>formation for PSCHOOLSize (s) Cluster ID with Size s Size (s) Cluster ID with Size s20 9 10 5021 20 12 4322 12 13 41 2423 24 15 47 23 5 2224 15 16 30 926 3 17 17 7 26 3827 1 30 18 1 3 6 45 14 2828 23 19 29 17 49 35 21 2030 5 20 16 231 26 25 21 40 32 46 11 19 13 4 3932 2 22 34 2733 8 13 23 15 1834 4 18 24 25 44 3735 29 25 36 31 1037 27 11 26 839 22 19 27 4241 16 29 48 1242 21 7 31 3345 1446 1047 2848 6 Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 150/ 159


WITHIN levelVariancesPosterior One-Tailed 95% C.I.Estimate S.D. P-Value Lower 2.% Upper 2.5% Significanceachieve 0.513 0.024 0.000 0.470 0.564 *BETWEEN sschool levelVariancesachieve 0.075 0.028 0.000 0.040 0.147 *BETWEEN pschool levelMeansachieve 6.341 0.084 0.000 6.180 6.510 *Variancesachieve 0.183 0.046 0.000 0.116 0.294 *Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 151/ 159


TITLE:DATA:VARIABLE:ANALYSIS:MODEL:OUTPUT:Pupcross: Add<strong>in</strong>g pupil gender and sesFILE = pupcross.dat;NAMES = pupil pschool sschool achieve pupsex pupsespdenom sdenom;USEVARIABLES = achieve pupsex pupses;CLUSTER = pschool sschool;WITHIN = pupsex pupses;ESTIMATOR = BAYES;TYPE = CROSSCLASSIFIED;PROCESSORS = 2;FBITER = 5000;%WITHIN%achieve ON pupsex pupses;%BETWEEN PSCHOOL%achieve;%BETWEEN SSCHOOL%achieve;TECH1 TECH8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 152/ 159


WITHIN levelachieve ONPosterior One-Tailed 95% C.I.Estimate S.D. P-Value Lower 2.% Upper 2.5% Significancepupsex 0.262 0.046 0.000 0.171 0.353 *pupses 0.114 0.016 0.000 0.081 0.145 *Residual variancesachieve 0.477 0.022 0.000 0.434 0.523 *BETWEEN sschool levelVariancesachieve 0.073 0.028 0.000 0.038 0.145 *BETWEEN pschool levelMeansachieve 5.757 0.109 0.000 5.539 5.975 *Variancesachieve 0.183 0.046 0.000 0.116 0.297 *Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 153/ 159


TITLE:VARIABLE:ANALYSIS:MODEL:OUTPUT:Pupil gender and ses with random ses slope for primary schoolsNAMES = pupil pschool sschool achieve pupsex pupsespdenom sdenom;USEVARIABLES = achieve pupsex pupses;CLUSTER = pschool sschool;WITHIN = pupsex pupses;ESTIMATOR = BAYES;TYPE = CROSSCLASSIFIED RANDOM ;PROCESSORS = 2; FBITER = 5000;%WITHIN%achieve ON pupsex;s | achieve ON pupses;%BETWEEN PSCHOOL%achieve;s;%BETWEEN SSCHOOL%achieve;s@0;TECH1 TECH8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 154/ 159


WITHIN levelachieve ONPosterior One-Tailed 95% C.I.Estimate S.D. P-Value Lower 2.% Upper 2.5% Significancepupsex 0.253 0.045 0.000 0.163 0.339 *Residual variancesachieve 0.465 0.022 0.000 0.424 0.510 *BETWEEN sschool levelVariancesachieve 0.071 0.027 0.000 0.038 0.140 *s 0.000 0.000 0.000 0.000 0.000BETWEEN pschool levelMeansachieve 5.758 0.105 0.000 5.557 5.964 *s 0.116 0.019 0.000 0.077 0.153 *Variancesachieve 0.110 0.045 0.000 0.042 0.216 *s 0.006 0.002 0.000 0.002 0.011 *Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 155/ 159


TITLE:VARIABLE:ANALYSIS:MODEL:OUTPUT:PLOT:Pupil gender and ses plus pschool pdenomNAMES = pupil pschool sschool achieve pupsex pupsespdenom sdenom;USEVARIABLES = achieve pupsex pupses pdemon; !sdenom;CLUSTER = pschool sschool;WITHIN = pupsex pupses;BETWEEN = (pschool) pdenom; ! (sschool) sdenom;ESTIMATOR = BAYES;TYPE = CROSSCLASSIFIED;PROCESSORS = 2; FBITER = 5000;%WITHIN%achieve ON pupsex pupses;%BETWEEN PSCHOOL%achieve ON pdenom;%BETWEEN SSCHOOL%achieve; ! ON sdenom;TECH1 TECH8;TYPE = PLOT3;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 156/ 159


WITHIN levelachieve ONPosterior One-Tailed 95% C.I.Estimate S.D. P-Value Lower 2.% Upper 2.5% Significancepupsex 0.261 0.047 0.000 0.168 0.351 *pupses 0.113 0.016 0.000 0.080 0.143 *Residual variancesachieve 0.477 0.023 0.000 0.436 0.522 *BETWEEN sschool levelVariancesachieve 0.073 0.028 0.000 0.038 0.145 *BETWEEN pschool levelachieve ONpdenom 0.207 0.131 0.058 -0.053 0.465Interceptsachieve 5.643 0.136 0.000 5.375 5.912 *Residual variancesachieve 0.175 0.045 0.000 0.112 0.288 *Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 157/ 159


Cross-Classified Path Analysis: UG Example 9.25y1With<strong>in</strong>xy2Level 2ay1wy2Level 2by1zy2Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 158/ 159


Cross-Classified Regression: Input for UG Example 9.25TITLE: this is an example of a two-level pathanalysis with cont<strong>in</strong>uous dependentvariables us<strong>in</strong>g cross-classified dataDATA: FILE = ex9.25.dat;VARIABLE: NAMES = y1 y2 x w z level2a level2b;CLUSTER = level2b level2a;WITHIN = x;BETWEEN = (level2a) w (level2b) z;ANALYSIS: TYPE = CROSSCLASSIFIED;ESTIMATOR = BAYES;PROCESSORS = 2;MODEL: %WITHIN%y2 ON y1 x;y1 ON x;%BETWEEN level2a%y1-y2 ON w;y1 WITH y2;%BETWEEN level2b%y1-y2 ON z;y1 WITH y2;OUTPUT: TECH1 TECH8;Bengt <strong>Muthén</strong> & Tihomir Asparouhov <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Mplus</strong> <strong>Version</strong> 7 159/ 159

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!