predict.glmnetcr {glmnetcr}R Documentation

AIC, BIC, Predicted Class, and Fitted Probabilities for All Models

Description

Returns the AIC, BIC, predicted class, and the fitted probabilities for the K classes for all steps along the path.

Usage

## S3 method for class 'glmnetcr'
predict(object, newx = NULL, ...)

Arguments

object

a glmnetcr object

newx

a data matrix representing the predictor variables, if missing defaults to original data used in fitting the model

...

additional optional arguments

Value

AIC

a numeric vector representing the AIC for each step

BIC

a numeric vector representing the BIC for each step

class

a matrix with n rows indicating the predicted class for each observation in newx for each stepp

probs

an array where for each step, a matrix of n rows and K columns indicates the fitted class probabilities for each observation and class

Author(s)

Kellie J. Archer, archer.43@osu.edu

See Also

See Also as glmnetcr, fitted.glmnetcr

Examples

data(diabetes)
x <- diabetes[, 2:dim(diabetes)[2]]
y <- diabetes$y
glmnet.fit <- glmnetcr(x, y)
result <- predict(glmnet.fit)
names(result)

[Package glmnetcr version 1.0.6 Index]