Learn R Programming

GGMncv (version 2.1.1)

plot.ggmncv: Plot ggmncv Objects

Description

Plot the solution path for the partial correlations.

Usage

# S3 method for ggmncv
plot(x, size = 1, alpha = 0.5, ...)

Arguments

x

An object of class ggmncv.

size

Numeric. Line size in geom_line.

alpha

Numeric. The transparency of the lines.

...

Currently ignored.

Value

A ggplot object.

Examples

Run this code
# NOT RUN {
# data
Y <- GGMncv::ptsd[,1:10]

# correlations
S <- cor(Y, method = "spearman")

# fit model
# default: atan
fit <- ggmncv(R = S, n = nrow(Y), progress = FALSE)

# plot
plot(fit)

# lasso
fit <- ggmncv(R = S, n = nrow(Y), progress = FALSE,
              penalty = "lasso")

# plot
plot(fit)
# }

Run the code above in your browser using DataLab