Description Usage Arguments Value Author(s) References See Also Examples
View source: R/resARMod_linar2.R
The function calculates the residuals of an AR(2) process without intercept for given parameter and data based on
r_n = y_n - θ_1 y_{n-1} - θ_2 y_{n-2}
1 | resARMod_linar2(theta, dat)
|
theta |
Parameter vector θ= (θ_1,θ_2). |
dat |
One dimensional observation vector y=(y_0,...,y_N). |
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_linar2
,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_linar2(theta, y)
## Generating an example process in advance
theta <- c(0.6, 0.44)
N <- 100
y0 <- c(13, 14)
y <- RandomARMod_linar2(nobs = N, arp1 = theta[1], arp2 = theta[2], start = y0)
res <- resARMod_linar2(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.