/* --------------------------------------------------------- FILE: sem.latent.nmtwins.sas DATA: National Merit Twin data PURPOSE: Structural Equation Modeling. Compare this with the output from file multreg.nmtwins.sas and sem.nmtwins.sas. This code treats the verbal and quantitative factors from the NMSQT as latent factors and family SES as a latent variable ---------------------------------------------------------- */ * - NOTE: Assign LIBNAME p7291 to the directory/folder containing the Natinoal Merit Twin data; *LIBNAME p7291 ''; OPTIONS NOCENTER NODATE PAGENO=1; TITLE National Merit Twins: Latent variables; TITLE2 Latent Family SES Variable; PROC CALIS DATA = p7291.nmtwins; VAR Moed -- FamInc; LINEQS Moed = b_Moed_FSES FSES + e_Moed, FAed = b_Faed_FSES FSES + e_Faed, Faminc = b_Finc_FSES FSES + e_Finc; STD FSES = V_FSES, e_Moed = Ve_Moed, e_Faed = Ve_Faed, e_Finc = Ve_Finc; * - constraints, set 1: constraints needed to identify the model; V_FSES = 1; TITLE2 Confirmatory Factor Analysis for NMSQT scales; PROC CALIS DATA=p7291.nmtwins CORR PRINT; VAR English -- Vocab; LINEQS English = lam11 FVerbal + lam12 FQuant + e_Eng, Math = lam21 FVerbal + lam22 FQuant + e_Math, SocSci = lam31 FVerbal + lam32 FQuant + e_SS, NatSci = lam41 FVerbal + lam42 FQuant + e_NS, Vocab = lam51 FVerbal + lam52 FQuant + e_Voc; STD FVerbal = V_FVerbal, FQuant = V_FQuant, e_Eng = V_eEng, e_Math = V_eMath, e_SS = V_eSS, e_NS = V_eNS, e_Voc = V_eVoc; COV FVerbal FQuant = COV_FVerb _FQuant; * - constraints: set 1: constraints needed to identify the model; V_FVerbal = 1; V_FQuant = 1; * - substantive constraints: hypothesized by the theory that one factor will be a verbal factor and the other will be a quantitative factor; lam12 = 0; lam52 = 0; lam21 = 0; RUN; TITLE2 Path Analysis with Latent Variables; PROC CALIS DATA=p7291.nmtwins CORR PRINT; VAR Moed Faed Faminc English -- Vocab; LINEQS English = lam11 FVerbal + lam12 FQuant + e_Eng, Math = lam21 FVerbal + lam22 FQuant + e_Math, SocSci = lam31 FVerbal + lam32 FQuant + e_SS, NatSci = lam41 FVerbal + lam42 FQuant + e_NS, Vocab = lam51 FVerbal + lam52 FQuant + e_Voc, FVerbal = b_FV_FSES FSES + d_FVerbal, FQUANT = b_FQ_FSES FSES + d_FQuant, Moed = lamMoedSES FSES + e_Moed, FAed = lamFAedSES FSES + e_Faed, Faminc = lamFincSES FSES + e_Finc; STD d_FVerbal = V_dFVerbal, d_FQuant = V_dFQuant, e_Eng = V_eEng, e_Math = V_eMath, e_SS = V_eSS, e_NS = V_eNS, e_Voc = V_eVoc, FSES = V_FSES, e_Moed = V_Moed, e_Faed = V_Faed, e_Finc = V_Finc; * - covariance for the residuals of the verbal and quantitative factors; COV d_FVerbal d_FQuant = COV_dFV_dFQ; * - constraints: set 1: constraints needed to identify the model; V_dFVerbal = 1; V_dFQuant = 1; V_Fses = 1; * - constraints: set 2: hypothesized by the theory that one factor will be a verbal factor and the other will be a quantitative factor, and that the SES factor had loadings on Moed Faed and Faminc with no residual correlations; lam12 = 0; lam52 = 0; lam21 = 0; RUN;