Skip to content

Commit c76ad4b

Browse files
20231115 - CCA
1 parent 666c38d commit c76ad4b

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

08-Structural-Equation-Modeling.Rmd

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,99 @@ Thus, [formative constructs](#formativeConstruct) are challenging to use in a SE
537537
To estimate a [formative construct](#formativeConstruct) in a SEM framework, the [formative construct](#formativeConstruct) must be used in the context of a model that allows some constraints.\index{construct!formative}\index{structural equation modeling!model identification}\index{structural equation modeling!degrees of freedom}
538538
However, emerging techniques such as confirmatory composite analysis allow estimation of [formative](#formativeConstruct) latent factors [@Schuberth2023; @Yu2023].\index{construct!formative}\index{confirmatory composite analysis}
539539

540+
Below is an example using confirmatory composite analysis (adapted from: https://confirmatorycompositeanalysis.com/tutorials-lavaan; archived at: https://perma.cc/7LSU-PTZR):
541+
542+
```{r}
543+
formativeModel3_syntax <- '
544+
# Specification of the reflective latent factor
545+
reflective =~ y1 + y2 + y3 + y4
546+
547+
# Specification of the associations between the observed variables v1 - v4
548+
# and the emergent variable "formative" in terms of composite loadings.
549+
550+
formative =~ NA*v1 + l11*v1+ l21*v2 + 1*v3 + l41*v4
551+
552+
formative ~~ vformative*formative
553+
554+
# Specification of the associations between the observed variables v1 - v4
555+
# and their excrescent variables in terms of composite loadings.
556+
557+
nu11 =~ 1*v1 + l22*v2 + l32*v3 + l42*v4
558+
nu12 =~ 0*v1 + 1*v2 + l33*v3 + l43*v4
559+
nu13 =~ 0*v1 + 0*v2 + l34*v3 + 1*v4
560+
561+
nu11 ~~ vnu11*nu11
562+
nu12 ~~ vnu12*nu12
563+
nu13 ~~ vnu13*nu13
564+
565+
# Specification of the covariances among the latent variables
566+
formative ~~ reflective
567+
568+
# The H-O specification assumes that the excrescent variables are uncorrelated.
569+
# Therefore, the covariance between the excrescent variables is fixed to 0:
570+
571+
nu11 ~~ 0*nu12 + 0*nu13
572+
nu12 ~~ 0*nu13
573+
574+
# Moreover, the H-O specification assumes that the excrescent variables are uncorrelated
575+
# with the emergent and latent variables. Therefore, the covariances between
576+
# the emergent and the excrescent varibales are fixed to 0:
577+
578+
formative ~~ 0*nu11 + 0*nu12 + 0*nu13
579+
580+
reflective =~ 0*nu11 + 0*nu12 + 0*nu13
581+
582+
# In lavaan, the =~ command is originally used to specify a common factor model,
583+
# which assumes that each observed variable is affected by a random measurement error.
584+
# It is assumed that the observed variables forming composites are free from
585+
# random measurement error. Therefore, the variances of the random measurement errors
586+
# originally attached to the observed variables by the common factor model are fixed to 0:
587+
588+
v1 ~~ 0*v1
589+
v2 ~~ 0*v2
590+
v3 ~~ 0*v3
591+
v4 ~~ 0*v4
592+
593+
# Specify weights:
594+
w1:= (-l32 + l22*l33 + l34*l42 - l22*l34*l43)/(
595+
1 - l11*l32 - l21*l33 + l11*l22*l33 - l34*l41 + l11*l34*l42 +
596+
l21* l34* l43 - l11* l22* l34* l43)
597+
w2:= (-l33 + l34*l43)/(1 - l11*l32 - l21*l33 +
598+
l11*l22*l33 - l34*l41 + l11*l34*l42 + l21*l34*l43 - l11*l22*l34*l43)
599+
w3:= 1/(1 - l11*l32 - l21*l33 + l11*l22*l33 -
600+
l34*l41 + l11*l34*l42 + l21*l34*l43 - l11*l22*l34*l43)
601+
w4:= -l34/(1 - l11*l32 - l21*l33 + l11*l22*l33 -
602+
l34*l41 + l11*l34*l42 + l21*l34*l43 - l11*l22*l34*l43)
603+
604+
vv1 := l11^2*vformative + vnu11
605+
vv2 := l21^2*vformative + l22^2*vnu11 + vnu12
606+
vv3 := vformative + l32^2*vnu11 + l33^2 * vnu12 + l34^2*vnu13
607+
vv4 := l41^2*vformative + l42^2*vnu11 + l43^2*vnu12 + vnu13
608+
609+
w1std := w1*(vv1/vformative)^(1/2)
610+
w2std := w2*(vv2/vformative)^(1/2)
611+
w3std := w3*(vv3/vformative)^(1/2)
612+
w4std := w4*(vv4/vformative)^(1/2)
613+
'
614+
615+
formativeModel3Fit <- sem(
616+
formativeModel3_syntax,
617+
data = PoliticalDemocracy,
618+
missing = "ML",
619+
estimator = "MLR")
620+
621+
formativeModel3Parameters <- parameterEstimates(formativeModel3Fit)
622+
formativeModel3Parameters
623+
624+
fitMeasures(formativeModel3Fit, "df")
625+
626+
semPaths(
627+
formativeModel3Fit,
628+
what = "Std.all",
629+
layout = "tree2",
630+
edge.label.cex = 0.8)
631+
```
632+
540633
## Additional Types of SEM {#additionalSEMmodels}
541634

542635
Up to this point, we have discussed SEM with dimensional constructs.\index{dimensional}

0 commit comments

Comments
 (0)