mbecValidateModel: Validate Linear (Mixed) Models

Description Usage Arguments Details Value Examples

View source: R/mbecs_analyses.R

Description

A helper function that calculates the collinearity between model variables and stops execution, if the maximum value is bigger than the allowed threshold.

Usage

1
mbecValidateModel(model.fit, colinearityThreshold = 0.999)

Arguments

model.fit

lm() or lmm() output.

colinearityThreshold

Cut-off for model rejection, I=[0,1].

Details

ToDo: maybe some additional validation steps and more informative output.

Value

No return values. Stops execution if validation fails.

Examples

1
2
3
4
# This will just go through if colinearity threshold is met.
limimo <- lme4::lmer(dummy.list$cnts[,1] ~ group + (1|batch),
data=dummy.list$meta)
mbecValidateModel(model.fit=limimo, colinearityThreshold=0.999)

buschlab/MBECS documentation built on Jan. 21, 2022, 1:27 a.m.