Learn R Programming

desk (version 1.1.2)

ols.infocrit: Calculate Common Information Criteria

Description

Calculates three common information criteria of models estimated by ols().

Usage

ols.infocrit(mod, which = "all", scaled = FALSE)

Value

A data frame of AIC, SIC, and PC values.

Arguments

mod

linear model object generated by ols().

which

string value specifying the type of criterion: "aic" (Akaike Information Criterion), "sic" (Schwarz Information Criterion), or "pc", (Prognostic Criterion), optional, if omitted then all criteria are returned ("all").

scaled

logical value which indicates whether criteria should be scaled by the number of observations T.

Examples

Run this code
wage.est <- ols(wage ~ educ + age, data = data.wage)
ols.infocrit(wage.est) # Return all criteria unscaled
ols.infocrit(wage.est, scaled = TRUE) # Return all criteria scaled
ols.infocrit(wage.est, which = "pc") # Return Prognostic Criterion unscaled

Run the code above in your browser using DataLab