data.gen.fm2 {synthesis} | R Documentation |
Friedman with correlated uniform variates
Description
Friedman with correlated uniform variates
Usage
data.gen.fm2(nobs, ndim = 9, r = 0.6, noise = 0)
Arguments
nobs |
The data length to be generated. |
ndim |
The number of potential predictors (default is 9). |
r |
Target Spearman correlation. |
noise |
The noise level in the time series. |
Value
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.
Examples
###synthetic example - Friedman
#Friedman with independent uniform variates
data.fm1 <- data.gen.fm1(nobs=1000, ndim = 9, noise = 0)
#Friedman with correlated uniform variates
data.fm2 <- data.gen.fm2(nobs=1000, ndim = 9, r = 0.6, noise = 0)
plot.ts(cbind(data.fm1$x,data.fm2$x), col=c('red','blue'), main=NA, xlab=NA,
ylab=c('Friedman with \n independent uniform variates',
'Friedman with \n correlated uniform variates'))
[Package synthesis version 1.2.5 Index]