Skip to content

Commit d40f9ce

Browse files
committed
test StatsModels.termvars(t::RandomEffectsTerm)
1 parent db34d60 commit d40f9ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/FactorReTerm.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ end
8787
f = @formula(Y ~ 1 + (1 + G|G))
8888
@test_throws ArgumentError apply_schema(f, schema(f, slp, contrasts), LinearMixedModel)
8989
end
90+
91+
@testset "Detect both blocking and experimental variables" begin
92+
# note that U is not in the fixed effects because we want to make square
93+
# that we're detecting all the variables in the random effects
94+
f = @formula(Y ~ 1 + (1 + U|G))
95+
form = apply_schema(f, schema(f, slp, contrasts), LinearMixedModel)
96+
@test StatsModels.termvars(form.rhs) == [:U, :G]
97+
end
9098
end
9199

92100
#=

0 commit comments

Comments
 (0)