cic: Covariance inflation criterion

Description Usage Arguments Value Author(s) References See Also Examples

Description

Computes the covariance inflation criterion (CIC) of Tibshirani and Knight (1999) for submodels of a full linear model.

Usage

1
cic(y, X, nperms = 499, covests = NULL, nullcic = NULL)

Arguments

y

outcome vector

X

model matrix. This should not include an intercept column; such a column is added by the function.

nperms

number of permuted data sets to generate.

covests

sum of the null-hypothesis covariances between the outcomes and the fitted values for the best linear model of each size. If NULL, covariance is estimated from permuted data.

nullcic

CIC for the intercept-only model.

Value

A list with components

leaps

all-subsets regression object (for the unpermuted data) returned by function leaps in package leaps.

covests

sum of the (estimated) null-hypothesis covariances between the outcomes and the fitted values for the best linear model of each size.

enp

effective number of parameters for models of each size, as defined by Tibshirani and Knight (1999).

cic

CIC for each of the models given in the leaps component.

nullcic

CIC for the intercept-only model.

best

vector of logicals indicating which predictors are included in the minimum-CIC model.

Author(s)

Philip Reiss phil.reiss@nyumc.org and Lei Huang huangracer@gmail.com

References

Tibshirani, R., and Knight, K. (1999). The covariance inflation criterion for adaptive model selection. Journal of the Royal Statistical Society, Series B, 61, 529–546.

See Also

leaps (in the package of the same name)

Examples

1
2
3
data(swiss)
cicobj = cic(swiss$Fertility, swiss[ , -1])
cicobj$best

Example output

Loading required package: leaps
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-33. For overview type 'help("mgcv-package")'.
Permutation 20 
Permutation 40 
Permutation 60 
Permutation 80 
Permutation 100 
Permutation 120 
Permutation 140 
Permutation 160 
Permutation 180 
Permutation 200 
Permutation 220 
Permutation 240 
Permutation 260 
Permutation 280 
Permutation 300 
Permutation 320 
Permutation 340 
Permutation 360 
Permutation 380 
Permutation 400 
Permutation 420 
Permutation 440 
Permutation 460 
Permutation 480 
Warning messages:
1: In 2 * sigma2.hat * covests.rep :
  Recycling array of length 1 in array-vector arithmetic is deprecated.
  Use c() or as.vector() instead.

2: In cic1 + cic2 + cic3 :
  Recycling array of length 1 in vector-array arithmetic is deprecated.
  Use c() or as.vector() instead.

     Agriculture      Examination        Education         Catholic 
            TRUE             TRUE             TRUE             TRUE 
Infant.Mortality 
            TRUE 

reams documentation built on May 2, 2019, 2:23 p.m.