Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/RandomARMod_lin2.R
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.
1 | RandomARMod_lin2(nobs, intercept = 0, arp, start = 0, cont = "0", sd = 0.2)
|
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").
|
sd |
Standard deviation of the normally distributed errors, if cont in {0,1} is selected. |
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_lin2(100, 0.02, 1.01, 5, "3")
plot(y, type="l")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.