AIC.psem: Generic function for SEM AIC(c) score

View source: R/AIC_psem.R

AIC.psemR Documentation

Generic function for SEM AIC(c) score

Description

Generic function for SEM AIC(c) score

Usage

## S3 method for class 'psem'
AIC(object, ..., AIC.type = "loglik", aicc = FALSE)

Arguments

object

a psem object

...

additional arguments to AIC

AIC.type

whether the log-likelihood "loglik" or d-sep "dsep" AIC score should be reported. Default is "loglik"

aicc

whether correction for small sample size should be applied. Default is FALSE

Examples


mod <- psem(
lm(rich ~ cover, data = keeley),
lm(cover ~ firesev, data = keeley),
lm(firesev ~ age, data = keeley),
data = keeley
)

# Get log-likelihood based AIC
AIC(mod)

# Get d-sep based AIC
AIC(mod, AIC.type = "dsep")
 

piecewiseSEM documentation built on June 22, 2024, 9:53 a.m.