Description Usage Arguments Value
Generates a random dataset with some amount of contaimination.
1 | gen.data(coeff, n = 100, eps = 0.1, sig = 3, snr = 1/20, seed = 837)
|
coeff |
a numeric vector of length 3 containing the true coefficients. |
n |
a positive integer giving the number of observations in the data set. |
eps |
a numeric value between 0 and 0.5 specifying the fraction of contamination. |
sig |
a positive numeric value giving the standard deviation of the uncontaminated data. |
snr |
a positive numeic value giving the signal to noise ratio, well not really. |
seed |
an integer value giving the seed for the random number generator. |
a data frame with n
rows and 4 columns. The regressors are generated as: rnorm(n,1)
, rnorm(n,1)^3
, exp(rnorm(n,1))
. It also generates an unused vector x4
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.