Description Usage Arguments Value Author(s) References See Also Examples
The function allows a prediction of a linear AR(1) model without intercept based on simplicial depth and residual bootstrapping. The method is introduced in Kustosz (2016) and applies the simplical depth for AR(1) processes without intercept to generate estiamtes and confidence sets.
1 | predict_lin1(y, CritLen, CritTime, NSim, alpha, restrict = FALSE, eps = 1e-9)
|
y |
Observed series on which the parameter estimates are calculated. A prediction for future values of this series are produced. |
CritLen |
A value for a critical lenght for which the time of arrival then can be predicted by the function. |
CritTime |
A value for a critivcal time (as index of the process), exceeding the size of y, for which the process value is predicted. |
NSim |
Number of simulations used in the bootstrap simulations of the continued process. |
alpha |
A level which defines the 1-α prediction intervals. |
restrict |
A switch, which allow to activate a restriction for parameter simulations used in the bootstrap procedure. If restrict is activatet (TRUE) 1-alpha confidence intervals are used to generate simulated paremeters based on the empirical simplicial depth. If restrict is off (FALSE) the complete candidate set is used for simulations. Thereby the probabilities of the candidates rely on the empirical simplicial depth. |
eps |
Parameter to shift candidates to differ from the roots of the residuals. |
estimation_time |
Estimated tome to arrive at the critical crack lenght. |
estimation_lenght |
Estimated length at the critical time. |
mean_CT |
Mean estimate of the critical lenght of arrival at CritTime. |
med_CT |
Median estimate of the critical lenght of arrival at CritTime. |
mean_CL |
Mean estimate of the critival time length at CritLen. |
med_CL |
Median estimate of the critical time at CritLen. |
confintCT |
1-alpha prediction interval for the estimate of the critical time. |
confintCL |
1-alpha prediction interval for the estimate of the citical length. |
alpha |
1-Level of the confidence intervals. |
simulations |
A matrix including all simulated continuations of the process. |
Kustosz, Christoph
Kustosz, C. (2016). Depth based estimators and tests for
autoregressive processes with application. Ph. D. thesis. TU Dortmund.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | y <- RandomARMod_lin2(nobs = 300, intercept = 0, arp = 1.01, start = 15, cont = "0")
plot(y, type = "l",ylim=c(0, 200), xlim = c(0, 300))
## Not run:
p1 <- predict_lin1(y = y[1:150], CritLen = y[170], CritTime = 170,
NSim = 1000, alpha = 0.05, restrict = FALSE)
for(i in 1:10)
{
lines(p1$simulations[,i],col=i)
}
abline(h = c(p1$med_CT, p1$confintCT), col = c(2, 2, 2), lty = c(1, 2, 2))
abline(v = c(p1$med_CL, p1$confintCL), col = c(3, 3, 3), lty = c(1, 2, 2))
abline(h = y[170], lty = 3)
abline(v = 170, lty = 3)
lines(y, lwd = 2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.