# interv_covariate: Describing Intervention Effects for Time Series with... In tscount: Analysis of Count Time Series

## Description

Generates covariates describing certain types of intervention effects according to the definition by Fokianos and Fried (2010).

## Usage

 `1` ```interv_covariate(n, tau, delta) ```

## Arguments

 `n` integer value giving the number of observations the covariates should have. `tau` integer vector giving the times where intervention effects occur. `delta` numeric vector with constants specifying the type of intervention (see Details). Must be of the same length as `tau`.

## Details

The intervention effect occuring at time τ is described by the covariate

X_t = δ^(t-τ) I(t>=τ),

where I(t>=τ) is the indicator function which is 0 for t < τ and 1 for t >= τ. The constant δ with 0 <= δ <= 1 specifies the type of intervention. For δ = 0 the intervention has an effect only at the time of its occurence, for 0 < δ < 1 the effect decays exponentially and for δ = 1 there is a persistent effect of the intervention after its occurence.

If `tau` and `delta` are vectors, one covariate is generated with `tau[1]` as τ and `delta[1]` as δ, another covariate for the second elements and so on.

## Value

A matrix with `n` rows and `length(tau)` columns. The generated covariates describing the interventions are the columns of the matrix.

Tobias Liboschik

## References

Fokianos, K. and Fried, R. (2010) Interventions in INGARCH processes. Journal of Time Series Analysis 31(3), 210–225, http://dx.doi.org/10.1111/j.1467-9892.2010.00657.x.

Fokianos, K., and Fried, R. (2012) Interventions in log-linear Poisson autoregression. Statistical Modelling 12(4), 299–322. http://dx.doi.org/10.1177/1471082X1201200401.

Liboschik, T. (2016) Modelling count time series following generalized linear models. PhD Thesis TU Dortmund University, http://dx.doi.org/10.17877/DE290R-17191.

Liboschik, T., Kerschke, P., Fokianos, K. and Fried, R. (2016) Modelling interventions in INGARCH processes. International Journal of Computer Mathematics 93(4), 640–657, http://dx.doi.org/10.1080/00207160.2014.949250.

`tsglm` for fitting a GLM for time series of counts. `interv_test`, `interv_detect` and `interv_multiple` for tests and detection procedures for intervention effects.

## Examples

 `1` ```interv_covariate(n=140, tau=c(84,100), delta=c(1,0)) ```

### Example output

```       interv_1 interv_2
[1,]        0        0
[2,]        0        0
[3,]        0        0
[4,]        0        0
[5,]        0        0
[6,]        0        0
[7,]        0        0
[8,]        0        0
[9,]        0        0
[10,]        0        0
[11,]        0        0
[12,]        0        0
[13,]        0        0
[14,]        0        0
[15,]        0        0
[16,]        0        0
[17,]        0        0
[18,]        0        0
[19,]        0        0
[20,]        0        0
[21,]        0        0
[22,]        0        0
[23,]        0        0
[24,]        0        0
[25,]        0        0
[26,]        0        0
[27,]        0        0
[28,]        0        0
[29,]        0        0
[30,]        0        0
[31,]        0        0
[32,]        0        0
[33,]        0        0
[34,]        0        0
[35,]        0        0
[36,]        0        0
[37,]        0        0
[38,]        0        0
[39,]        0        0
[40,]        0        0
[41,]        0        0
[42,]        0        0
[43,]        0        0
[44,]        0        0
[45,]        0        0
[46,]        0        0
[47,]        0        0
[48,]        0        0
[49,]        0        0
[50,]        0        0
[51,]        0        0
[52,]        0        0
[53,]        0        0
[54,]        0        0
[55,]        0        0
[56,]        0        0
[57,]        0        0
[58,]        0        0
[59,]        0        0
[60,]        0        0
[61,]        0        0
[62,]        0        0
[63,]        0        0
[64,]        0        0
[65,]        0        0
[66,]        0        0
[67,]        0        0
[68,]        0        0
[69,]        0        0
[70,]        0        0
[71,]        0        0
[72,]        0        0
[73,]        0        0
[74,]        0        0
[75,]        0        0
[76,]        0        0
[77,]        0        0
[78,]        0        0
[79,]        0        0
[80,]        0        0
[81,]        0        0
[82,]        0        0
[83,]        0        0
[84,]        1        0
[85,]        1        0
[86,]        1        0
[87,]        1        0
[88,]        1        0
[89,]        1        0
[90,]        1        0
[91,]        1        0
[92,]        1        0
[93,]        1        0
[94,]        1        0
[95,]        1        0
[96,]        1        0
[97,]        1        0
[98,]        1        0
[99,]        1        0
[100,]        1        1
[101,]        1        0
[102,]        1        0
[103,]        1        0
[104,]        1        0
[105,]        1        0
[106,]        1        0
[107,]        1        0
[108,]        1        0
[109,]        1        0
[110,]        1        0
[111,]        1        0
[112,]        1        0
[113,]        1        0
[114,]        1        0
[115,]        1        0
[116,]        1        0
[117,]        1        0
[118,]        1        0
[119,]        1        0
[120,]        1        0
[121,]        1        0
[122,]        1        0
[123,]        1        0
[124,]        1        0
[125,]        1        0
[126,]        1        0
[127,]        1        0
[128,]        1        0
[129,]        1        0
[130,]        1        0
[131,]        1        0
[132,]        1        0
[133,]        1        0
[134,]        1        0
[135,]        1        0
[136,]        1        0
[137,]        1        0
[138,]        1        0
[139,]        1        0
[140,]        1        0
```

tscount documentation built on Nov. 25, 2017, 1:04 a.m.