PVE {polyqtlR} | R Documentation |
Function to determine the percentage variance explained (PVE) of a (maximal) QTL model, and explore sub-models.
Description
This function builds a (maximal) QTL model from previously detected QTL peaks and outputs the percentage variance explained (PVE)
of the full QTL model and all sub-models. It uses a similar approach to the fitting of genetic co-factors in the function QTLscan
.
The PVE is very similar to but not exactly equal to the adjusted R2 returned in QTLscan
at each position (and note: in the former case, these
R2 values are per-locus, while this function can estimate the PVE combined over multiple loci). The discrepancy has to do with how PVE is calculated
using the formula 100(1 - RSS0/RSS1), where RSS0 and RSS1 are the residual sums of squares of the NULL and QTL models, respectively.
Usage
PVE(
IBD_list,
Phenotype.df,
genotype.ID,
trait.ID,
block = NULL,
QTL_df = NULL,
prop_Pheno_rep = 0.5,
log = NULL,
verbose = FALSE
)
Arguments
IBD_list |
List of IBD probabilities |
Phenotype.df |
A data.frame containing phenotypic values |
genotype.ID |
The colname of |
trait.ID |
The colname of |
block |
The blocking factor to be used, if any (must be colname of |
QTL_df |
A 2-column data frame of previously-detected QTL; column 1 gives linkage group identifiers,
column 2 specifies the cM position of the QTL. If not specified, an error results. It can be convenient to generate a compatible
data.frame by first running the function |
prop_Pheno_rep |
The minimum proportion of phenotypes represented across blocks. If less than this, the individual is removed from the analysis. If there is incomplete data, the missing phenotypes are imputed using the mean values across the recorded observations. |
log |
Character string specifying the log filename to which standard output should be written. If |
verbose |
Should messages be written to standard output? |
Value
A list with percentage variance explained of maximal QTL model and all sub-models
Examples
data("IBD_4x","Phenotypes_4x")
PVE(IBD_list = IBD_4x,
Phenotype.df = Phenotypes_4x,
genotype.ID = "geno",trait.ID = "pheno",
block = "year",
QTL_df = data.frame(LG=1,cM=12.3))