Attachment | Size |
---|---|
![]() | 35.37 KB |
Hi all,
Hopefully the hangover from Boulder has passed when you read this :)
I want the CIs from this multigroup SEM, but it is only printing out the paths for males (I think). Here is the MWE, data in the attached:
m1 <- " # RI-CLPM with 3 timepoints # latents psy_0 =~ saps_0 + sans_0 psy_24 =~ saps_24 + sans_24 psy_48 =~ saps_48 + sans_48 # random intercepts ri_psy =~ 1*psy_0 + 1*psy_24 + 1*psy_48 ri_vol =~ 1*total_gray_vol_0 + 1*total_gray_vol_24 + 1*total_gray_vol_48 # causal total_gray_vol_24 ~ psy_0 psy_24 ~ total_gray_vol_0 total_gray_vol_48 ~ psy_24 psy_48 ~ total_gray_vol_24 # autoregressive total_gray_vol_24 ~ total_gray_vol_0 total_gray_vol_48 ~ total_gray_vol_24 psy_24 ~ psy_0 psy_48 ~ psy_24 # immediate psy_0 ~~ total_gray_vol_0 # total_gray_vol_0 ~ psychosis_0 psy_24 ~~ total_gray_vol_24 #total_gray_vol_24 ~ psychosis_24 psy_48 ~~ total_gray_vol_48 #total_gray_vol_48 ~ psychosis_48 " ma <- umxRAM(m1, name="males", data = dom %>% filter(sex=="male"), std.lv = F, optimizer = "SLSQP", tryHard = "yes", autoRun = "no") mb <- umxRAM(m1, name="females", data = dom %>% filter(sex=="female"), std.lv = F, optimizer = "SLSQP",tryHard = "yes", autoRun = "no") mgo <- umxSuperModel("Multigroup", ma, mb, tryHard = "yes") mgo <- umxCI(mgo, run = "yes", which="ALL")
Which results in:
Running Multigroup with 38 parameters [1/1] MxComputeGradientDescent(SLSQP) evaluations 13833 fit -0.9224 cha [6/1] MxComputeGradientDescent(SLSQP) evaluations 43557 fit -0.203474 c [9/1] MxComputeGradientDescent(SLSQP) evaluations 74415 fit 0.0158719 ch lbound estimate ubound total_gray_vol_0_with_total_gray_vol_0 0.139 0.407 0.935 total_gray_vol_0_to_total_gray_vol_24 -0.275 -0.068 0.478 total_gray_vol_0_to_psy_24 -0.459 -0.111 0.117 total_gray_vol_24_to_total_gray_vol_48 0.021 0.285 0.875 total_gray_vol_24_to_psy_48 -0.611 -0.229 -0.014 psy_0_to_total_gray_vol_24 -1.378 -1.022 -0.649 psy_0_to_sans_0 0.935 1.187 1.510 psy_0_to_psy_24 0.384 0.922 1.278 psy_24_to_total_gray_vol_48 -1.291 -0.958 -0.650 psy_24_to_sans_24 1.025 1.237 1.516 psy_24_to_psy_48 -0.199 0.051 0.339 psy_48_to_sans_48 -18.689 3.711 NA total_gray_vol_24_with_total_gray_vol_24 0.181 0.259 0.398 total_gray_vol_48_with_total_gray_vol_48 0.047 0.147 0.435 sans_0_with_sans_0 0.155 0.284 0.428 saps_0_with_saps_0 0.371 0.500 0.661 sans_24_with_sans_24 0.042 0.140 0.252 saps_24_with_saps_24 0.305 0.416 0.559 sans_48_with_sans_48 -27.883 -0.978 0.090 saps_48_with_saps_48 0.543 0.843 1.347 psy_0_with_total_gray_vol_0 -0.676 -0.463 -0.304 psy_0_with_psy_0 0.248 0.458 0.673 psy_24_with_total_gray_vol_24 -0.081 -0.019 0.058 psy_24_with_psy_24 -0.110 0.024 0.123 psy_48_with_total_gray_vol_48 -0.154 -0.016 0.107 psy_48_with_psy_48 0.006 0.119 0.357 ri_psy_with_ri_psy -0.021 0.009 0.816 ri_psy_with_ri_vol -0.007 0.118 0.286 ri_vol_with_ri_vol 0.098 0.580 0.839 one_to_total_gray_vol_0 -0.117 0.015 0.147 one_to_total_gray_vol_24 -0.068 0.082 0.233 one_to_total_gray_vol_48 0.428 0.575 0.741 one_to_sans_0 -0.136 0.005 0.146 one_to_saps_0 -0.154 -0.013 0.128 one_to_sans_24 -0.144 -0.003 0.138 one_to_saps_24 -0.173 -0.025 0.123 one_to_sans_48 -0.410 -0.135 0.141 one_to_saps_48 -0.336 -0.036 0.258
Now the above are only the males CIs plus the means. Where is the females CIs?
- What am I missing
Many thanks,
Luis
Ok, I figured this out.
It is related to how umx labels the paths, you just have to change them accordingly: