RandomARMod_nlin1: Ramdom non-linear AR(1) Series

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

View source: R/RandomARMod_nlin1.R

Description

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

Y_n = Y_{n-1} + θ_1 * Y_{n-1}^{θ_2} + E_n,

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

Usage

1
RandomARMod_nlin1(nobs, arp, power = 1, start = 0, cont = "0", sd = 0.2)

Arguments

nobs

Number of observations for the process to generate.

arp

Autoregression parameter θ_1.

power

Power parameter θ_2.

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

Defines the standard deviation of normally distributed errors for cont in {0,1}

.

Details

All error distributions are chosen to satistify med(E_n)=0.

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
3
4
set.seed(124)
y <- RandomARMod_nlin1(nobs = 300, arp = 0.005, power = 1.002, start = 15, cont = "0")
y[1:10]
plot(y, type="l")

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