R2 computation
Description
Calculates the R2 of a cluster of SNPs.
Usage
1  compute.r2(x, y, res.multisplit, covar = NULL, SNP_index = NULL)

Arguments
x 
The input matrix, of dimension 
y 
The response vector. It can be continuous or discrete. 
res.multisplit 
The output of 
covar 

SNP_index 

Details
The R2 of a cluster of SNPs is computed on the second halfsamples.
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.
Value
The R2 value of the SNP cluster
References
Buzdugan, L. et al. (2015), Assessing statistical significance in predictive genomewide association studies. (unpublished)
Examples
1 2 3 4 5 6 7 8 