pgam.filter | R Documentation |
The priori and posteriori conditional distributions of the level is gamma and their parameters are estimated through this recursive filter. See Details for a thorough description.
pgam.filter(w, y, eta)
w |
running estimate of discount factor ω of a Poisson-Gamma model |
y |
n length vector of the time series observations |
eta |
full linear or semiparametric predictor. Linear predictor is a trivial case of semiparameric model |
Consider Y_{t-1} a vector of observed values of a Poisson process untill the instant t-1. Conditional on that, μ_{t} has gamma distribution with parameters given by
a_{t|t-1}=ω a_{t-1}
b_{t|t-1}=ω b_{t-1}\exp≤ft(-η_{t}\right)
Once y_{t} is known, the posteriori distribution of μ_{t}|Y_{t} is also gamma with parameters given by
a_{t}=ω a_{t-1}+y_{t}
b_{t}=ω b_{t-1}+\exp≤ft(η_{t}\right)
with t=τ,…,n, where τ is the index of the first non-zero observation of y.
Diffuse initialization of the filter is applied by setting a_{0}=0 and b_{0}=0. A proper distribution of μ_{t} is obtained at t=τ, where τ is the fisrt non-zero observation of the time series.
A list containing the time varying parmeters of the priori and posteriori conditional distribution is returned.
This function is not intended to be called directly.
Washington Leite Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br
Harvey, A. C., Fernandes, C. (1989) Time series models for count data or qualitative observations. Journal of Business and Economic Statistics, 7(4):407–417
Harvey, A. C. (1990) Forecasting, structural time series models and the Kalman Filter. Cambridge, New York
Junger, W. L. (2004) Semiparametric Poisson-Gamma models: a roughness penalty approach. MSc Dissertation. Rio de Janeiro, PUC-Rio, Department of Electrical Engineering.
pgam
, pgam.likelihood
, pgam.fit
, predict.pgam
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.