Description

Calculates the R2 of a cluster of SNPs.

Usage

1

Arguments

x

The input matrix, of dimension nobs x nvar. Each row
represents a subject, each column a SNP.

y

The response vector. It can be continuous or discrete.

res.multisplit

The output of multisplit.

covar

NULL or the matrix of covariates one wishes to control
for, of size nobs x ncovar.

SNP_index

NULL or the index vector of the cluster of SNPs whose R2 will be
computed. See the 'Details' section.

Details

The R2 of a cluster of SNPs is computed on the second half-samples.
The cluster members, are intersected with the SNPs selected by the lasso, and
the R2 of this model is calculated. Thus, we obtain B R2 values. Finally, the
mean of these values is taken. If the value of SNP_index is NULL, the R2 of the full
model with all the SNPs will be computed.