pcgen {pcgen} | R Documentation |
Causal inference with genetic effects
Description
Reconstruction of directed networks with random genetic effects, based on phenotypic observations. The pcgen algorithm is a modification of the pc-stable algorithm of Colombo & Maathuis (2014) . It is assumed that there are replicates, and independent genetic effects.
Usage
pcgen(suffStat, covariates = NULL, QTLs = integer(), alpha = 0.01, m.max = Inf,
fixedEdges = NULL, fixedGaps = NULL, verbose = FALSE, use.res = FALSE,
res.cor = NULL, max.iter = 50, stop.if.significant = TRUE, 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. Should not contain covariates. |
covariates |
A data.frame containing covariates, that should always be used in each conditional independence test Should be either |
QTLs |
Column numbers in |
alpha |
The significance level used in each conditional independence test. Default is 0.01 |
m.max |
Maximum size of the conditioning sets |
fixedEdges |
A logical matrix of dimension |
fixedGaps |
A logical matrix of dimension |
verbose |
If |
use.res |
If |
res.cor |
If |
max.iter |
Maximum number of iterations in the EM-algorithm, used to fit the bivariate mixed model (when |
stop.if.significant |
If |
return.pvalues |
If |
Details
The pcgen
function is based on the pc
function from the pcalg package (Kalisch et al. (2012) and Hauser and Buhlmann (2012)).
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. 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.
2. 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.
3. Kalisch, M., Machler, M., Colombo, D., Maathuis, M.H. and Buhlmann, P., 2012. Causal inference using graphical models with the R package pcalg. Journal of Statistical Software, 47(11), pp.1-26.
4. Hauser, A. and Buhlmann, P., 2012. Characterization and greedy learning of interventional Markov equivalence classes of directed acyclic graphs. Journal of Machine Learning Research, 13(Aug), pp.2409-2464.
See Also
Examples
data(simdata)
out <- pcgen(simdata)
data(simdata)
rs <- getResiduals(suffStat = simdata)
pc.fit1 <- pcgen(suffStat = simdata, alpha = 0.01, verbose = TRUE,
use.res = TRUE, res.cor = cor(rs))