| QTL_pred_R2 | R Documentation | 
Compute predicted R squared in a validation set using QTLs detected in a
training set. These values are corrected by the heritability her.
QTL_pred_R2(
  mppData.ts,
  mppData.vs,
  trait = 1,
  Q.eff = "cr",
  QTL = NULL,
  her = 1
)
| mppData.ts | An object of class  | 
| mppData.vs | An object of class  | 
| trait | 
 | 
| Q.eff | 
 | 
| QTL | Object of class  | 
| her | 
 | 
Compute QTLs predicted R squared in a validation set  (mppData.vs).
These QTLs have been previously detected in a training set
(mppData.ts). The global R squared (R2 = cor(y.ts,y.pred.ts)^2) is
obtained using the Pearson squared correlation between the observed trait
values in the validation set (y.vs) and predicted values using estimated QTL
effects in the training set (y.pred.vs = X.vs * B.ts).
After that the values are corrected by the general or within cross
heritability her. By default her = 1 which means that the
R squared represent the proportion of explained phenotypic variance. The
values are returned per cross (R2.cr) or averaged at the population
level (glb.R2).
Partial R squared statistics are also calculated for each individual position. The partial R squared are computed by making the difference between the global R squared and the R squared computed without the ith position.
Return:
List containing the following objects:
| glb.R2 | Global predicted R squared corrected for the heritability of all QTL terms. Doing the average of the within cross predicted R squared (R2.cr) | 
| R2.cr | Within cross predicted R squared corrected for the heritability | 
| part.R2.diff | Vector of predicted partial R squared corrected for the heritability doing the difference between the full model and a model minus the ith QTL. | 
Vincent Garin
QTL_R2, QTL_select
data(mppData)
folds <- CV_partition(cross.ind = mppData$cross.ind, k = 5)
mppData.ts <- subset(x = mppData, gen.list = folds[[1]]$train.set)
mppData.vs <- subset(x = mppData, gen.list = folds[[1]]$val.set)
SIM <- mpp_SIM(mppData = mppData)
QTL <- QTL_select(SIM)
QTL_pred_R2(mppData.ts = mppData.ts, mppData.vs = mppData.vs, QTL = QTL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.