JIVE.pred: Perform JIVE-predict

View source: R/JIVE.pred.R

JIVE.predR Documentation

Perform JIVE-predict

Description

Given multi-source data and an outcome, JIVE-predict will identify shared (joint) and source-specific (individual) underlying structure using Joint and Individual Variation Explained by Lock et al. (2013). These structures will then be used to construct a generalized linear model (GLM) for the outcome.

Usage

JIVE.pred(
  X,
  Y,
  family = "gaussian",
  rankJ = NULL,
  rankA = NULL,
  center = F,
  scale = F,
  orthIndiv = F,
  method = "perm",
  maxiter = 1000,
  showProgress = T
)

Arguments

X

A list of two or more linked data matrices. Each matrix must have the same number of columns which is assumed to be common.

Y

An outcome expressed as a vector with length equal to the number of columns in each view of X.

family

A string specifying the type of prediction model to fit. Options are "gaussian", "binomial", and "poisson". Model is fit using GLM.

rankJ

An integer specifying the joint rank of the data. If rankJ=NULL, ranks will be determined by the method option.

rankA

A vector specifying the individual ranks of the data. If rankA=NULL, ranks will be determined by the method option.

center

A boolean indicating whether or not X should be centered. Default is FALSE.

scale

A boolean indicating whether or not X should be scaled. Default is FALSE.

orthIndiv

A boolean indicating whether or not the algorithm should enforce orthogonality between individual structures. Default is FALSE.

method

A string with the method to use for rank selections. Possible options are "given" if the ranks are specified, "perm" to use JIVE's permutation approach, and "bic" to minimize the BIC. Default is "perm". See below for more details.

maxiter

The maximum number of iterations allowed in the JIVE method.

showProgress

A boolean indicating whether or not to give output showing the progress of the algorithm.

Details

The method requires the data to be centered and scaled. This can be done prior to running the method or by specifying center=T and scale=T. The rank of the joint and individual components can be pre-specified or adaptively selected within the function using JIVE's permutation approach (method="perm") or based on the Bayesian Information Criterion (method="bic"). When method="given", JIVE will use the user-specified ranks. If TRUE, showProgress will print out updates about the number of iterations the JIVE algorithm is taking and the progress of the rank selection method, if applicable.

JIVE-predict extends JIVE to allow for supervision. The function first runs JIVE to decompose multi-source data into low-rank, orthogonal joint and individual components. Each component can be further broken down into the loadings, or left eigenvectors, and the scores, the product of the eigenvalues and the right eigenvectors. The number of eigenvectors is equal to the rank of the component. JIVE-predict takes the scores from the fitted JIVE model and uses them in a GLM function to predict y.

Value

Returns an object of class JIVEpred. The function summary (i.e. summary.JIVEpred) can be used to summarize the model results, including a variance table and testing the significance of the joint and individual components.

An object of class "JIVEpred" is a list containing the following components.

jive.fit

A list of class "jive" containing the JIVE output. See the jive function from the r.jive R package for details about this object.

mod.fit

A list of class "glm" containing the GLM output. See the glm function from the stats R package for details about this object.

data.matrix

The data matrix that was used when fitting the GLM. The first column is the centered and scaled outcome, if applicable, and the remaining columns are the joint and individual score matrices.

family

A string stating which family was used when fitting the GLM.

See Also

predict.JIVEpred summary.JIVEpred

Examples

train.x <- list(matrix(rnorm(300), ncol=20), matrix(rnorm(200), ncol=20))
train.y <- rnorm(20)
train.fit <- JIVE.pred(X=train.x,Y=train.y,rankJ=1,rankA=c(1,1))

enorthrop/sup.r.jive documentation built on Nov. 18, 2022, 6:01 p.m.