|
2 | 2 | model = fit(MixedModel, @formula(reaction ~ 1 + (1 | subj)), dataset(:sleepstudy); |
3 | 3 | progress) |
4 | 4 | @test icc(model, :subj) == icc(model, [:subj]) == icc(model) |
5 | | - @test icc(model, :subj) ≈ 0.37918288 |
| 5 | + @test icc(model, :subj) ≈ 0.37918288 rtol = 1e-6 |
6 | 6 |
|
7 | 7 | formula = @formula(rt_trunc ~ 1 + spkr * prec * load + |
8 | 8 | (1 + spkr | subj) + |
|
25 | 25 |
|
26 | 26 | @testset "Binomial" begin |
27 | 27 | cbpp = dataset(:cbpp) |
28 | | - model = fit(MixedModel, @formula((incid / hsz) ~ 1 + (1 | herd)), |
29 | | - cbpp, Binomial(); wts=float(cbpp.hsz), progress) |
| 28 | + # suppress depwarn on wts vs weights |
| 29 | + model = @suppress fit(MixedModel, @formula((incid / hsz) ~ 1 + (1 | herd)), |
| 30 | + cbpp, Binomial(); wts=float(cbpp.hsz), progress) |
30 | 31 | @test icc(model, :herd) == icc(model, [:herd]) == icc(model) |
31 | 32 | @test icc(model, :herd) ≈ 0.1668 atol = 0.0005 |
32 | 33 | end |
|
36 | 37 | modelbern = fit(MixedModel, @formula(use ~ 1 + (1 | urban & dist)), |
37 | 38 | contra, Bernoulli(); fast=true, progress) |
38 | 39 | # force treating as a Binomial model |
39 | | - modelbin = fit(MixedModel, @formula(use ~ 1 + (1 | urban & dist)), |
40 | | - contra, Binomial(); fast=true, wts=ones(length(contra.dist)), progress) |
| 40 | + # suppress depwarn on wts vs weights |
| 41 | + modelbin = @suppress fit(MixedModel, @formula(use ~ 1 + (1 | urban & dist)), |
| 42 | + contra, Binomial(); fast=true, wts=ones(length(contra.dist)), |
| 43 | + progress) |
41 | 44 | # Bernoullis are a special case of binomial, so make sure they give the same answer |
42 | 45 | @test icc(modelbern, Symbol("urban & dist")) ≈ icc(modelbin, Symbol("urban & dist")) |
43 | 46 |
|
|
0 commit comments