Learn R Programming

tna (version 1.0.0)

plot_compare: Plot the Difference Network Between Two Models

Description

Plots the difference network between model x and model y. The edges are computed from subtracting the two models. The pie chart is the difference in initial probabilities between model x and model y. Green color indicates that xis greater than yand red indicates otherwise.

Usage

plot_compare(x, ...)

# S3 method for tna plot_compare( x, y, theme = NULL, palette = "colorblind", posCol = "#009900", negCol = "red", ... )

Value

A qgraph object displaying the difference network between the two models.

Arguments

x

A tna object. This is the the principal model.

...

Additional arguments passed to qgraph::qgraph().

y

A tna object. This is the model subtracted from the principal model.

theme

See qgraph::qgraph().

palette

See qgraph::qgraph().

posCol

Color for plotting edges and pie when the first group has a higher value. See qgraph::qgraph().

negCol

Color for plotting edges and pie when the second group has a higher value. See qgraph::qgraph().

See Also

Model comparison functions compare(), compare.group_tna(), plot.tna_comparison(), plot_compare.group_tna(), print.tna_comparison()

Examples

Run this code
model_x <- tna(group_regulation[group_regulation[, 1] == "plan", ])
model_y <- tna(group_regulation[group_regulation[, 1] != "plan", ])
plot_compare(model_x, model_y)

Run the code above in your browser using DataLab