Description Usage Arguments Value Examples
Generates data as in the paper
1 | createData(ntrain, ntest, p, covType, rho, bmethod, SNR, noisesd, ...)
|
ntrain |
number of training samples |
ntest |
number of testing samples |
p |
number of predictors |
covType |
for use with |
rho |
for use with |
bmethod |
for use with |
SNR |
if not na, sets the standard deviation of the noise to √{b'Cov b} / SNR |
noisesd |
the standard deviation of the noise if |
... |
optional arguments passed to |
A list with components Xtrain
, Ytrain
, Xtest
, Ytest
, bstar
, and sig
giving respectively the training data, testing data, population regression coefficients, and noise standard deviation. The matrix Xtest
is the same as the training data adjusted to the correct size (either by truncating or recycling) so that predictions are at the same design points. Note that this function is simply a wrapper of the various generate*
functions for ease of simulation. If more flexibility is desired, use those directly or similar.
1 | createData(2500, 2, 250, 'corrUniform', .8, 'constant', NA, 2500-250-1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.