Learn R Programming

multiview (version 0.8)

plot.multiview: Plot coefficients from a "multiview" object

Description

Produces a coefficient profile plot of the coefficient paths for a fitted "multiview" object. The paths are colored by the data views, from which the features come.

Usage

# S3 method for multiview
plot(x, col_palette = NULL, label = FALSE, ...)

Value

a NULL value as this function is really meant for its side-effect of generating a plot.

Arguments

x

A fitted "multiview" model.

col_palette

A set of colors to use for indicating different views. If NULL, the function will use the color palette "Set1" from the RColorBrewer package.

label

If TRUE, label the curves with variable sequence. numbers.

...

Other graphical parameters to plot.

Examples

Run this code
# Gaussian
x = matrix(rnorm(100 * 20), 100, 20)
z = matrix(rnorm(100 * 10), 100, 10)
y = rnorm(100)
fit1 = multiview(list(x=x,z=z), y, rho = 0)
plot(fit1, label = TRUE)

# Binomial
by = sample(c(0,1), 100, replace = TRUE)
fit2 = multiview(list(x=x,z=z), by, family = binomial(), rho=0.5)
plot(fit2, label=FALSE)

# Poisson
py = matrix(rpois(100, exp(y))) 
fit3 = multiview(list(x=x,z=z), py, family = poisson(), rho=0.5)
plot(fit3, label=TRUE)

Run the code above in your browser using DataLab