Description Usage Arguments Value Examples
View source: R/genDataFromExamples.R
Auxiliary function for generating simple artificial data sets with normally distributed coefficients and regressors. Note that we only report this function for reproducibility of the simulations from the PhD thesis of the author.
1 2 3 4 5 6 7 8 9 10 | genDataFromExamples(
p,
n,
s = 1,
xmean = 0,
betamean = 0,
betasd = 1,
snr = 2,
rho = 0
)
|
p |
Number of variables (columns). |
n |
Number of observations (rows). |
s |
Sparsity. Real number between 0 and 1. |
xmean |
Mean of each of the normally distributed columns. Default is 0. |
betamean |
Mean of each of the normally distributed coefficients. Default is 0. |
betasd |
Standard deviation of the normally distributed coefficients. Default is 1. |
snr |
Signal to noise ratio. Real number greater than zero. Default is 2. |
rho |
Parameter for a Toeplitz covariance structure of the regressors. Real number between -1 and 1. Default is 0 which corresponds to uncorrelated columns. |
D |
Data matrix (X,Y). |
vars |
A list of the relevant variables. |
1 | genDataFromExamples(10,25,0.3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.