R 在semPaths图中切换顺序
我使用Lavan作为sem模型,在表示最终路径图时遇到了问题。基本上,我希望在图形中间有中介变量(能力),即把位置与教育转换。为了更好地理解,我附上获得的图表和相关代码:R 在semPaths图中切换顺序,r,structural-equation-model,semplot,R,Structural Equation Model,Semplot,我使用Lavan作为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_in
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)
new_order?semPath,尝试查看reorder=FALSE
此外,尝试查看lavanplot@DJV yesp,我尝试了reorder=F,但结果完全相同。我将有一个在LavanPlot看,谢谢链接!