plot.inet {inet}R Documentation

Plot point estimates and confidence intervals

Description

Plot point estimates and confidence intervals for models estimated with the lasso_ms, lasso_dsp, lasso_dsp_boot and OLS functions.

Usage

## S3 method for class 'inet'
plot(x, labels = NULL, order = FALSE, subset = NULL,
          cex.labels = 0.80, cex.axis = 0.75, ...)

Arguments

x

The output object from either lasso_ms, lasso_dsp, lasso_dsp_boot or OLS.

labels

A p-vector of characters specifying the labels for variables.

order

If order = TRUE, the edges are listed in decreasing order based on the point estimate.

subset

Allows to only display a subset of the edges. For example, if subset=1:20 the first 20 edges are displayed. This is especially useful for larger networks, in which all edges are unlikely to fit into a single figure.

cex.labels

The font size of the edge labels.

cex.axis

The font size of the axes.

...

Additional arguments.

Value

Plots a figure showing point estimates and confidence intervals for all interaction parameters.

Author(s)

Jonas Haslbeck <jonashaslbeck@gmail.com>

Examples


# Quick toy example
library(MASS)
p <- 5 # number of variables
data <- mvrnorm(n=100, mu=rep(0, p), Sigma = diag(p))
out <- OLS(data = data)

# point estimates + CIs; show 3 largest effects only
plot(out, labels = colnames(ptsd_data),
     order=TRUE, subset = 1:3)

## Not run: 

# Fit GGM to empirical PTSD data
set.seed(1)
out <- lasso_dsp(data = ptsd_data)

# Plot first 20 edges
plot(out, labels = colnames(ptsd_data),
     order=TRUE, subset = 1:20)


## End(Not run)


[Package inet version 0.1.0 Index]