Description Usage Arguments Value Examples
This is the stable version (order independent version) of the pcSelect function (pc-Simple algorithm) in the pcalg package.
1 2 | pcSelect_stable(y, dm, alpha, corMethod = "standard", method = "stable",
verbose = FALSE, directed = FALSE)
|
y |
The target (response) variable. |
dm |
Data matrix with rows are samples and columns are variables. |
alpha |
Significance level of individual partial correlation tests. |
corMethod |
"standard" or "Qn" for standard or robust correlation estimation |
method |
Character string specifying method; the default, "stable" provides an Order-independent version. |
verbose |
Logical or in {0,1,2}; FALSE, 0: No output, TRUE, 1: Little output, 2: Detailed output. Note that such output makes the function very much slower. |
directed |
Logical; should the output graph be directed? |
G A logical vector indicating which column of dm is associated with y.
zMin The minimal z-values when testing partial correlations between y and each column of dm. The larger the number, the more consistent is the edge with the data.
1 2 3 4 5 6 7 8 9 10 11 | ##########################################
## Using pcSelect_stable
##########################################
library(pcalg)
library(parallel)
p <- 10
set.seed(101)
myDAG <- randomDAG(p, prob = 0.2)
n <- 1000
d.mat <- rmvDAG(n, myDAG, errDist = "normal")
pcSelect_stable(d.mat[,10],d.mat[,-10], alpha=0.05)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.