Skip to content

Commit

Permalink
zero int fix in type III table
Browse files Browse the repository at this point in the history
  • Loading branch information
PharmCat committed May 4, 2021
1 parent aad9ff1 commit 0dff537
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/anova.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ function anova(lmm::LMM{T}; ddf::Symbol = :satter) where T
fac[i] = "(Intercept)"
elseif typeof(lmm.mf.f.rhs.terms[i]) <: InterceptTerm{false}
push!(d, i)
fac[i] = ""
continue
else
fac[i] = string(lmm.mf.f.rhs.terms[i].sym)
Expand Down
8 changes: 8 additions & 0 deletions test/test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,14 @@ end
@test collect(Metida.confint(lmm)[6]) [0.05379033790060175, 0.23713821749515449] atol=1E-8
anovatable = Metida.anova(lmm)
@test anovatable.pval [3.087934998046721e-63, 0.9176105002577626, 0.6522549061162943, 0.002010933915677479] atol=1E-4

lmm = Metida.LMM(@formula(lnpk~0+sequence+period+treatment), dfrds;
random = Metida.VarEffect(Metida.@covstr(treatment|subject), Metida.CSH),
repeated = Metida.VarEffect(Metida.@covstr(treatment|subject), Metida.DIAG),
)
Metida.fit!(lmm)
anovatable = Metida.anova(lmm)
@test anovatable.pval [8.129457925585042e-74, 0.6522549061174356, 0.0020109339157131302] atol=1E-4
end
################################################################################
# Errors
Expand Down

0 comments on commit 0dff537

Please sign in to comment.