pcRes {pcgen} | R Documentation |
The pc algorithm applied to residuals
Description
The standard pc algorithm applied to GBLUP residuals, or to the GBLUP itself.
Usage
pcRes(suffStat, alpha= 0.01, K = NULL, m.max = Inf, verbose = FALSE,
covariates = NULL, QTLs = integer(), cov.method = "uni",
use.GBLUP = FALSE, return.pvalues = FALSE)
Arguments
suffStat |
A data.frame, of which the first column is the factor G (genotype), and subsequent columns contain the traits, and optionally some QTLs. The name of the first column should be G. |
alpha |
The significance level used in the test. Default is 0.01. |
K |
A genetic relatedness matrix. If |
m.max |
Maximum size of the conditioning set, in the pc-algorithm on the residuals. |
verbose |
If |
covariates |
A data.frame containing covariates, that should always be used in each conditional independence test. Should be either |
QTLs |
Column numbers in suffStat that correspond to QTLs. |
cov.method |
A string, specifying which method should be used to compute the GBLUP. Options are |
use.GBLUP |
Use the GBLUP itself, instead of the residuals |
return.pvalues |
If |
Details
If use.GBLUP = FALSE
, GBLUP residuals are used as input for the pc-stable algorithm of Colombo and Maathuis (2014). This closely resembles the residual networks of Valente et al., (2010) and Topner et al., (2017) (who used different ways to predict the genetic effects, and applied other causal inference algorithms to the residuals). When use.GBLUP = TRUE
, pc-stable is applied to the GBLUP itself, which resembles the genomic networks of Topner et al., (2017). If cov.method = "uni"
, the GBLUP and the residuals are computed separately for each trait in suffStat. The covariance of each trait is assumed to be
\sigma_G^2 Z K Z^t + \sigma_E^2 I_n
where Z
is a binary incidence matrix, assigning plants or plots to genotypes. Z
is based on the first column in suffStat. If there is a single observation per genotype (typically a genotypic mean), Z
is the identity matrix, and the relatedness matrix K
should be specified. If there are replicates
for at least some of the genotypes, and no K
is provided, independent genetic effects are assumed (K
will be the identity matrix). It is also possible to have replicates and specify a non-diagonal K
. Whenever K
is specified, sommer (mmer2) will be used; otherwise lmer (lme4).
mmer2 is also used when cov.method = "us"
, in which case the multivariate GBLUP is computed, for all traits in suffStat simultaneously. This is only possible for a limited number of traits.
Value
If return.pvalues = FALSE
, the output is a graph (an object with S3 class "pcgen"
). If return.pvalues = TRUE
, the output is a list with elements gr
(the graph) and pMax
(a matrix with the p-values).
Author(s)
Willem Kruijer and Pariya Behrouzi. Maintainers: Willem Kruijer willem.kruijer@wur.nl and Pariya Behrouzi pariya.behrouzi@gmail.com
References
1. Colombo, D. and Maathuis, M.H., 2014. Order-independent constraint-based causal structure learning. The Journal of Machine Learning Research, 15(1), pp.3741-3782.
2. Kruijer, W., Behrouzi, P., Rodriguez-Alvarez, M. X., Wit, E. C., Mahmoudi, S. M., Yandell, B., Van Eeuwijk, F., (2018, in preparation), Reconstruction of networks with direct and indirect genetic effects.
3. Topner, K., Rosa, G.J., Gianola, D. and Schon, C.C., 2017. Bayesian Networks Illustrate Genomic and Residual Trait Connections in Maize (Zea mays L.). G3: Genes, Genomes, Genetics, pp.g3-117.
4. Valente, B.D., Rosa, G.J., Gustavo, A., Gianola, D. and Silva, M.A., 2010. Searching for recursive causal structures in multivariate quantitative genetics mixed models. Genetics.
Examples
data(simdata)
out <- pcRes(suffStat = simdata, alpha = 0.01, verbose= FALSE)