pfilter {panelPomp} | R Documentation |
Particle filtering for panel data
Description
Tools for applying particle filtering algorithms to panel data.
Usage
## S4 method for signature 'panelPomp'
pfilter(
data,
shared,
specific,
params,
Np,
verbose = getOption("verbose"),
...
)
## S4 method for signature 'pfilterd.ppomp'
logLik(object, ...)
## S4 method for signature 'pfilterd.ppomp'
unitLogLik(object, ...)
Arguments
data |
An object of class |
shared , specific |
optional; these arguments depend on the type
of If If |
params |
optional; a named numeric vector. In this case, the nature of
parameters is determined via a naming convention: names ending in
“ |
Np |
the number of particles to use.
This may be specified as a single positive integer, in which case the same number of particles will be used at each timestep.
Alternatively, if one wishes the number of particles to vary across timesteps, one may specify length(time(object,t0=TRUE)) or as a function taking a positive integer argument.
In the latter case, |
verbose |
logical; if |
... |
additional arguments, passed to the |
object |
required; either (i) a If If |
Value
pfilter()
returns an object of class pfilterd.ppomp
that is also
a panelPomp
object (with the additional filtering details).
When applied to an object of class pfilterd.ppomp
, logLik()
returns a numeric
value.
When given objects of class pfilterd.ppomp
, unitLoglik()
returns a numeric
vector.
Methods
- logLik
Extracts the estimated log likelihood for the entire panel.
- unitLogLik
Extracts the estimated log likelihood for each panel unit.
Author(s)
Carles Bretó
References
Arulampalam, M. S., Maskell, S., Gordon, N. and Clapp, T. (2002) A Tutorial on Particle Filters for Online Nonlinear/Non-Gaussian Bayesian Tracking. IEEE Trans. Sig. Proc., 50(2), 174–188. doi:10.1109/78.978374
Bretó, C., Ionides, E. L. and King, A. A. (2020) Panel Data Analysis via Mechanistic Models. Journal of the American Statistical Association, 115(531), 1178–1188. doi:10.1080/01621459.2019.1604367
See Also
pomp's pfilter at pfilter, panel_loglik
Other panelPomp workhorse functions:
mif2()
,
panelPomp
,
panel_loglik
Examples
# filter, which generates log likelihoods
pfrw <- pfilter(panelRandomWalk(),Np=10)
class(pfrw) # "pfilterd.ppomp"
is(pfrw,"panelPomp") # TRUE
pfrw
# extract single log likelihood for the entire panel
logLik(pfrw)
# extract log likelihood for each panel unit
unitLogLik(pfrw)