plotCoefs {modnets}R Documentation

Plot model coefficients with confidence intervals

Description

Return a plot or dataframe showing the point estimates from each model, along with confidence intervals based on the estimated standard errors.

Usage

plotCoefs(
  fit,
  true = FALSE,
  alpha = 0.05,
  plot = TRUE,
  col = "blue",
  flip = TRUE,
  data = NULL,
  select = TRUE,
  size = 1,
  labels = TRUE,
  title = NULL,
  vars = "all"
)

Arguments

fit

Output from fitNetwork, bootNet, or resample. Can also be the fixedNets or betweenNet elements of the mlGVAR output.

true

An adjacency matrix containing the true parameter values, if known. This can be used in conjunction with a simulated network, in that the user can supply the true network and plot those values against the estimated values.

alpha

Alpha level that is used to compute confidence intervals.

plot

Logical. If FALSE, a dataframe containing all of the confidence interval data will be returned.

col

Character string. Color of the points associated with the true values.

flip

Logical. If FALSE, the facets will be turned 90 degrees.

data

Supply the original dataset if not already included in the fit object.

select

Relevant to the resample output. Determines whether all variables should be plotted, or only those that were selected according to the resampling or variable selection procedure.

size

Numeric. Size of the point estimates.

labels

If logical, determines whether or not variable labels should be included. If a character vector, can be used to customize variable labels.

title

Custom plot title.

vars

Defaults to "all". Determines which variables should be plotted.

Details

This is differentiated from the output of bootNet and plotBoot in that the confidence intervals are computed directly from model parameters rather than estimated from bootstrapping.

Value

Plot displaying estimated model coefficients and confidence intervals.

See Also

fitNetwork, resample, getFitCIs, plot.resample, plotNet

Examples


x <- fitNetwork(ggmDat)
plot(x, which.net = 'coefs')
plotCoefs(x) # This is the same as the above command


[Package modnets version 0.9.0 Index]