Description Usage Arguments Value Author(s) Examples
Simulate data for benchmarking Gaussian regression models.
1 2 3 4 5 6 7 8 9 10 11 |
n |
Number of observations. |
p |
Number of predictors. |
rho |
Correlation for generating correlated variables. |
coefs |
Vector of non-zero coefficients |
snr |
Signal to noise ratio (SNR). Defaults to 2. SNR is defined as \frac{Var(E(y | X))}{Var(Y - E(y | X))} = \frac{Var(f(X))}{Var(\varepsilon)} = \frac{Var(X^T β)}{Var(\varepsilon)} = \frac{Var(β^T Σ β)}{σ^2}. |
x.df |
The degrees of freedom for the multivariate distribution of covariates. Defaults to Inf (Gaussian). |
scale |
should the data be scaled? Defaults to TRUE. |
seed |
Random seed for reproducibility. |
a data frame with an attribute "true.betas" that contains the true coefficients. If scale = TRUE, the coefficients are scaled to match.
Brandon Vaughan
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.