Almost. Use this syntax, but add group = "education".
Yves.
> <mailto:
edward...@gmail.com>> napisał(a):
>
> Where you have a multiplier or NA* in front of a variable, that is
> where lavaan would look for information about how many groups you
> have. Your structure is fine for just one group, but if there are
> multiple groups, then lavaan expects multiple multipliers or
> modifiers. So, for example, in the line that says:
> GF =~ NA*AC + PM + SC + DF + VAL + CA
> with two groups, you should write:
> GF =~ c(NA,NA)*AC + PM + SC + DF + VAL + CA
>
> and in the line that says:
> GF ~~ 1*GF
> with two groups, you should write:
> GF ~~ c(1,1)*GF
>
> This only changes the last 4 lines of your syntax, but I think that
> will solve your problem.
>
>
>
> On Tue, Jul 18, 2023 at 10:25 AM Maria Cyniak-Cieciura
> <
mcyniak-...@swps.edu.pl <mailto:
mcyniak-...@swps.edu.pl>>
> wrote:
>
> I believe this is what I have already done:
>
> model_MPFI_2 <- 'AC =~ MPFI_A1 + MPFI_A2 + MPFI_A3 + MPFI_A4 +
> MPFI_A5
> PM =~ MPFI_CH1 + MPFI_CH2 + MPFI_CH3 + MPFI_CH4 + MPFI_CH5
> SC =~ MPFI_JA1 + MPFI_JA2 + MPFI_JA3 + MPFI_JA4 + MPFI_JA5
> DF =~ MPFI_D1 + MPFI_D2 + MPFI_D3 + MPFI_D4 + MPFI_D5
> VAL =~ MPFI_W1 + MPFI_W2 + MPFI_W3 + MPFI_W4 + MPFI_W5
> CA =~ MPFI_ZD1 + MPFI_ZD2 + MPFI_ZD3 + MPFI_ZD4 + MPFI_ZD5
> EA =~ MPFI_U1 + MPFI_U2 + MPFI_U3 + MPFI_U4 + MPFI_U5
> LPM =~ MPFI_BCH1 + MPFI_BCH2 + MPFI_BCH3 + MPFI_BCH4 + MPFI_BCH5
> SCT =~ MPFI_SJA1 + MPFI_SJA2 + MPFI_SJA3 + MPFI_SJA4 + MPFI_SJA5
> FUS =~ MPFI_F1 + MPFI_F2 + MPFI_F3 + MPFI_F4 + MPFI_F5
> LVAL =~ MPFI_BW1 + MPFI_BW2 + MPFI_BW3 + MPFI_BW4 + MPFI_BW5
> INAC =~ MPFI_BEZ1 + MPFI_BEZ2 + MPFI_BEZ3 + MPFI_BEZ4 + MPFI_BEZ5
> GF =~ NA*AC + PM + SC + DF + VAL + CA
> GINF =~ NA*EA + LPM + SCT + FUS + LVAL + INAC
> GF ~~ 1*GF
> GINF ~~ 1*GINF'
>
> The loading of the first indicator of higher order factors is
> free and the variance of higher order factors is fixed to 1.
>
> I have converted data to data.frame and checked that "education"
> is numeric and is coded as 1 (secondary education) and 2 (higher
> education). Everything looks good.
>
> wt., 18 lip 2023 o 14:32
rpc...@psu.edu <mailto:
rpc...@psu.edu>
> <
rpc...@psu.edu <mailto:
rpc...@psu.edu>> napisał(a):
>
> When running the multiple group model, did you adjust the
> syntax for GF and GINF, or did you leave it the same as it
> was when running the single group model? If you didn't
> adjust the syntax, try c(NA,NA) for the first indicator of
> both variables and try c(1,1) when specifying their variance.
> On Monday, July 17, 2023 at 7:20:23 PM UTC-4
>
https://groups.google.com/d/msgid/lavaan/c59e2f83-1e2f-405f-b8d3-f2f62ebb193bn%40googlegroups.com <
https://groups.google.com/d/msgid/lavaan/c59e2f83-1e2f-405f-b8d3-f2f62ebb193bn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
>
> You received this message because you are subscribed
> to a topic in the Google Groups "lavaan" group.
> To unsubscribe from this topic, visit
>
https://groups.google.com/d/topic/lavaan/-rKKcg4VTOc/unsubscribe <
https://groups.google.com/d/topic/lavaan/-rKKcg4VTOc/unsubscribe>.
> To unsubscribe from this group and all its topics,
> send an email to
lavaan+un...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/lavaan/CAHxMgefZbYhZzfTAdFvM7fDq-%2B35BhFYvXoz8Oyu6AWfz%2BYg0g%40mail.gmail.com <
https://groups.google.com/d/msgid/lavaan/CAHxMgefZbYhZzfTAdFvM7fDq-%2B35BhFYvXoz8Oyu6AWfz%2BYg0g%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Dr n. społ. Maria Cyniak-Cieciura
>
> --
> You received this message because you are subscribed to a
> topic in the Google Groups "lavaan" group.
> To unsubscribe from this topic, visit
>
https://groups.google.com/d/topic/lavaan/-rKKcg4VTOc/unsubscribe <
https://groups.google.com/d/topic/lavaan/-rKKcg4VTOc/unsubscribe>.
> <mailto:
lavaan+un...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/lavaan/a3ea046f-a029-41b8-bdec-09d17ed838d0n%40googlegroups.com <
https://groups.google.com/d/msgid/lavaan/a3ea046f-a029-41b8-bdec-09d17ed838d0n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Dr n. społ. Maria Cyniak-Cieciura
>
> --
> You received this message because you are subscribed to the
> Google Groups "lavaan" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to
lavaan+un...@googlegroups.com
> <mailto:
lavaan+un...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/lavaan/CAMHZWPutuhF2%3DQkLOocj2D4Racuqg2eyQp6rb1p_vDMzO4NcCg%40mail.gmail.com <
https://groups.google.com/d/msgid/lavaan/CAMHZWPutuhF2%3DQkLOocj2D4Racuqg2eyQp6rb1p_vDMzO4NcCg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> <
https://groups.google.com/d/topic/lavaan/-rKKcg4VTOc/unsubscribe>.
> <mailto:
lavaan+un...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/lavaan/CAHxMgectFFXV2nt-vemcxxkzRir0X_n1gYaMAgS958DMWt51mQ%40mail.gmail.com <
https://groups.google.com/d/msgid/lavaan/CAHxMgectFFXV2nt-vemcxxkzRir0X_n1gYaMAgS958DMWt51mQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Dr n. społ. Maria Cyniak-Cieciura
>
> --
> You received this message because you are subscribed to the Google
> Groups "lavaan" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
lavaan+un...@googlegroups.com
> <mailto:
lavaan+un...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/lavaan/CAMHZWPsSYhk_HW%3DL_D7%2BLAMi4_G-enYj%3D2rdxJ%2B6Fp-N8x%2Bc9Q%40mail.gmail.com <
https://groups.google.com/d/msgid/lavaan/CAMHZWPsSYhk_HW%3DL_D7%2BLAMi4_G-enYj%3D2rdxJ%2B6Fp-N8x%2Bc9Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.