I have data from an RCT with one control group and one treatment group and trying to explore mediators for changes in the outcome of interest (i.e. pathways of change). My final model is defined as follows:
Pathway_final <- '
# measurement model
fin_b =~ Save_CT3 + ESSborrow_l_CT3_revers + ESSborrow_f_CT3_revers
effi =~ SSE_month_CT3 + SSE_plan_CT3
aspir =~ DS8_CT3 + DS5_CT3_revers + DS4_CT3 + DS13_CT3 + DS17_CT3 + DS9_CT3_revers +DS21_CT3_revers
sup_emo =~ SSS1_CT3 + SSS2_CT3+ SSS3_CT3 +SSS4_CT3+ SSS6_CT3 +SSS7_CT3+ SSS8_CT3 +SSS13_CT3 +SSS14_CT3 +SSS15_CT3 +SSS16_CT3 +SSS17_CT3 +SSS18_CT3 +SSS19_CT3
pos_involv =~ APQ1_CT3+ APQ4_CT3 + APQ7_CT3 + APQ9_CT3 + APQ11_CT3 + APQ14_CT3 +APQ15_CT3+APQ20_CT3+ APQ23_CT3 + APQ26_CT3
# regressions
effi ~ TrialArm
sup_emo ~ TrialArm
aspir ~ TrialArm
pos_involv ~ TrialArm
fin_b ~ effi + aspir +TrialArm
aspir ~ sup_emo + pos_involv
effi ~ sup_emo + pos_involv
sup_emo ~ ~ pos_involv
effi ~~ aspir
# residual correlations
DS8_CT3 ~~ DS4_CT3
DS5_CT3_revers ~~ DS21_CT3_revers
SSS2_CT3 ~~ SSS3_CT3
#orthogonal factors
fin_b ~~ 0*effi
fin_b ~~ 0*aspir
fin_b ~~ 0*sup_emo
fin_b ~~ 0*pos_involv'
However, as treatment was assigned at the village cluster level, I wonder whether standard errors should be clustered? How can I implement the above command?
Cross posted here: https://groups.google.com/forum/#!topic/lavaan/biNdNFm6BmQ
clustered_STS <- svydesign(ids = ~Cluster_AT1a , data = STS_Data) fit.path <- lavaan.survey(fit, survey.design = clustered_STS)
It gives me the results but I get the following warning: "Some of the standard errors may not be trustworthy. Some of the observed covariances or means are collinear, and this has generated collinearity in your parameter estimates. This may be a sample size issue, missing data problem, or due to having too few clusters relative to the number of parameters. Problem encountered in group(s)" n cluster was 40. $\endgroup$