Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/RandomARMod_nlin2.R
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} + θ_0 + E_n,
, whereby E_n are i.i.d with med(E_n)=0 and y_0 is fixed and known.
1 | RandomARMod_nlin2(nobs, intercept = 0, arp, power, start = 0, cont = "0", sd = 0.1)
|
nobs |
Number of observations for the process to generate. |
intercept |
Intercept parameter θ_0. |
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").
|
sd |
Defines the standard deviation of normally distributed errors for cont in {0,1} |
.
All error distributions are chosen to satistify med(E_n)=0.
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_nlin2
, dS2_nlin2
, dS3_nlin2
1 2 3 | set.seed(17)
y <- RandomARMod_nlin2(300, 0.001, 0.005, 1.002, 15, "0")
plot(y, type="l")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.