Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/resARMod_nlin1.R
The function calculates the residuals of an AR(1) process with intercept for given parameter and data based on
r_n = y_n - y_{n-1} - θ_1 y_{n-1}^{θ_2}
1 | resARMod_nlin1(theta, dat)
|
theta |
Parameter vector θ= (θ_1,θ_2). |
dat |
One dimensional observation vector y=(y_0,...,y_N). |
Details can be found in Kustosz (2016).
The output is a vector with N elements defined by r = (r_1,...,r_N).
Kustosz, Christoph
Kustosz, C. (2016). Depth based estimators and tests for
autoregressive processes with application. Ph. D. thesis. TU Dortmund.
RandomARMod_nlin1
,dS_lin2
,dS1_lin2
,dS2_lin2
,dS3_lin2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Minimal Example
y <- c(1, 2, 3)
theta <- c(1, 1)
resARMod_nlin1(theta, y)
## Generating an example process in advance
theta <- c(0.02, 1.001)
N <- 100
y0 <- 1
y <- RandomARMod_nlin1(nobs = N, arp = theta[1], power = theta[2], y0)
res <- resARMod_nlin1(theta, y)
par(mfrow=c(1, 2))
plot(res)
hist(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.