bootstrap_parametric_null: Compare nested generalized linear models via parametric...

View source: R/bootstrap_glm_null.R

bootstrap_parametric_nullR Documentation

Compare nested generalized linear models via parametric bootstrapping.

Description

This is the workhorse for the compare_models() function when a generalized linear model is specified and parametric bootstrap is required. This is not meant to be called by the user directly.

Usage

bootstrap_parametric_null(fit1, fit0, reps)

Arguments

fit1

glm object defining the full model.

fit0

glm object defining the reduced model.

reps

scalar; number of bootstrap replications to perform.

Value

vector of length reps containing the test statistic from each bootstrap replication. It also has an attribute containing an ANOVA table comparing the two models.

Examples

## Not run: 
fit1 <- glm(mpg ~ hp, data = mtcars)
fit0 <- glm(mpg ~ 1, data = mtcars)

bootstrap_parametric_null(fit, fit0, reps = 4999)

## End(Not run)


reyesem/IntroAnalysis documentation built on March 29, 2025, 3:29 p.m.