data.gen.nl1 | R Documentation |
Nonlinear system with independent/correlate covariates
data.gen.nl1(nobs, ndim = 15, r = 0.6, noise = 1)
nobs |
The data length to be generated. |
ndim |
The number of potential predictors (default is 9). |
r |
Target Spearman correlation among covariates. |
noise |
The noise level in the time series. |
A list of 3 elements: a vector of response (x), a matrix of potential predictors (dp) with each column containing one potential predictor, and a vector of true predictor numbers.
###synthetic example - Friedman
#Friedman with independent uniform variates
data.nl1 <- data.gen.nl1(nobs=1000)
#Friedman with correlated uniform variates
data.nl2 <- data.gen.nl2(nobs=1000)
plot.ts(cbind(data.nl1$x,data.nl2$x), col=c('red','blue'), main=NA, xlab=NA,
ylab=c('Nonlinear system with \n independent uniform variates',
'Nonlinear system with \n correlated uniform variates'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.