I've recently tried to apply this function to my data and I'm not sure I am understanding the function or output correctly. I went through the 2023 paper and the forum, but I have yet to understand what is wrong with my model since I do not trust the reliability to be 1. I first ran measurement models (CFA) using
std.lv = T, auto.fix.first = F. Indicators are ordinal in the data set. Models had good fit. Then, I ran SAM to include a regression.
f1H_migration =~ htq1_05 + htq1_06 + htq1_17
f2H_isolation =~ htq1_19 + htq1_21 + htq1_30_34
f3H_victimization =~ htq1_7_10 + htq1_8_9 + htq1_11 + htq1_13_18 + htq1_14 + htq1_16 + htq1_20_24 + htq1_22 + htq1_25_to_29 + htq1_23
f4H_violencemig =~ htq1_04 + htq1_12_36 + htq1_15 + htq1_32 + htq1_35
f5H_witness =~ htq1_39 + htq1_37 + htq1_38
htq1_04 ~~ htq1_15
f2A_abuse =~ ace_4_6 + ace_4_7 + ace_4_8 + ace_5_1 + ace_5_2 + ace_5_3 + ace_5_4 + ace_6_1 + ace_6_3
f3A_sexual =~ ace_2_1R + ace_2_2R + ace_3_1 + ace_3_2 + ace_4_1 + ace_5_5 + ace_5_6 + ace_5_7 + ace_5_8
f4A_comviolence =~ ace_7_1 + ace_7_2 + ace_7_3
ace_3_2 ~~ ace_4_1
ace_2_1R ~~ ace_2_2R
ace_4_6 ~~ ace_4_7
ace_4_7 ~~ ace_4_8
### Structural
htq_ptsd_total ~ f1H_migration + f2H_isolation + f3H_victimization + f4H_violencemig + f5H_witness + f2A_abuse + f3A_sexual + f4A_comviolence + q102b_guess_age
"
fit <- sam(model_jptsd, data = data, cmd = "sem", mm.list = list("f1H_migration", "f2H_isolation" , "f3H_victimization", "f4H_violencemig", "f5H_witness", "f2A_abuse", "f3A_sexual", "f4A_comviolence"), mm.args = list(
std.lv = T, auto.fix.first = F))