ForecastHMMCdf: Forecasted cumulative distribution function of a univariate...

Description Usage Arguments Value Examples

View source: R/ForecastHMMCdf.R

Description

This function computes the forecasted cumulative distribution function of a univariate HMM for multiple horizons, given observations up to time n

Usage

1
ForecastHMMCdf(y, family, theta, Q, eta, k = 1, graph = 0)

Arguments

y

points at which the cdf function is comptuted

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

times of prediction.

graph

(0 or else) produce plots

Value

cdf

values of the cdf function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
family = "gaussian"
lb = -6
ub = 6


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)

forecastedhmmcdf = ForecastHMMCdf(y=seq(from=-6, to=6, by=0.1), family=family,
theta= theta, Q=Q, eta=eta, k=c(1,5,10,20), graph=1)

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