ipflasso.predict {ipflasso}R Documentation

Using an IPF-lasso model for prediction of new observations

Description

Derives predictions for new observations from a model fitted by the functions cvr.ipflasso or cvr2.ipflasso.

Usage

ipflasso.predict(object, Xtest)

Arguments

object

the output of either cvr.ipflasso (if the user chooses the penalty factor himself) or cvr2.ipflasso (if the user cross-validates the penalty factor).

Xtest

a ntest x p matrix containing the values of the predictors for the test data. It should have the same number of columns as the matrix X used to obtain the model result.

Value

A list with the following arguments:

linpredtest

a ntest-vector giving the value of the linear predictor for the test observations

classtest

a ntest-vector with values 0 or 1 giving the predicted class for the test observations (for binary Y).

probabilitiestest

a ntest-vector giving the predicted probability of Y=1 for the test observations (for binary Y).

Author(s)

Anne-Laure Boulesteix (https://www.en.ibe.med.uni-muenchen.de/mitarbeiter/professoren/boulesteix/index.html)

References

Boulesteix AL, De Bin R, Jiang X, Fuchs M, 2017. IPF-lasso: integrative L1-penalized regression with penalty factors for prediction based on multi-omics data. Comput Math Methods Med 2017:7691937.

Examples

# load ipflasso library
library(ipflasso)

# generate dummy data
X<-matrix(rnorm(50*200),50,200)
Xtest<-matrix(rnorm(20*200),20,200)
Y<-rbinom(50,1,0.5)

# fitting the IPF-lasso model
model1<-cvr.ipflasso(X=X,Y=Y,family="binomial",standardize=FALSE,
                    blocks=list(block1=1:50,block2=51:200),
                    pf=c(1,2),nfolds=5,ncv=10,type.measure="class")

# making predictions from Xtest
ipflasso.predict(object=model1,Xtest=Xtest)

[Package ipflasso version 1.1 Index]