plots | R Documentation |
Functions for the palasso
manuscript.
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 = "", ...)
X |
matrix with |
choice |
numeric between |
margin |
|
cutoff |
numeric between |
b |
between-group correlation:
vector of length |
w |
within-group correlation:
matrix with |
group |
vector of length |
x , y |
vectors of equal length |
... |
additional arguments |
prob |
confidence interval:
numeric between |
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).
to do
Use palasso to fit the paired lasso.
### 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.