我将 lavaan 用于我的 sem 模型,但在表示最终路径图时遇到了麻烦。基本上,我希望在图表中间有中介变量(能力),即通过教育切换位置。为了更好地理解,我附上了获得的图表和相关代码:
new_order<- '
#Measurement model - latent variables
ability =~ c_cgwri_dv + c_cgwrd_dv + c_cgs7ca_dv + c_cgvfc_dv + c_cgna_dv
education=~edu_r
income=~log_income
father_class=~a_panssec8_dv
agree =~ c_big5a_dv
consc =~ c_big5c_dv
neur =~ c_big5n_dv
open =~ c_big5o_dv
extro =~ c_big5e_dv
employment =~ job_type
experience =~ labour_experience
#Structural model - Pahts
education ~ father_class + agree + neur + open + extro + consc
ability ~ education + father_class
income ~ education + ability + father_class + agree + neur + open + extro + consc + employment + experience
#Correlations
c_cgwri_dv ~~ c_cgwrd_dv
c_cgs7ca_dv ~~ c_cgna_dv
c_cgwri_dv ~~ c_cgvfc_dv
c_cgwrd_dv ~~ c_cgvfc_dv
c_cgvfc_dv ~~ c_cgna_dv
c_cgs7ca_dv ~~ c_cgvfc_dv
employment ~~ ability
employment ~~ education
experience ~~ ability
education ~~ experience
agree ~~ ability
consc ~~ ability
neur ~~ ability
open ~~ ability
extro ~~ ability
father_class ~~ agree + consc + neur + open + extro
'
order_fit<-sem(new_order, male, missing="ml", sampling.weights = "c_indscub_xw")
summary(order_fit, standardize=T, fit.measures=T, rsq=T)
semPaths(order_fit, what="std", fade=F, edge.label.cex=1, sizeMan=7, sizeLat=7, exoCov = F, exoVar = F, intercepts = F, rotation = 2)
关于如何转换能力(abl)和教育(edc)的位置的任何想法?谢谢