genOrtho | R Documentation |
Simulate data for regression models in which the design matrix X is orthonormal
genOrtho(
n,
p,
p1 = floor(p/2),
beta,
family = c("gaussian", "binomial"),
SNR = 1,
signal = c("homogeneous", "heterogeneous")
)
n |
Sample size |
p |
Number of features |
p1 |
Number of nonzero features |
beta |
Vector of regression coefficients in the generating model, or, if a scalar, the value of each nonzero regression coefficient. |
family |
Generate |
SNR |
Signal to noise ratio |
signal |
Should the beta coefficients be homogeneous (default) or heterogeneous |
Data <- genOrtho(5, 2)
Data$X
crossprod(Data$X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.