QTL_pred_R2: Predicted QTL global and partial R squared

View source: R/QTL_pred_R2.R

QTL_pred_R2R Documentation

Predicted QTL global and partial R squared

Description

Compute predicted R squared in a validation set using QTLs detected in a training set. These values are corrected by the heritability her.

Usage

QTL_pred_R2(
  mppData.ts,
  mppData.vs,
  trait = 1,
  Q.eff = "cr",
  QTL = NULL,
  her = 1
)

Arguments

mppData.ts

An object of class mppData for the training set.

mppData.vs

An object of class mppData for the validation set.

trait

Numerical or character indicator to specify which trait of the mppData object should be used. Default = 1.

Q.eff

Character expression indicating the assumption concerning the QTL effects: 1) "cr" for cross-specific; 2) "par" for parental; 3) "anc" for ancestral; 4) "biall" for a bi-allelic. For more details see mpp_SIM. Default = "cr".

QTL

Object of class QTLlist representing a list of selected position obtained with the function QTL_select or vector of character marker positions names. Default = NULL.

her

Numeric value between 0 and 1 representing the heritability of the trait. her can be a single value or a vector specifying each within cross heritability. Default = 1.

Details

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.

Value

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.

Author(s)

Vincent Garin

See Also

QTL_R2, QTL_select

Examples


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)


vincentgarin/mppR documentation built on March 13, 2024, 7:30 p.m.