Learn R Programming

palasso (version 1.0.0)

plots: Plot functions for manuscript

Description

Functions for the palasso manuscript.

Usage

plot_score(X, choice = NULL, ylab = "count")

plot_table( X, margin = 2, labels = TRUE, colour = TRUE, las = 1, cex = 1, cutoff = NA )

plot_circle(b, w, cutoff = NULL, group = NULL)

plot_box( X, choice = NULL, ylab = "", ylim = NULL, zero = FALSE, invert = FALSE )

plot_pairs(x, y = NULL, ...)

plot_diff(x, y, prob = 0.95, ylab = "", xlab = "", ...)

Value

to do

Arguments

X

matrix with \(n\) rows and \(p\) columns

choice

numeric between \(1\) and \(p\)

margin

\(0\) (none), \(1\) (rows), or \(2\) (columns)

cutoff

numeric between \(0\) and \(1\)

b

between-group correlation: vector of length \(p\)

w

within-group correlation: matrix with \(p\) rows and \(p\) columns

group

vector of length \(p\)

x, y

vectors of equal length

...

additional arguments

prob

confidence interval: numeric between \(0\) and \(1\)

Details

The function plot_score compares a selected column to each of the other columns. It counts the number of rows where the entry in the selected column is smaller (blue), equal (white), or larger (red).

See Also

Use palasso to fit the paired lasso.

Examples

Run this code
### score ###
n <- 10; p <- 4
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
palasso:::plot_score(X)

### table ###
n <- 5; p <- 3
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
palasso:::plot_table(X,margin=2)

### circle ###
n <- 50; p <- 25
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
Z <- matrix(rnorm(n*p),nrow=n,ncol=p)
b <- sapply(seq_len(p),function(i) abs(cor(X[,i],Z[,i])))
w <- pmax(abs(cor(X)),abs(cor(Z)),na.rm=TRUE)
palasso:::plot_circle(b,w,cutoff=0)

### box ###
n <- 10; p <- 5
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
palasso:::plot_box(X,choice=5)

### pairs ###
n <- 10
x <- runif(n)
y <- runif(n)
palasso:::plot_pairs(x,y)

### diff ###
n <- 100
x <- runif(n)
y <- runif(n)
palasso:::plot_diff(x,y)

Run the code above in your browser using DataLab