ch.ICfromRSS: A function calculate the AIC and BIC from a residual sum of...

View source: R/ch.ICfromRSS.r

ch.ICfromRSSR Documentation

A function calculate the AIC and BIC from a residual sum of squares

Description

This function calculates the AIC and BIC from a residual sum of squares. The residual sum of squares, the number of data points, as well as the number of free parameters are input. ICtype specifies whether to output the AIC or BIC.

Usage

ch.ICfromRSS(rss, n, numParameters, ICtype = "BIC")

Arguments

rss

The residual sum of squares from a model fit.

n

The number of observation from which the rss was calculated.

numParameters

The number of free parameters.

ICtype

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

Value

the AIC or BIC.

Examples

ch.ICfromRSS (myRss, 40, 5, ICtype = "BIC")

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