| fci | R Documentation |
This is a wrapper function for the fci function as
implemented in the pcalg package. All computations are carried out by the
pcalg package. The default output object however matches that of tfci, see
this function for details about how the adjacency matrix is encoded.
fci(
data = NULL,
sparsity = 10^(-1),
test = regTest,
suffStat = NULL,
method = "stable.fast",
methodNA = "none",
methodOri = "conservative",
output = "pag",
varnames = NULL,
...
)
data |
A data.frame with data. All variables should be assigned to exactly one period by prefixing them with the period name (see example below). |
sparsity |
The sparsity level to be used for independence testing (i.e. significance level threshold to use for each test). |
test |
A procedure for testing conditional independence.
The default, |
suffStat |
Sufficient statistic. If this argument is supplied, the sufficient statistic is not computed from the inputted data. The format and contents of the sufficient statistic depends on which test is being used. |
method |
Which method to use for skeleton construction, must be
|
methodNA |
Method for handling missing information ( |
methodOri |
Method for handling conflicting separating sets when orienting
edges, must be one of |
output |
One of |
varnames |
A character vector of variable names. It only needs to be supplied
if the |
... |
Further optional arguments which are passed to
|
# simulate linear Gaussian data w unobserved variable L1
n <- 100
L1 <- rnorm(n)
X1 <- rnorm(n)
X2 <- L1 + X1 + rnorm(n)
X3 <- X1 + rnorm(n)
X4 <- X3 + L1 + rnorm(n)
d <- data.frame(p1_X1 = X1,
p1_X2 = X2,
p2_X3 = X3,
p2_X4 = X4)
# use FCI algorithm to recover PAG
fci(d, test = corTest)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.