combine.WPR2 {WpProj} | R Documentation |
A Function to Combine W_p R ^2
Objects
Description
Will combine W_p R ^2
objects into a single object.
Usage
combine.WPR2(...)
Arguments
... |
List of |
Value
A vector of W_p R^2
objects
See Also
Examples
if (rlang::is_installed("stats")) {
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
fit1 <- WpProj(X=x, eta=post_mu, theta = post_beta,
power = 2.0, method = "binary program")
fit2 <- WpProj(X=x, eta=post_mu, power = 2.0,
options = list(penalty = "lasso")
)
out1 <- WPR2(predictions = post_mu, projected_model = fit1)
out2 <- WPR2(predictions = post_mu, projected_model = fit2)
combine <- combine.WPR2(out1, out2)
}
[Package WpProj version 0.2.1 Index]