noise: Add noise to a time series

Description Usage Arguments Details Value Examples

View source: R/generator.R

Description

This function lets you add artificial noise to time series, normally to patterns generated by generator. Use different types and strengths of noise to test smoothers.

Usage

1
noise(input, type, final_level)

Arguments

input

Time series to which noise will be added

type

String. Defines what type of noise to be added. Acceptable values are:

  • white - white noise with variance final_level

  • red - red noise with variance final_level (use with caution)

final_level

Number or var. A number sets the standard deviation to a constant value at each point. var sets the standard deviation to increase proportional to the (absolute value of the) signal at peaks.

Details

For an overview of the package capabilities, click here rpatrec

Value

Time series with added noise.

Examples

1
2
3
4
5
6
7
8
## Not run: 
#Generate a HS patterns
a <- generator()
#now add white noise with a standdard deviation of 10
b <- noise(a,'white',10)
plot(b)

## End(Not run)

rpatrec documentation built on May 1, 2019, 11:17 p.m.