AnovaGLM.jl
AnovaBase.anova — Methodanova(<glmmodels>...; test::Type{<: GoodnessOfFit}, <keyword arguments>)
anova(<anovamodel>; test::Type{<: GoodnessOfFit}, <keyword arguments>)
anova(test::Type{<: GoodnessOfFit}, <glmmodels>...; <keyword arguments>)
anova(test::Type{<: GoodnessOfFit}, <anovamodel>; <keyword arguments>)Analysis of variance.
Return AnovaResult{M, test, N}. See AnovaResult for details.
Arguments
glmmodels: model objectsTableRegressionModel{<: LinearModel}fitted byGLM.lmTableRegressionModel{<: GeneralizedLinearModel}fitted byGLM.glm
anovamodel: wrapped model objects;FullModelandNestedModels.test: test statistics for goodness of fit. Available tests areLikelihoodRatioTest(LRT) andFTest. The default is based on the model type.TableRegressionModel{<: LinearModel}:FTest.TableRegressionModel{<: GeneralizedLinearModel}: based on distribution function, seecanonicalgoodnessoffit.
Other keyword arguments
- When one model is provided:
typespecifies type of anova (1, 2 or 3). Default value is 1.
- When multiple models are provided:
check: allows to check if models are nested. Defalut value is true. Some checkers are not implemented now.
AnovaGLM.anova_lm — Functionanova_lm(X, y; test::Type{<: GoodnessOfFit} = FTest, <keyword arguments>)
anova_lm(test::Type{<: GoodnessOfFit}, X, y; <keyword arguments>)
anova(test::Type{<: GoodnessOfFit}, ::Type{LinearModel}, X, y;
type::Int = 1,
<keyword arguments>)ANOVA for simple linear regression.
Arguments
Xandycan be aMatrixand aVectoror aFormulaand aTables.jlcompatible data.test: test statistics for goodness of fit.
Keyword arguments
test: test statistics for goodness of fit.typespecifies type of anova (1, 2 or 3). Default value is 1.dropcollinearcontrols whether or notlmaccepts a model matrix which is less-than-full rank. If true (the default), only the first of each set of linearly-dependent columns is used. The coefficient for redundant linearly dependent columns is 0.0 and all associated statistics are set to NaN.
anova_lm generate a TableRegressionModel object, which is fitted by lm.
AnovaGLM.anova_glm — Functionanova_glm(X, y, d::UnivariateDistribution, l::Link = canonicallink(d);
test::Type{<: GoodnessOfFit} = canonicalgoodnessoffit(d), <keyword arguments>)
anova_glm(test::Type{<: GoodnessOfFit}, X, y, d::UnivariateDistribution, l::Link = canonicallink(d); <keyword arguments>)
anova(test::Type{<: GoodnessOfFit}, X, y, d::UnivariateDistribution, l::Link = canonicallink(d); <keyword arguments>)ANOVA for genaralized linear models.
Arguments
Xandycan be aMatrixand aVectoror aFormulaand aTables.jlcompatible data.d: aGLM.UnivariateDistribution.l: aGLM.Linktest: test statistics for goodness of fit based on distribution function. Seecanonicalgoodnessoffit.
For other keyword arguments, see fit.
AnovaBase.nestedmodels — Methodnestedmodels(trm::TableRegressionModel{<: LinearModel}; null::Bool = true, <keyword arguments>)
nestedmodels(trm::TableRegressionModel{<: GeneralizedLinearModel}; null::Bool = true, <keyword arguments>)
nestedmodels(::Type{LinearModel}, formula, data; null::Bool = true, <keyword arguments>)
nestedmodels(::Type{GeneralizedLinearModel}, formula, data, distr::UnivariateDistribution, link::Link = canonicallink(d); null::Bool = true, <keyword arguments>)Generate nested nested models NestedModels from a model or formula and data.
The null model will be a model with at least one factor (including intercept) if the link function does not allow factors to be 0 (factors in denominators) or the keyword argument null is false (default value is true).
InverseLinkforGammaInverseSquareLinkforInverseGaussianLinearModelfitted withCholeskyPivotedwhendropcollinear = true
Otherwise, it will be an empty model.