pfilter | R Documentation |
Tools for applying particle filtering algorithms to panel data.
## 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, ...)
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 |
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.
Extracts the estimated log likelihood for the entire panel.
Extracts the estimated log likelihood for each panel unit.
Carles \Breto
2002
\breto2020
pomp's pfilter at pfilter, panel_loglik
Other panelPomp workhorse functions:
mif2()
,
panelPomp
,
panel_loglik
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.