Description Usage Arguments Details Value See Also Examples
View source: R/ICP-variable_analysis.R
The variable_analysis function takes an ICP object and
outputs evidence for each individual variable being a direct cause.
1 | variable_analysis(x, gof = 0.1)
|
x |
An ICP object |
gof |
If no set of variables (including the empty set) leads to a
p-value larger than the goodness-of-fit cutoff |
The function variable_analysis takes an ICP object and a
minimum goodness-of-fit cutoff gof and outputs the evidence for each
individual variable being a direct cause. To conduct a variable analysis the
inputted ICP object should be the result of a call to the
ICP function with option fullAnalysis = TRUE. This
ensures that variable_analysis has access to the p-values for all the
hypothses (H0,S) (see
ICP for an explanation of the hypotheses).
If the needed gof level is reached the significance is calculated for
each variable Xi by
The gof parameter protects against making statements when the model is
obviously not suitable for the data. If no model reaches the threshold
gof significance level, i.e. the p-values for
(H0,S) are all smaller then
gof, we report that there is no evidence for individual variables, as
there is no evidence for an invariant set.
The variable_analysis function is also used internally in the
ICP function itself if ICP is called with
level specified and fullAnalysis = TRUE.
variable_analysis returns a table with class
"variable_analysis" where each row reports the significance of the
corresponding variable.
The variable_analysis function is also used internally in the
ICP function itself if ICP is called with
fullAnalysis = TRUE.
model_analysis is another function for summarizing
ICP objects.
1 2 3 4 5 6 7 8 9 10 11 12 | n <- 100
E <- sample(5L, n, replace = TRUE)
X <- data.frame(X1 = rnorm(n, E, 1), X2 = rnorm(n, 3, 1))
Y <- rnorm(n, X$X1, 1)
obj <- ICP(Y, X, E, level = 0.05, fullAnalysis = TRUE)
variable_analysis(obj, gof = 0.1)
# If we make extreem requirements for gof
# all "p-values" will be taken to be 1,
# i.e. no variable is a significant causal predictor
variable_analysis(obj, gof = 0.9)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.