data.gen.fm1: Friedman with independent uniform variates

View source: R/data_gen_Friedman.R

data.gen.fm1R Documentation

Friedman with independent uniform variates

Description

Friedman with independent uniform variates

Usage

data.gen.fm1(nobs, ndim = 9, noise = 1)

Arguments

nobs

The data length to be generated.

ndim

The number of potential predictors (default is 9).

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'))

synthesis documentation built on Nov. 2, 2023, 5:51 p.m.