simACD-class {eNchange}R Documentation

An S4 class for a nonstationary ACD model.

Description

A specification class to create an object of a simulated piecewise constant conditional duration model of order (1,1). x_t / \psi_t = \varepsilon_t \; \sim \mathcal{G}(\theta_2) \psi_t = \omega(t) + \sum_{j=1}^p \alpha_{j}(t)x_{t-j} + \sum_{k=1}^q \beta_{k}(t)\psi_{t-k}. where \psi_{t} = \mathcal{E} [x_t | x_t,\ldots,x_1| \theta_1] is the conditional mean duration of the t-th event with parameter vector \theta_1 and \mathcal{G}(.) is a general distribution over (0,+\infty) with mean equal to 1 and parameter vector \theta_2. In this work we assume that \varepsilon_t \; \sim \exp(1).

Value

Returns an object of simACD class.

Slots

x

The durational time series.

psi

The psi time series.

N

Sample sze of the time series.

cp.loc

The vector with the location of the changepoints. Takes values from 0 to 1 or NULL. Default is NULL.

lambda_0

The vector of the parameters lambda_0 in the ACD series as in the above formula.

alpha

The vector of the parameters alpha in the ACD series as in the above formula.

beta

The vector of the parameters beta in the ACD series as in the above formula.

BurnIn

The size of the burn-in sample. Note that this only applies at the first simulated segment. Default is 500.

References

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

Examples

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)

[Package eNchange version 1.0 Index]