multiTree: Plot tree structure of tests on 2x2 contingency tables

Description Usage Arguments Value

View source: R/utilities.R

Description

Plot a post-hoc tree of all tests or all significant tests on 2x2 discretized contingency tables. See vignettes for examples.

Usage

1
2
3
4
multiTree(xy, x = NULL, y = NULL, fit, show.all = FALSE,
  max.node.size = 5, min.node.size = 2.5, use.pval = NULL,
  images.path = NULL, node.name = "node", filename = NULL,
  filetype = "pdf")

Arguments

xy

A list (optional), whose first element corresponds to the matrix x as below, and its second element corresponds to the matrix y as below. if xy is not specified, x and y need to be assigned. If xy, x and y are missing or NULL, the tree nodes are blank. If xy or x and y are provided, nodes are png images of the marginal scatter plots that are associated with each test.

x

A matrix (optional), number of columns = dimension of random vector, number of rows = number of observations. If xy, x and y are missing or NULL, the tree nodes are blank. If xy or x and y are provided, nodes are png images of the marginal scatter plots that are associated with each test.

y

A matrix (optional), number of columns = dimension of random vector, number of rows = number of observations. If xy, x and y are missing or NULL, the tree nodes are blank. If xy or x and y are provided, nodes are png images of the marginal scatter plots that are associated with each test.

fit

An object generated by multiFit.

show.all

Logical. If TRUE, all tests are shown. If FALSE only tests who were ranked in each resolution amongst the top M ranking tests are shown. See ?multiFit for an explanation about the parameter M and see documentation for further information.

max.node.size

Numeric. Maximal node size. All nodes are scaled between min.node.size and max.node.size, where larger nodes are associated smaller p-values of the corresponding tests on 2x2 contingency tables.

min.node.size

Numeric. Minimal node size. All nodes are scaled between min.node.size and max.node.size, where larger nodes are associated smaller p-values of the corresponding tests on 2x2 contingency tables.

use.pval

String, choose between "H" (for Holm), "Hcorrected" (for Holm on corrected p-values) or "MH" for modified Holm. If left NULL, the order of preference is "MH", "Hcorrected" and then "H", according to which is present in the object fit.

images.path

String, path to save png images of nodes to. If not specified, images are saved to tempdir().

node.name

String, prefix for file names for nodes pngs.

filename

String, file name for tree output. If left NULL, file name is prefixed by multiTree and ends with system time. See documentation of qgraph::qgraph for further information.

filetype

String, default is pdf, See documentation of qgraph::qgraph for further information.

Value

The main output of multiTree is a pdf file with the directed acyclic graph showing tests as nodes.

In addition, the function returns a list. Its elements are: qgraph.object, the graphical object generated by the qgraph function. See the qgraph package documentation for further details. qgraph.call, the call for the tree generating function. Arguments for the call: adj, the adjacency matrix, nodes.size, a numeric vector with the scaled sizes of the nodes, images, the file names of the nodes images (may be NULL), filename as passed to multiTree and passed over to qgraph, and filetype as passed to multiTree and passed over to qgraph.

Other elements of the returned list are pvs.attributes, the attributes summarizing the data and the tests performed as stored in fit, and n.nodes, the number of nodes.


MultiFit documentation built on Jan. 11, 2020, 9:23 a.m.