slopeOP (version 1.0.0)

slopeData: slopeData

Description

Generate data with a given continuous piecewise linear model

Usage

slopeData(index, states, noise = 0, outlierDensity = 0,
  outlierNoise = 50)

Arguments

index

a vector of increasing changepoint indices

states

vector of successive states

noise

noise level = standard deviation of an additional normal noise

outlierDensity

probability for a datapoint to be an outlier (has to be close to 0)

outlierNoise

noise level for outlier data points

Value

a vector of simulated data

Examples

Run this code
# NOT RUN {
myData <- slopeData(index = c(1,100,200,300), states = c(0,5,3,6), noise = 1)
# }

Run the code above in your browser using DataLab