pcgenTest {pcgen} | R Documentation |
The conditional independence test in pcgen
Description
This performs the conditional independence test used in the pcgen algorithm, assuming there are replicates, and independent genetic effects.
Usage
pcgenTest(x, y, S, suffStat, QTLs = integer(), covariates = NULL, alpha = 0.01,
max.iter = 50, stop.if.significant = TRUE, use.res = FALSE, res.cor = NULL)
Arguments
x , y |
Column numbers in |
S |
vector of integers defining the conditioning set, where the integers refer to column numbers in |
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. It should not contain covariates. |
QTLs |
Column numbers in |
covariates |
A data.frame containing covariates. It should be either |
alpha |
The significance level used in the test. The test itself of course does not depend on this, but it is used in the EM-algorithm to speed up calculations. When |
max.iter |
Maximum number of iterations in the EM-algorithm, used to fit the bivariate mixed model (when |
stop.if.significant |
If |
use.res |
If |
res.cor |
If |
Details
pcgenTest
tests for conditional independence between x
and y
given S
.
It distinguishes 2 situations:
(i) if one of x
and y
(say x
) is the factor G, pcgenTest
will test if the genetic variance in y
is zero, given the traits in S. (ii) if x
and y
are both traits, pcgenTest
tests if the residual covariance between them is zero, given the traits in S
and the factor G. The factor G is automatically included in the conditioning set S
(S
does not need to contain the integer 1). This test is either based on a bivariate mixed model (when use.res=FALSE
), or on residuals from GBLUP (use.res=T
), obtained with the getResiduals function. In the latter case, res.cor
must be provided.
Value
A p-value
Author(s)
Willem Kruijer and Pariya Behrouzi. Maintainers: Willem Kruijer willem.kruijer@wur.nl and Pariya Behrouzi pariya.behrouzi@gmail.com
References
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.
See Also
Examples
data(simdata)
rs <- getResiduals(suffStat= simdata)
pcgenTest(suffStat= simdata, x= 2, y= 3, S= 4)
pcgenTest(suffStat= simdata, x= 2, y= 3, S= c(1,4))
pcgenTest(suffStat= simdata, x= 2, y= 3, S= 4, use.res= TRUE, res.cor= cor(rs))
pcgenTest(suffStat= simdata, x= 2, y= 1, S= 4)