Estimate Subgraph around a Response Variable using Preselection
pcSelect.presel(y, dm, alpha, alphapre, corMethod = "standard", verbose = 0, directed=FALSE)
y |
Response vector. |
dm |
Data matrix (rows: samples, cols: nodes; i.e.,
|
alpha |
Significance level of individual partial correlation tests. |
alphapre |
Significance level for pcSelect in preselection |
corMethod |
"standard" or "Qn" for standard or robust correlation estimation |
verbose |
0-no output, 1-small output, 2-details (using 1 and 2 makes the function very much slower) |
directed |
Logical; should the output graph be directed? |
First, pcSelect
is run using alphapre
. Then,
only the important variables are kept and pcSelect
is run on
them again.
pcs |
Logical vector indicating which column of |
zMin |
The minimal z-values when testing partial correlations
between |
Xnew |
Preselected Variables. |
Philipp Ruetimann
p <- 10 ## generate and draw random DAG : set.seed(101) myDAG <- randomDAG(p, prob = 0.2) if(require(Rgraphviz)) plot(myDAG, main = "randomDAG(10, prob = 0.2)") ## generate 1000 samples of DAG using standard normal error distribution n <- 1000 d.mat <- rmvDAG(n, myDAG, errDist = "normal") ## let's pretend that the 10th column is the response and the first 9 ## columns are explanatory variable. Which of the first 9 variables ## "cause" the tenth variable? y <- d.mat[,10] dm <- d.mat[,-10] res <- pcSelect.presel(d.mat[,10], d.mat[,-10], alpha=0.05, alphapre=0.6)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.