bootMargin: Significant Mean Causes and Effects For Complete and Chain...

Description Usage Arguments Details Value References Examples

View source: R/bootMargin.R

Description

It performs the calculation of the mean incidence for each cause and each effect, confidence intervals and p-value with multiple key informants for complete graphs and chained bipartite graphs for multiple experts. The function allows eliminating causes and effects whose average incidence is not significant at the set thr.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
bootMargin(
  CC,
  CE = NULL,
  EE = NULL,
  thr = 0.5,
  reps = 10000,
  conf.level = 0.95,
  delete = FALSE,
  plot = FALSE
)

Arguments

CC

Three-dimensional matrix, where each submatrix along the z-axis is a square and reflective incidence matrix, or a list of data.frames containing square and reflective incidence matrices. Each matrix represents a complete graph.

CE

Three-dimensional matrix, where each submatrix along the z-axis is a rectangular incidence matrix, or a list of data.frames containing rectangular incidence matrices. Each matrix represents a bipartite graph. By default CE = NULL.

EE

Three-dimensional matrix, where each submatrix along the z-axis is a square and reflective incidence matrix, or a list of data.frames containing square and reflective incidence matrices. Each matrix represents a complete graph. By default EE = NULL.

thr

Real between [0,1]: Defines the degree of truth for which the incidence is considered significant. By default thr = 0.5.

reps

The number of bootstrap replicas. By befault reps = 10.000.

conf.level

Real between [0,1]: Defines the confidence level. By default conf.level = 0.95.

delete

Logical: If delete = TRUE, it deletes rows and columns whose incidences are significantly less than the set thr. By default delete = FALSE.

plot

Logical: If plot = TRUE, creates a graph from the results obtained. By default plot = FALSE.

Details

bootMargin

The function implements "boot.one.bca" from the wBoot package to obtain the confidence intervals and the p-value. The function contemplates two modalities, the first is focused on complete graphs and the second for chained bipartite graphs. If you use the full graph mode, make sure to keep the default values of the CE and EE parameters.

Value

The function returns a list with subsets of data. The subset $byRow and $byCol contains the following values:

Var

Variable name.

Mean

Calculated mean.

LCI

Lower Confidence Interval.

UCI

Upper Confidence Interval.

p.value

The calculated p-value.

For delete = TRUE with complete graphs, the function returns $Data, the matrix entered in the CC parameter, but with the non-significant rows and columns removed.

For delete = TRUE with chained bipartite graphs, the function returns $CC, $CE, $EE , the three-dimensional matrices entered in the parameters CC, CE and EE, but eliminating the non-significant rows and columns.

For plot = TRUE, the function returns the subset $plot, which contains the graph generated from the data $byRow and $byCol. On the X axis there is "dependency" associated with $byCol and on the Y axis "influence" associated with $byRow.

References

https://cran.r-project.org/web/packages/wBoot/index.html

Examples

1
2
3
4
5
6
# For complete graphs only the CC parameter is used.
# For instance:
bootMargin(CC = AA, thr = 0.5, reps = 500)
# For chain bipartite graphs the parameters CC, CE and EE are used.
# For instance:
bootMargin(CC = AA, CE = AB, EE = BB, thr = 0.5, reps = 500)

ElliottMardones/test10 documentation built on Dec. 17, 2021, 6:26 p.m.