Skip to content

Commit 05abcd9

Browse files
author
Alexey Stukalov
committed
test/multigroup: small tweaks
1 parent 60dbdc7 commit 05abcd9

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

test/examples/multigroup/build_models.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ if !isnothing(specification_miss_g1)
240240

241241
model_ml_varonly = Sem(
242242
specification = partable_varonly,
243-
data = dat_missing,
243+
data = dat_miss,
244244
semterm_column = :school,
245245
loss = SemFIML,
246246
observed = SemObservedMissing,

test/examples/multigroup/multigroup.jl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ const SEM = StructuralEquationModels
1010
include(joinpath(chop(dirname(pathof(SEM)), tail = 3), "test/examples/helper.jl"))
1111

1212
dat = example_data("holzinger_swineford")
13-
dat_missing = example_data("holzinger_swineford_missing")
14-
solution_lav = example_data("holzinger_swineford_solution")
13+
dat.school = Symbol.(replace.(dat.school, "-" => "_"))
14+
15+
dat_miss = example_data("holzinger_swineford_missing")
16+
dat_miss.school = Symbol.(replace.(dat_miss.school, "-" => "_"))
1517

16-
dat_g1 = dat[dat.school .== "Pasteur", :]
17-
dat_g2 = dat[dat.school .== "Grant-White", :]
18+
solution_lav = example_data("holzinger_swineford_solution")
1819

19-
dat_miss_g1 = dat_missing[dat_missing.school .== "Pasteur", :]
20-
dat_miss_g2 = dat_missing[dat_missing.school .== "Grant-White", :]
20+
dat_g1 = dat[dat.school .== :Pasteur, :]
21+
dat_g2 = dat[dat.school .== :Grant_White, :]
2122

22-
dat.school = ifelse.(dat.school .== "Pasteur", :Pasteur, :Grant_White)
23-
dat_missing.school = ifelse.(dat_missing.school .== "Pasteur", :Pasteur, :Grant_White)
23+
dat_miss_g1 = dat_miss[dat_miss.school .== :Pasteur, :]
24+
dat_miss_g2 = dat_miss[dat_miss.school .== :Grant_White, :]
2425

2526
############################################################################################
2627
### specification - RAMMatrices

0 commit comments

Comments
 (0)