predictFSGL: Outputs Predicted Responses from an FSGL Model for New...

Description Usage Arguments Details Examples

View source: R/predictFSGL.R

Description

Outputs predicted response values for new user input observations at a specified lambda value

Usage

1
predictFSGL(x, newX, lam)

Arguments

x

fitted "FSGL" object

newX

covariate matrix for new observations whose responses we wish to predict

lam

the index of the lambda value for the model with which we desire to predict

Details

Predicted outcomes are given

Examples

1
2
3
4
5
6
7
8
9
n = 50; p = 100; size.groups = 10
index <- ceiling(1:p / size.groups)
X = matrix(rnorm(n * p), ncol = p, nrow = n)
beta = (-2:2)
y = X[,1:5] %*% beta + 0.1*rnorm(n)
data = list(x = X, y = y)
Fit = FSGL(data, index, type = "linear")
X.new = matrix(rnorm(n * p), ncol = p, nrow = n)
predictFSGL(Fit, X.new, 5)

xhnnnnn/FSGL documentation built on Jan. 7, 2022, 6:51 p.m.