MRPCclass-class | R Documentation |
This class of objects is returned by the functions
ModiSkeleton
and MRPC
to represent the (ModiSkeleton) of an estimated DAG similarly from pcAlgo-class
. Objects of this class have methods for the functions plot, show and
summary.
## S4 method for signature 'MRPCclass,ANY' plot(x, y, main = NULL, zvalue.lwd = FALSE, lwd.max = 7, labels = NULL, ...) ## S3 method for class 'MRPCclass' print(x, amat = FALSE, zero.print = ".", ...) ## S4 method for signature 'MRPCclass' summary(object, amat = TRUE, zero.print = ".", ...) ## S4 method for signature 'MRPCclass' show(object)
x, object |
a |
y |
(generic |
main |
main title for the plot (with an automatic default). |
zvalue.lwd |
|
lwd.max |
maximal |
labels |
if non- |
amat |
|
zero.print |
String for printing |
... |
(optional) Further arguments passed from and to methods. |
Objects are typically created as result from
skeleton()
or pc()
, but could be
be created by calls of the form new("MRPCclass", ...)
.
The slots call
, n
, max.ord
, n.edgetests
,
sepset
, pMax
, graph
, zMin
, test
, alpha
and R
are inherited class.
In addition, "MRPCclass"
has slots
call
:a call object: the original function call.
n
:The sample size used to estimate the graph.
max.ord
:The maximum size of the conditioning set used in the conditional independence tests of the first part of the algorithm.
n.edgetests
:The number of conditional independence tests performed by the first part of the algorithm.
sepset
:Separation sets.
pMax
:A square matrix , where the (i, j)th entry contains the maximum p-value of all conditional independence tests for edge i–j.
graph
:Object of class "graph"
:
The undirected or partially directed graph that was estimated.
zMin
:Deprecated.
test
:The number of tests that have been performed.
alpha
:The level of significance for the current test.
R
:All of the decisions made from tests that have been performed. A 1 indicates a rejected null hypothesis and 0 represents a null hypothesis that was not rejected.
K
:The total number of rejections.
pval
:A vector of p-values calculated for each test.
normalizer
:The value that ensures the gammai vector sums to one.
exponent
:The exponent of the p-series used to calculate each value of the gammai vector.
alphai
:A vector containing the alpha value calculated for each test.
kappai
:A vector containing the iteration at which each rejected test occurs.
kappai_star
:Each element of this vector is the sum of the Si vector up to the iteration at which each rejection occurs.
Ci
:A vector indicating whether or not a p-value is a candidate for being rejected.
Si
:A vector indicating whether or not a p-value was discarded.
Ci_plus
:Each element of this vector represents the number of times each kappai value was counted when calculating each alphai value.
gammai
:The elements of this vector are the values of the p-series 0.4374901658/(m^(1.6)), where m is the iteration at which each test is performed.
gammai_sum
:The sum of the gammai vector. This value is used in calculating the alphai value at each iteration.
signature(x = "MRPCclass")
: Plot the resulting
graph. If argument "zvalue.lwd"
is true, the
linewidth an edge reflects zMin
, so that
thicker lines indicate more reliable dependencies. The argument
"lwd.max"
controls the maximum linewidth.
signature(object = "MRPCclass")
: Show basic properties of
the fitted object
signature(object = "MRPCclass")
: Show details of
the fitted object
Md Bahadur Badsha (mbbadshar@gmail.com)
MRPC, ModiSkeleton
## Not run: showClass("MRPCclass") # Generate a MRPCclass object data <- simu_data_M1 # load data for model 1 n <- nrow(data) # Number of rows V <- colnames(data) # Column names # Calculate Pearson correlation suffStat_C <- list(C = cor(data), n = n) # Infer the graph by MRPC MRPC.fit <- MRPC(data, suffStat_C, GV = 1, FDR = 0.05, indepTest ='gaussCItest', labels = V, FDRcontrol = 'LOND', verbose = FALSE) # Use methods of class MRPCclass show(MRPC.fit) plot(MRPC.fit) summary(MRPC.fit) # Access slots of this object (g <- MRPC.fit@graph) str(ss <- MRPC.fit@sepset, max = 1) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.