Description Usage Arguments Details Value Author(s) See Also Examples
This function uses pcSelect
to preselect some covariates
and then runs pcSelect
again on the reduced data set.
1 2  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 
0no output, 1small output, 2details (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 zvalues when testing partial correlations
between 
Xnew 
Preselected Variables. 
Philipp Ruetimann
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  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)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.