add_dummies | R Documentation |
Sample num_dummies dummy predictors from the univariate standard normal distribution and append them to the predictor matrix X.
add_dummies(X, num_dummies)
X |
Real valued predictor matrix. |
num_dummies |
Number of dummies that are appended to the predictor matrix. |
Enlarged predictor matrix.
set.seed(123)
n <- 50
p <- 100
X <- matrix(stats::rnorm(n * p), nrow = n, ncol = p)
add_dummies(X = X, num_dummies = p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.