Description Usage Arguments Value Author(s) Examples
Simulate data for benchmarking Skew Normal regression models.
1 2 3 4 5 6 7 8 9 10 11 12 |
n |
Number of observations. |
p |
Number of predictors. |
rho |
Correlation for generating correlated variables. |
alpha |
Skew parameter for noise distribution. Defaults to -3. |
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 | dat <- sim.sgauss(
n = 120, p = 200, rho = 0.26,
coefs = c(runif(25, -4, -1), runif(25, 1, 4)), snr = 2,
seed = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.