Learn R Programming

eNchange (version 1.0)

pc_acdsim-class: A method to simulate nonstationary ACD models.

Description

A S4 method that takes as an input a simACD object and outputs a simulated nonstationary ACD(1,1) model. The formulation of the of the piecewise constant ACD model is given in the simACD class.

Usage

pc_acdsim(object)

# S4 method for simACD pc_acdsim(object)

Arguments

object

a simACD object

Value

Returns an object of simACD class containing a simulated piecewise constant ACD time series.

References

Korkas Karolos. "Ensemble Binary Segmentation for irregularly spaced data with change-points" Preprint.

Examples

Run this code
# NOT RUN {
pw.acd.obj <- new("simACD")
pw.acd.obj@cp.loc <- c(0.25,0.75)
pw.acd.obj@lambda_0 <- c(1,2,1)
pw.acd.obj@alpha <- rep(0.2,3)
pw.acd.obj@beta <- rep(0.7,3)
pw.acd.obj@N <- 3000
pw.acd.obj <- pc_acdsim(pw.acd.obj)
ts.plot(pw.acd.obj@x)
ts.plot(pw.acd.obj@psi)
# }

Run the code above in your browser using DataLab