Description Usage Arguments Value Author(s) References See Also Examples
View source: R/predict_lin1_extra.R
The function allows a prediction of a linear AR(1) model without intercept based on simplicial depth and residual bootstrapping. Thereby the jumps and depth shapes are adjusted by additional arguments, to allow an extrapolation of future values. The main idea is presended in Kustosz (2016).
1 2 | predict_lin1_extra(y, CritLen, CritTime, NSim, alpha,
restrict = FALSE, start, dmax_neu, res_rescale, lambda_j, 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 for the bootstrap simulations of the continued process. |
alpha |
A level for the 1-α prediction intervals. |
restrict |
A switch, which allow to activate a restriction for parameter simulations used in the bootstrap procedure. If restrict is activated |
start |
Here a starting value for the simulated processes can be specified |
dmax_neu |
This value sets a new parameter value to shift the empirical depth shape for the simulations of the paramteters. |
res_rescale |
This parameter can be used to rescale the residuals by multiplication to allow an ajustment of the jump heights in the simulated series. |
lambda_j |
This parameetes sets the jump frequency modelled by a Poisson proces with parameter lambda_j to adjust the number of jumps in the simulated series. |
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 = "1")
plot(y, type = "l",ylim=c(0, 400), xlim = c(0, 300))
## Not run:
p1 <- predict_lin1_extra(y = y[1:150], CritLen = y[170], CritTime = 170, NSim = 1000, alpha = 0.05,
restrict = FALSE, start = y[150], res_rescale = 1.2, lambda_j = 0.2, dmax_neu = 1.02)
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.