Cfa1: Confirmatory Factor Analysis With A Single Factor - Stata

Transcription

cfa1: SimpleCFA ModelsStasKolenikovU of fa1: Confirmatory Factor Analysiswith a Single FactorExtensionsStas KolenikovDepartment of StatisticsUniversity of Missouri-ColumbiaNASUG, Boston, MA, July 24, 2006

cfa1: SimpleCFA ModelsOutlineStasKolenikovU of MissouriFactoranalysis1 Factor analysisImplementationDemonstrationExtensions2 Implementation3 Demonstration4 Extensions

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsFactor analysisIf one has p variables y1 , . . . , yp , are there q p factorsexplaining most of the variability in y ’s? Exploratory factor analysis: find (simple) covariancestructure in the data; a standard multivariate technique— see [MV] factor Confirmatory factor analysis: upon having formulated atheoretical model, see if it fits the data; estimate theparameters and assess goodness of fit. Simplest ofstructural equation models (SEM) Principal components analysis is neither of the above,but closer to EFA in spirit

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsFactor analysisIf one has p variables y1 , . . . , yp , are there q p factorsexplaining most of the variability in y ’s? Exploratory factor analysis: find (simple) covariancestructure in the data; a standard multivariate technique— see [MV] factor Confirmatory factor analysis: upon having formulated atheoretical model, see if it fits the data; estimate theparameters and assess goodness of fit. Simplest ofstructural equation models (SEM) Principal components analysis is neither of the above,but closer to EFA in spirit

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsFactor analysisIf one has p variables y1 , . . . , yp , are there q p factorsexplaining most of the variability in y ’s? Exploratory factor analysis: find (simple) covariancestructure in the data; a standard multivariate technique— see [MV] factor Confirmatory factor analysis: upon having formulated atheoretical model, see if it fits the data; estimate theparameters and assess goodness of fit. Simplest ofstructural equation models (SEM) Principal components analysis is neither of the above,but closer to EFA in spirit

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsFactor analysisIf one has p variables y1 , . . . , yp , are there q p factorsexplaining most of the variability in y ’s? Exploratory factor analysis: find (simple) covariancestructure in the data; a standard multivariate technique— see [MV] factor Confirmatory factor analysis: upon having formulated atheoretical model, see if it fits the data; estimate theparameters and assess goodness of fit. Simplest ofstructural equation models (SEM) Principal components analysis is neither of the above,but closer to EFA in spirit

cfa1: SimpleCFA ModelsStasKolenikovU of MissouriPath diagramsA typical CFA model looks like. . .Factoranalysis 1 y1y2y3y4δ1 0.4 δ2 0.5 δ3 0.6 δ4 1.5

cfa1: SimpleCFA ModelsStasKolenikovU of MissouriEquation notation. . . which is the same as ensionsξ1 is unobserved,y1 λ1 ξ1 δ1 ,y2 λ2 ξ1 δ2 ,V[ξ1 ] 1 φV[δ1 ] 0.4 θ1 , λ1 1,y3 λ3 ξ1 δ3 ,V[δ2 ] 0.5 θ2 , λ2 0.8,V[δ3 ] 0.6 θ3 , λ3 0.8,y4 λ4 ξ1 δ3 ,V[δ4 ] 1.5 θ4 , λ4 1.2

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsLikelihood formulationy Λξ1 δ,Cov[y ] ΛφΛ0 Θ Σ(θ),nn 1npln(2π) ln Σ tr SΣ 1 (θ)ln L 222where S is the sample covariance matrix

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsLikelihood formulationy Λξ1 δ,Cov[y ] ΛφΛ0 Θ Σ(θ),nn 1npln(2π) ln Σ tr SΣ 1 (θ)ln L 222where S is the sample covariance matrix

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsLikelihood formulationy Λξ1 δ,Cov[y ] ΛφΛ0 Θ Σ(θ),nn 1npln(2π) ln Σ tr SΣ 1 (θ)ln L 222where S is the sample covariance matrix

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsIdentification conditionsNot all parameters are necessarily estimable. . . Number of parameters p(p 1)/2 E ξ1 is not identified, assumed zero Only λk φ1/2 , or ratios λk /λj , are identified Set φ 1 Set one of λk 1

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsIdentification conditionsNot all parameters are necessarily estimable. . . Number of parameters p(p 1)/2 E ξ1 is not identified, assumed zero Only λk φ1/2 , or ratios λk /λj , are identified Set φ 1 Set one of λk 1

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsIdentification conditionsNot all parameters are necessarily estimable. . . Number of parameters p(p 1)/2 E ξ1 is not identified, assumed zero Only λk φ1/2 , or ratios λk /λj , are identified Set φ 1 Set one of λk 1

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsStata implementation Stata’s ml model lf structure Identification: by the first indicator, or by φ 1;implemented as constraints supported by ml Improper solutions workarounds: what if θ̂k 0? Goodness of fit tests Corrections for multivariate kurtosis traditional for SEMliterature (Satorra-Bentler standard errors and χ2 )

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsStata implementation Stata’s ml model lf structure Identification: by the first indicator, or by φ 1;implemented as constraints supported by ml Improper solutions workarounds: what if θ̂k 0? Goodness of fit tests Corrections for multivariate kurtosis traditional for SEMliterature (Satorra-Bentler standard errors and χ2 )

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsStata implementation Stata’s ml model lf structure Identification: by the first indicator, or by φ 1;implemented as constraints supported by ml Improper solutions workarounds: what if θ̂k 0? Goodness of fit tests Corrections for multivariate kurtosis traditional for SEMliterature (Satorra-Bentler standard errors and χ2 )

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsStata implementation Stata’s ml model lf structure Identification: by the first indicator, or by φ 1;implemented as constraints supported by ml Improper solutions workarounds: what if θ̂k 0? Goodness of fit tests Corrections for multivariate kurtosis traditional for SEMliterature (Satorra-Bentler standard errors and χ2 )

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsStata implementation Stata’s ml model lf structure Identification: by the first indicator, or by φ 1;implemented as constraints supported by ml Improper solutions workarounds: what if θ̂k 0? Goodness of fit tests Corrections for multivariate kurtosis traditional for SEMliterature (Satorra-Bentler standard errors and χ2 )

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsMata usage Normal likelihood, observation by observation; a lot ofst view’s and Cholesky decompositions. Earlier versionsused mkmat. . . that was a disaster! Satorra-Bentler corrections: b (n 1) 1 ˆ 0 Vn ˆ 1 ˆ 0 Vn Γn Vn ˆ ˆ 1ˆ 0 Vn [ θ)acov( 1ˆ σ , Vn 1/2 D 0 (A 1 n An )D, θ θbpAn Σ, vec Σ D vech Σ1 X(bi b̄)(bi b̄)0Γn n 1ibi (yi ȳ)(yi ȳ)0ˆ (analytic Mata functions for D (vec, invvech), derivatives, but with lots of matrix operations), b (st view)

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsMata usage Normal likelihood, observation by observation; a lot ofst view’s and Cholesky decompositions. Earlier versionsused mkmat. . . that was a disaster! Satorra-Bentler corrections: b (n 1) 1 ˆ 0 Vn ˆ 1 ˆ 0 Vn Γn Vn ˆ ˆ 1ˆ 0 Vn [ θ)acov( 1ˆ σ , Vn 1/2 D 0 (A 1 n An )D, θ θbpAn Σ, vec Σ D vech Σ1 X(bi b̄)(bi b̄)0Γn n 1ibi (yi ȳ)(yi ȳ)0ˆ (analytic Mata functions for D (vec, invvech), derivatives, but with lots of matrix operations), b (st view)

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsMata usage Normal likelihood, observation by observation; a lot ofst view’s and Cholesky decompositions. Earlier versionsused mkmat. . . that was a disaster! Satorra-Bentler corrections: b (n 1) 1 ˆ 0 Vn ˆ 1 ˆ 0 Vn Γn Vn ˆ ˆ 1ˆ 0 Vn [ θ)acov( 1ˆ σ , Vn 1/2 D 0 (A 1 n An )D, θ θbpAn Σ, vec Σ D vech Σ1 X(bi b̄)(bi b̄)0Γn n 1ibi (yi ȳ)(yi ȳ)0ˆ (analytic Mata functions for D (vec, invvech), derivatives, but with lots of matrix operations), b (st view)

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsSyntaxcfa1 varlist [if .] [in .][[pweight weight]],unitvar free posvarconstraint(numlist)cluster(varname) svyrobust vce(oim opg robust sbentler)from(starting values) level(#)ml options

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsDemonstrationDo something!

cfa1: SimpleCFA ModelsBroader CFA models?StasKolenikovU of Missouriφ12 φ11 Factoranalysis φ22 ionsλ5y1y2y3y4y5y6δ1 θ1 δ2 θ2 δ3 θ3 δ4 θ4 δ5 θ5 δ6 θ6 cfa (xi1:y1 y2 y3) (xi2:y4 y5 y6)

cfa1: SimpleCFA ModelsGeneral structural equationmodels?StasKolenikovU of MissouriFactoranalysisφ12 φ11 1x1δ1 θ1 sem (xi1:λ2x2δ2 θ2 λ3η1 φ22 y3 3 θ6 y2 2 θ5 y1 1 θ4 x3δ3 θ3 ζ1 σ1 x1 x2 x3) (eta1 .xi1 z1:y1 y2 y3)Parsing structural equation models is generally a nightmare. . .

cfa1: SimpleCFA ModelsStasKolenikovU of MissouriGLLAMMThe minimal syntax for a CFA example for gllamm tensionsg long id nreshape long y, i(id) j(k)g byte one 1tab k, gen(d)eq main: d1 d2 d3 d4gllamm y d*, eq(main) i(id) nocons s(main)

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsMplusThe minimal syntax for Mplus SEM package (text file inputand output)Title: Simple CFA exampleData: File cfa-example.txt;Type individual;Variable:Names y1 y2 y3 y4;Analysis:Type general;Model:xi by y1 y2 y3 y4;

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsSAS PROC CALISThe minimal syntax for SAS PROC CALISproc calis datalineqsy1 f1 y2 l2 f1 y3 l3 f1 y4 l4 f1 stde1 theta1,e2 theta2,e3 theta3,e4 theta4,f1 phi;run; cfa-example;e1,e2,e3,e4;Rigid variable names (F for factors/latent variables, E and Dfor errors and disturbances).

cfa1: SimpleCFA ModelsStasKolenikovU of xtensionsLISRELTI PRELIS processing of CFA exampleDA NI 4 NO 200 MI -999LAy1 y2 y3 y4RA cfa-example.txtOU RA cfa-example.psfTIDARALKMOEstimation of CFA exampleMA CM NI 4 NO 200 cfa-example.psfxiNK 1 NX 4LX FU, FRTD DI, FRFI LX(1,1) VA 1 LX(1,1)PDOU ME ML EF

cfa1: SimpleCFA ModelsStasKolenikovU of MissouriFactoranalysisDownload infonet from ///http://www.missouri.edu/ kolenikovs/statanet install cfa1ImplementationDemonstrationExtensionsfindit cfa1

Factor analysis Implementation Demonstration Extensions Factor analysis If one has p variables y1,.,yp, are there q p factors explaining most of the variability in y's? Exploratory factor analysis: find (simple) covariance structure in the data; a standard multivariate technique — see [MV] factor