Learn R Programming

glmaag (version 0.0.6)

predict.glmaag: Prediction for glmaag

Description

Prediction using glmaag model

Usage

# S3 method for glmaag
predict(object, x, lam1, lam2, type = "link",
  cutp = 0.5, ...)

Arguments

object

fitted glmaag object

x

The new dataset to be predicted, do training prediction if x is missing

lam1

lambda1 sequence for prediction, must be within the fitted model

lam2

lambda2 sequence for prediction, must be within the fitted model

type

type of prediction (can be "link", "reponse"), ignored for Gaussian model. "link" is the linear predicted score, "response" is the predicted probability for logistic model and relative risk for Cox model

cutp

the cut off value for binary outcome, default to be 0.5

...

Value

predicted values

Examples

Run this code
# NOT RUN {
data(sampledata)
data(L0)
y <- sampledata$Y_Gau
x <- sampledata[, -(1:3)]
mod <- glmaag(y, x, L0)
pp <- predict(mod)
# }

Run the code above in your browser using DataLab