lrt | R Documentation |
A method is implemented for all the mmi model classes. A method is also implemented for the family class. In that case the method is basically a loop over all models stored in the family and then the method for the model is called for each model element. If the method is called on a model object a tidy tibble will be set up with the result for the treatment or the treatment levels. If the method is called on a family object individual tibbles will be set up for each model element which will then be binded together in a map-reduce pattern.
lrt(object)
## S3 method for class 'mmi_model'
lrt(object)
## S3 method for class 'fam'
lrt(object)
object |
Either an mmi model object or an mmi model family object. |
Will loop through all treatment variables and fit null models for them. This is done using
update methods for the model fit if that works (depends on how the model fit is implemented),
otherwise it's done by using update on the get_formula
formula. P values are
then computed using the logLik
method on the null and full models.
mmi_model
: Performs a likelihood ratio test for the lm
object in the
slot fit and sets up a tibble for the result.
fam
: Loops over all model elements in the family and does a lrt test for each; tidy tibbles with
this information will then be binded together. Also computes the FDR-adjusted significance
level.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.