ForecastHMMPdf {GenHMM1d} | R Documentation |
Forecasted density function of a univariate HMM at time n+k1, n+k2, ...
Description
This function computes the probability forecasted density function (with respect to Dirac(0)+Lesbesgue) of a univariate HMM for multiple horizons, given observations up to time n
Usage
ForecastHMMPdf(
y,
ZI = 0,
family,
theta,
Q,
eta,
size = 0,
k = 1,
graph = FALSE
)
Arguments
y |
points at which the pdf function is computed |
ZI |
1 if zero-inflated, 0 otherwise (default) |
family |
distribution name; run the function distributions() for help |
theta |
parameters; (r x p) |
Q |
probability transition matrix for the regimes; (r x r) |
eta |
vector of the estimated probability of each regime at time n; (1 x r) |
size |
additional parameter for some discrete distributions; run the command distributions() for help |
k |
prediction times (may be a vector of integers) |
graph |
TRUE to produce plots (FALSE is default) |
Value
pdf |
values of the pdf function |
Examples
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.06, 0.94)
x=seq(from=-6, to=6, by=0.1)
k=c(1,5,10,20)
pdf = ForecastHMMPdf(x, 1, family, theta, Q, eta, k=k, graph=TRUE)
[Package GenHMM1d version 0.2.1 Index]