pgam.likelihood function

Likelihood function to be maximized

Likelihood function to be maximized

This is the log-likelihood function that is passed to optim for likelihood maximization.

pgam.likelihood(par, y, x, offset, fperiod, env = parent.frame())

Arguments

  • par: vector of parameters to be optimized
  • y: observed time series which is the response variable of the model
  • x: observed explanatory variables for parametric fit
  • offset: model offset. Just like in GLM
  • fperiod: vector of seasonal factors to be passed to pgam.par2psi
  • env: the caller environment for log-likelihood value to be stored

Details

Log-likelihood function of hyperparameters ω\omega and β\beta is given by

logL(ω,β)=t=τ+1nlogΓ(att1+yt)logyt!logΓ(att1)+att1logbtt1(att1+yt)log(1+btt1) \log L\left(\omega,\beta\right)=\sum_{t=\tau+1}^{n}{\log \Gamma\left(a_{t|t-1}+y_{t}\right)-\log y_{t}!-\log \Gamma\left(a_{t|t-1}\right)+a_{t|t-1}\log b_{t|t-1}-\left(a_{t|t-1}+y_{t}\right)\log \left(1+b_{t|t-1}\right)}

where att1a_{t|t-1} and btt1b_{t|t-1} are estimated as it is shown in pgam.filter.

Returns

List containing log-likelihood value, optimum linear predictor and the gamma parameters vectors.

References

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.

Author(s)

Washington Leite Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br

Note

This function is not intended to be called directly.

See Also

pgam, pgam.filter, pgam.fit

  • Maintainer: Washington Junger
  • License: GPL-3 | file LICENSE
  • Last published: 2022-08-19

Useful links