FilteringF: Filtering and One-Step-Ahead Distributions of the Latent...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/FilteringF.r

Description

The function FilteringF gives the shape and scale parameters of the filtering and the one-step-ahead forecast distributions of the latent states.

Usage

1
2
3
FilteringF(formula,data,na.action="na.omit",pz=NULL,
nBreaks=NULL,model="Poisson",StaPar=NULL,a0=0.01,b0=0.01,amp=FALSE,
distl="PRED",splot=FALSE)

Arguments

formula

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted.

data

a data frame containing the variables in the model. The variables are: - the time series of interest Yt (first column of the data frame). the explanatory time series to be inserted in the model. - Xt must be always specified as a matrix of order n by p (after Yt). - the explanatory time series to be inserted in the mean of volatility model. Zt must be always specified as a matrix of order n by p (after Xt). - a censoring indicator of the event (a vector), only for the PEM. If the model is the PEM, put the variable Event in the secon column of tha data frame after Yt, and he explanatory time series after the variable Event.

na.action

a function which indicates what should happen when the data contain NAs. The default is set by the na.action setting of options, and is na.fail if that is unset. Optional argument.

pz

the number of the explanatory time series to be inserted in the mean of volatility model. Default: NULL. Optional argument.

nBreaks

the number of breaks used to build a vector with the interval limits, only for the PEM. Optional argument.

model

the chosen model for the observations. The options are: Poisson, Normal, Gamma, Weibull, Generalized Gamma, Laplace, GED and PEM models.

StaPar

a numeric vector of initial values for the static parameters. Optional argument.

a0

the shape parameter of the initial Gamma distribution. Optional argument. Default: a0=0.01.

b0

the scale parameter of the initial Gamma distribution. Optional argument. Default: b0=0.01.

amp

the interval width is taken in account in the estimation of parameter w which controls the loss of information over time, only for the PEM. For more details see Santos et al. (2017). Default: FALSE. Optional argument.

distl

the latent states distribution to be returned.

splot

a plot with the point and interval estimates of the states is provided. Optional argument.

Details

Typical usages are

1
2
FilteringF(Yt~1,data=data.frame(Yt),StaPar=Par,model="Poisson",
a0=0.01,b0=0.01,splot=TRUE)

Value

att

'att' is the shape parameter of the one-step-ahead forecast distribution of the states.

btt

'btt' is the scale parameter of the one-step-ahead forecast distribution of the states.

at

'at' is the shape parameter of the filtering distribution of the states. It is necessary to specify this option in the argument 'distl'.

bt

'bt' is the scale parameter of the filtering distribution of the states. It is necessary to specify this option in the argument 'distl'.

Note

It is necessary to specify the argument 'distl' in order to obtain the filtering distribution of the states. The model options are the Poisson, Normal, Laplace, GED, Gamma, Weibull and Generalized Gamma models. 'Zt' are the explanatory time series only for the Normal, Laplace and GED volatility models.

Author(s)

T. R. Santos

References

Gamerman, D., Santos, T. R., and Franco, G. C. (2013). A Non-Gaussian Family of State-Space Models with Exact Marginal Likelihood. Journal of Time Series Analysis, 34(6), 625-645.

Santos T. R., Gamerman, D., Franco, G. C. (2017). Reliability Analysis via Non-Gaussian State-Space Models. IEEE Transactions on Reliability, 66, 309-318.

See Also

SmoothingF

Examples

1
2
3
4
5
6
7
8
library(NGSSEML)
Yt = c(1,2,1,4,3)
Par = c(0.9) #w
predpar = FilteringF(Yt~1, data = data.frame(Yt), StaPar = Par, model = "Poisson",
a0 = 0.01, b0 = 0.01, splot = FALSE)

filpar = FilteringF(Yt~1, data = data.frame(Yt), StaPar = Par, model = "Poisson",
a0 = 0.01, b0 = 0.01, distl = "FILTER", splot = FALSE)

NGSSEML documentation built on Sept. 5, 2021, 5:36 p.m.

Related to FilteringF in NGSSEML...