Predict the response variable in validation datasets.
Source:R/metapredict_predict.R
metapredict.RdMerge the discovery datasets with each validation dataset, train a glmnet
model on the samples from the discovery datasets, then predicts the response
variable for the samples in the respective validation dataset.
Usage
metapredict(
ematList,
studyMetadata,
sampleMetadata,
discoveryStudyNames,
alpha,
lambda,
weights,
batchColname = "study",
covariateName = NA,
className = "class",
type = "response",
...
)Arguments
- ematList
Named list of expression matrices.
- studyMetadata
data.frameof study metadata.- sampleMetadata
data.frameof sample metadata, with rownames corresponding to sample names.- discoveryStudyNames
vector of study names for training.
- alpha
value of alpha for the elastic net mixing parameter.
- lambda
value of regularization parameter.
- weights
vector of weights for training the
glmnetmodel.- batchColname
column in
sampleMetadatacontaining batch information forsva::ComBat().- covariateName
column in
sampleMetadatacontaining additional covariates forsva::ComBat()besides batch.- className
column in
sampleMetadatacontaining values of the response variable.- type
type of prediction to make, passed to
glmnet::predict.glmnet().- ...
Other arguments passed to
glmnet::glmnet().
Value
A named list of objects from glmnet::predict.glmnet().