Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/RamdomARMod_linar2.R
The function generates an random linear AR(2) process with given autoregression parameters and starting value. Further the errors can be specified by 4 predefined examples. The main equation is given by
Y_n = θ_1 * Y_{n-1} + θ_2 * Y_{n-2} + E_n,
, whereby E_n are i.i.d with med(E_n)=0 and y_0 is fixed and known.
1 | RandomARMod_linar2(nobs, arp1, arp2, start, cont = "0")
|
nobs |
Number of observations for the process to generate. |
arp1 |
Autoregression parameter θ_1. |
arp2 |
Autoregression parameter θ_2. |
start |
Starting value of the process y_0, y_1 given by a vector c(y0,y1). |
cont |
Error distribution defined by value in ("0","1","2","3","4").
|
All error distributions are chosen to satistify med(E_n)=0. Remarks on the error distributions can be found in Kustosz (2016).
the function returns a vector (y_0,...,y_N) which is a simulation of the AR process given by the input paramters
Kustosz, Christoph
Kustosz, C. (2016). Depth based estimators and tests for
autoregressive processes with application. Ph. D. thesis. TU Dortmund.
dS1_lin2
, dS2_lin2
, dS3_lin2
, dS_lin2
1 2 | y <- RandomARMod_linar2(100, 0.4, 0.6, c(5, 5), "1")
plot(y, type="l")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.