Skip to content

Commit

Permalink
Merge pull request #8 from yufongpeng/release-0.2.2
Browse files Browse the repository at this point in the history
Release 0.2.2
  • Loading branch information
yufongpeng committed Mar 19, 2023
2 parents 5a0505c + 0f3f2f7 commit 7efec0a
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 101 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AnovaMixedModels"
uuid = "6832ca0c-c2dd-4d0c-851a-521ca5db42f5"
authors = ["Yu-Fong Peng <sciphypar@gmail.com>"]
version = "0.2.1"
version = "0.2.2"

[deps]
AnovaBase = "946dddda-6a23-4b48-8e70-8e60d9b8d680"
Expand Down
6 changes: 3 additions & 3 deletions src/anova.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function anova(::Type{FTest},
assign = asgn(predictors(aovm))
fullpred = predictors(aovm.model)
fullasgn = asgn(fullpred)
df = dof_asgn(assign)
df = tuple(dof_asgn(assign)...)
dfr = dof_residual_pred(aovm)
# calculate degree of freedom for factors and residuals
varβ = vcov(aovm.model)
Expand Down Expand Up @@ -185,10 +185,10 @@ function anova(
# isnested is not part of _iscomparable:
# isnested = true
dev = (_criterion(m0), deviance.(models[2:end])...)
lrt_nested(NestedModels{Union{M, T}}(models), df, dev, 1)
lrt_nested(MixedAovModels{Union{M, T}}(models), df, dev, 1)
end

anova(::Type{LikelihoodRatioTest}, aovm::NestedModels{M}) where {M <: Union{GLM_MODEL, MixedModel}} =
anova(::Type{LikelihoodRatioTest}, aovm::MixedAovModels{M}) where {M <: Union{GLM_MODEL, MixedModel}} =
lrt_nested(aovm, df = dof.(aovm.model), deviance_mixedmodel.(aovm.model), 1)

# =================================================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion src/io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function anovatable(aov::AnovaResult{<: FullModel{M}, FTest}; rownames = prednam
rownames, 4, 3)
end

function anovatable(aov::AnovaResult{NestedModels{M, N}, LRT};
function anovatable(aov::AnovaResult{MixedAovModels{M, N}, LRT};
rownames = string.(1:N)) where {M <: Union{GLM_MODEL, MixedModel}, N}
if last(aov.anovamodel.model).optsum.REML
AnovaTable([
Expand Down
Loading

2 comments on commit 7efec0a

@yufongpeng
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/79877

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.2 -m "<description of version>" 7efec0a4535f44d8b1fdc1673f2d0b22399fd236
git push origin v0.2.2

Please sign in to comment.