Learn R Programming

rpatrec (version 1.0.1)

noise: Add noise to a time series

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

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.

Value

Time series with added noise.

Details

For an overview of the package capabilities, click here rpatrec

Examples

Run this code
## 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)
## ---------------------------------------------

Run the code above in your browser using DataLab