ch.IC: A function calculate the AIC and BIC from a model fit

View source: R/ch.IC.r

ch.ICR Documentation

A function calculate the AIC and BIC from a model fit

Description

This function calculates the AIC and BIC from a from a model fit. The empirical Y and the fit Y, as well as the number of free parameters are input. If one wants standardize Y and the fit Y before calculation, then set "standardize" to TRUE. ICtype specifies whether to output the AIC or BIC.

Usage

ch.IC(y, fitY, numParameters, standardize = FALSE, ICtype = "BIC")

Arguments

y

A numeric vector containing the empirical Y from the data.

fitY

A numeric vector containing the fit Y from the model.

numParameters

The number of free parameters.

standardize

A boolean that specifies whether to standardize the scores before calculating the BIC. Standardization is useful if you want to combine different DVs into a single BIC (e.g., RT and accuracy). DEFAULT = FALSE.

ICtype

A string specifying whether to return the AIC or BIC. Valid inputs are: "AIC" and "BIC". DEFAULT = "BIC" '

Value

the AIC or BIC.

Examples

ch.IC (myY, fitY, 5, ICtype = "AIC")

ccpluncw/ccpl_R_chutils documentation built on Feb. 28, 2024, 1:17 a.m.