plot,WPR2-method | R Documentation |
W_p R^2
ObjectsPlot Function for W_p R^2
Objects
## S4 method for signature 'WPR2'
plot(
x,
xlim = NULL,
ylim = NULL,
linesize = 0.5,
pointsize = 1.5,
facet.group = NULL,
...
)
x |
A |
xlim |
x-axis limits |
ylim |
y-axis limits |
linesize |
Linesize for geom_line |
pointsize |
Point size for geom_point |
facet.group |
Group to do facet_grid by |
... |
Currently not used |
a ggplot2::ggplot()
object
n <- 128
p <- 10
s <- 99
x <- matrix( stats::rnorm( p * n ), nrow = n, ncol = p )
beta <- (1:10)/10
y <- x %*% beta + stats::rnorm(n)
post_beta <- matrix(beta, nrow=p, ncol=s) + stats::rnorm(p*s, 0, 0.1)
post_mu <- x %*% post_beta
fit <- WpProj(X=x, eta=post_mu, power = 2.0,
options = list(penalty = "lasso")
)
obj <- WPR2(predictions = post_mu, projected_model = fit)
p <- plot(obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.