blr_test_lr: Likelihood ratio test

View source: R/blr-lrtest.R

blr_test_lrR Documentation

Likelihood ratio test

Description

Performs the likelihood ratio test for full and reduced model.

Usage

blr_test_lr(full_model, reduced_model)

## Default S3 method:
blr_test_lr(full_model, reduced_model)

Arguments

full_model

An object of class glm; model with all predictors. Only binary logistic regression models (binomial family with logit link) are supported. Weighted models (any prior weight other than 1) and grouped binomial models (cbind(successes, failures) or proportions) are not supported; the model must be fitted with model = TRUE, y = TRUE.

reduced_model

An object of class glm; nested model. Optional if you are comparing the full_model with an intercept only model.

Value

Two tibbles with model information and test results.

See Also

Other model fit statistics: blr_model_fit_stats(), blr_multi_model_fit_stats(), blr_pairs(), blr_rsq_adj_count(), blr_rsq_cox_snell(), blr_rsq_effron(), blr_rsq_mcfadden_adj(), blr_rsq_mckelvey_zavoina(), blr_rsq_nagelkerke()

Examples

# compare full model with intercept only model
# full model
model_1 <- glm(honcomp ~ female + read + science, data = hsb2,
            family = binomial(link = 'logit'))

blr_test_lr(model_1)

# compare full model with nested model
# nested model
model_2 <- glm(honcomp ~ female + read, data = hsb2,
            family = binomial(link = 'logit'))

blr_test_lr(model_1, model_2)



blorr documentation built on Nov. 16, 2026, 9:07 a.m.