Summary of Lecture 6 Part I lavaan Program

  • Slides: 2
Download presentation
Summary of Lecture 6 (Part I): lavaan: Program for estimating CTT models q Setting

Summary of Lecture 6 (Part I): lavaan: Program for estimating CTT models q Setting up a model: Specifying an equation for each latent construct. q Specification of constraints on parameters: Ø Ø Ø Constraints on coefficients are specified by providing names to the coefficients of the variables. Standard setting of fixing first loading to 1 can be discarded by using the coefficient NA for the first variable. Variances and covariances are constrained by using ~~ together with the relevant variables and names as coefficients. q Fitting the model using function cfa(). q Inspecting results using function inspect(object, what = "fit") or what = "est" or summary().

Summary of Lecture 6 (Part II): lavaan: Program for estimating CTT models q Example:

Summary of Lecture 6 (Part II): lavaan: Program for estimating CTT models q Example: H 2 <- 'eta. X =~ NA*X 1 + lambda 1*X 2 eta. Y =~ NA*Y 1 + lambda 2*Y 2 eta. X ~~ 1*eta. X eta. Y ~~ 1*eta. Y eta. X ~~ 1*eta. Y H 2. Fit = 649, H 2. Res # Latent constructs: # Setting variance of each construct to 1 # Setting covariance to 1 X 1 ~~ e 1*X 1 # Equal error variances for each pair X 2 ~~ e 1*X 2 Y 1 ~~ e 2*Y 1 Y 2 ~~ e 2*Y 2‘ <- cfa(H 2, meanstructure = F, sample. cov = data. mat, sample. nobs likelihood = "Wishart") <- inspect(H 2. Fit, what = "fit")[3: 5] # Extract fit values <- inspect(H 2. Fit, what = "est") # Extract matrices