opt.ic: Optimization routine based on information criteria.

Description Usage Arguments Value Examples

Description

This function optimizes a model using information critera as a decision rule. This solves many of the problems related to model selection based on hypothesis tests, see also opt.h. In finite samples, the AIC is known to favor large models. The corrected AIC is a slightly stricter measure.

Usage

1
2
opt.ic(model, Y, X, KLIC = "AICc", returntype = "model", tracelevel = 0,
  memorymanagement = FALSE)

Arguments

model

The model to be optimized. Supports "lm" for the linear probability model, "logit" for the logistic probability model, and "probit" for the probit model.

Y

The binary response variable.

X

A dataframe with collumns of exogenous regressors.

KLIC

information criterion to be used, "AIC" or "AICc", See also IC

returntype

"model", "data", or "colnames"

tracelevel

level of printing.

memorymanagement

logical, indicating whether memory should be more actively managed.

Value

"model", "data", or "colnames", to be specified in returnype.

Examples

1
2
3
4
randomlogit <- simulateLogit(nobs=500, pars = c(0.5, -0.4, -0.3, 0.1, 0.05, 0.025, 0, 0, 0, 0))
Y=randomlogit[,1]
X=randomlogit[,-1]
opt.ic(model="lm", Y, X)

BPJandree/AutoGLM documentation built on May 5, 2019, 10:25 a.m.