ForecastHMMeta: Predicted probabilities of regimes of a univariate HMM given...

Description Usage Arguments Value Examples

View source: R/ForecastHMMeta.R

Description

This function computes the predicted probabilities of the regimes for a new observation of a univariate HMM, given observations up to time n

Usage

1
ForecastHMMeta(ynew, family, theta, Q, eta)

Arguments

ynew

the new observations

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)

Value

etanew

predicted probabilities of the regimes

Examples

1
2
3
4
5
6
7
8
9
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)

forecastedhmmeta = ForecastHMMeta(c(1.5), family, theta=theta, Q=Q, eta=eta)
print('Forecasted regime probabilities : ')
print(forecastedhmmeta)

GenHMM1d documentation built on Jan. 21, 2021, 9:07 a.m.