Skip to contents

Previously called anova_SI. TOLDEO.

Usage

anova_likelihood_ratio_test(m1, m2)

Arguments

m1

model 1

m2

model 2

Value

A p-value.

Examples

# Simple example
dat <- datasets::airquality
m1 <- mgcv::gam(Ozone ~ s(Solar.R), data = dat)
m1
#> 
#> Family: gaussian 
#> Link function: identity 
#> 
#> Formula:
#> Ozone ~ s(Solar.R)
#> 
#> Estimated degrees of freedom:
#> 3.04  total = 4.04 
#> 
#> GCV score: 892.2281     
m2 <- mgcv::gam(Ozone ~ Wind + s(Solar.R), data = dat)
m2
#> 
#> Family: gaussian 
#> Link function: identity 
#> 
#> Formula:
#> Ozone ~ Wind + s(Solar.R)
#> 
#> Estimated degrees of freedom:
#> 2.77  total = 4.77 
#> 
#> GCV score: 614.5392     
# anova_likelihood_ratio_test(m1 = m1, m2 = m2)