Learn R Programming

glmaag (version 0.0.6)

predict.cv_glmaag: Predict

Description

Prediction for cv_glmaag model

Usage

# S3 method for cv_glmaag
predict(object, x, type1se = T, type = "link", ...)

Arguments

object

the estimated cv_glmaag model

x

the new dataset for prediction, if omitted returns the training prediction

type1se

whether or not using the coefficients by one standard error ruld, default to be TRUE

type

can be either "link", or "response", link returns linear predicted score, For Gaussian model this option can be ingnored, for logistic model "response" returns predicted probability, for Cox model "reponse" returns relative risk

...

Value

the predicted value

Examples

Run this code
# NOT RUN {
data(sampledata)
data(L0)
y <- sampledata$Y_Gau
x <- sampledata[, -(1:3)]
cvwhich <- sample(rep(0:4, length.out = length(y)))
mod <- cv_glmaag(y, x, L0, cvwhich = cvwhich)
pp <- predict(mod)
# }

Run the code above in your browser using DataLab