Description Usage Arguments Value Examples
View source: R/ForecastHMMconfint.R
This function computes the forecasted confidence interval of a univariate HMM for multiple horizons, given observations up to time n
1 | ForecastHMMconfint(U, family, theta, Q, eta, k = 1)
|
U |
values between 0 and 1 |
family |
distribution name; run the function distributions() for help |
theta |
parameters; (r x p) |
Q |
probability transition matrix; (r x r) |
eta |
vector of the estimated probability of each regime at time n; (1 x r) |
k |
prediction times (may be a vector of integers). |
qlow |
lower bound of the forecasted confidence interval |
qhigh |
upper bound of the forecasted confidence interval |
1 2 3 4 5 6 7 8 9 10 | family = "gaussian"
theta = matrix(c(-1.5, 1.7, 1, 1),2,2)
Q = matrix(c(0.8, 0.3, 0.2, 0.7), 2, 2)
eta = c(0.96091218, 0.03908782)
forecastedhmmconfint = ForecastHMMconfint(U=c(0.1, 0.9), family, theta=theta, Q=Q,
eta=eta, k=c(1,2,3,4,5))
print('Forecasted confidence interval : ')
print(forecastedhmmconfint)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.