RandomARMod_lin2: Ramdom AR(1) Series with Intercept

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/RandomARMod_lin2.R

Description

The function generates an random AR(1) process with given intercept, slope and starting value. Further the errors can be specified by 4 predefined examples. The main equation is given by

Y_n = θ_1 \cdot Y_{n-1} + θ_0 + E_n,

, whereby E_n are i.i.d with med(E_n)=0 and y_0 is fixed and known.

Usage

1
RandomARMod_lin2(nobs, intercept = 0, arp, start = 0, cont = "0", sd = 0.2)

Arguments

nobs

Number of observations for the process to generate.

intercept

Intercept parameter θ_0.

arp

Autoregression parameter θ_1.

start

Starting value of the process y_0.

cont

Error distribution defined by value in ("0","1","2","3","4").
"0" : E_n is i.i.d. N(0,sd) distributed.
"1" : E_n is i.i.d. N(0,sd) distributed, but in Pois(5/100) drawn points in time N(5,1) errors are added.
"2" : E_n is i.i.d. Gumbel distributed with parameters 10 and -3.665129.
"3" : E_n is i.i.d. Frechet distributed with parameters 1.928, -2, 10.
"4" : E_n is i.i.d. Gamma distributed with paramters 1 and 1. Further the errors are centered by -0.6932 to satisfy a med(E_n)=0 condition.
"5" : E_n is i.i.d. N(0,1) distributed, but in Pois(2/200) drawn points in time the value 150 is added.
"6" : E_n is i.i.d. Gumbel distributed with parameters 100 and -36.65129.
"7" : Here the errors are neglected and just the determinisic process is generated.

sd

Standard deviation of the normally distributed errors, if cont in {0,1} is selected.

Details

All error distributions are chosen to satistify med(E_n)=0. Remarks on the error distributions can be found in Kustosz (2016).

Value

the function returns a vector (y_0,...,y_N) which is a simulation of the AR process given by the input paramters

Author(s)

Kustosz, Christoph

References

Kustosz, C. (2016). Depth based estimators and tests for autoregressive processes with application. Ph. D. thesis. TU Dortmund.

See Also

dS1_lin2, dS2_lin2, dS3_lin2, dS_lin2

Examples

1
2
y <- RandomARMod_lin2(100, 0.02, 1.01, 5, "3")
plot(y, type="l")

ChrisKust/rexpar documentation built on May 6, 2019, 11:48 a.m.