mif2 | R Documentation |
Tools for applying iterated filtering algorithms to panel data. The panel iterated filtering of \Breto et al. (2020) extends to panel models the improved iterated filtering algorithm (Ionides et al., 2015) for estimating parameters of a partially observed Markov process. Iterated filtering algorithms rely on extending a partially observed Markov process model of interest by introducing random perturbations to the model parameters. The space where the original parameters live is then explored at each iteration by running a particle filter. Convergence to a maximum likelihood estimate has been established for appropriately constructed procedures that iterate this search over the parameter space while diminishing the intensity of perturbations (Ionides et al. 2006, 2011, 2015).
## S4 method for signature 'panelPomp'
mif2(
data,
Nmif = 1,
shared.start,
specific.start,
start,
Np,
rw.sd,
cooling.type = c("geometric", "hyperbolic"),
cooling.fraction.50,
block = FALSE,
verbose = getOption("verbose"),
...
)
## S4 method for signature 'mif2d.ppomp'
mif2(
data,
Nmif,
shared.start,
specific.start,
start,
Np,
rw.sd,
cooling.type,
cooling.fraction.50,
block,
...
)
## S4 method for signature 'mif2d.ppomp'
traces(object, pars, ...)
data |
An object of class |
Nmif |
The number of filtering iterations to perform. |
shared.start |
named numerical vector; the starting guess of the shared parameters. |
specific.start |
matrix with row parameter names and column unit names; the starting guess of the specific parameters. |
start |
A named numeric vector of parameters at which to start the IF2 procedure. |
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, |
rw.sd |
An unevaluated expression of the form |
cooling.type , cooling.fraction.50 |
specifications for the cooling schedule,
i.e., the manner and rate with which the intensity of the parameter perturbations is reduced with successive filtering iterations.
|
block |
A logical variable determining whether to carry out block resampling of unit-specific parameters. |
verbose |
logical; if |
... |
.... |
object |
an object resulting from the application of IF2 (i.e., of
class |
pars |
names of parameters |
mif2()
returns an object of class mif2d.ppomp
.
traces()
returns a matrix
with estimated parameter values at
different iterations of the IF2 algorithm in the natural scale. The default
is to return values for all parameters but a subset of parameters can be
passed via the optional argument pars
.
Carles \Breto
2020
\ionides2006
\ionides2011
\ionides2015
\king2016
pomp's mif2 at mif2, panel_loglik
Other panelPomp workhorse functions:
panelPomp
,
panel_loglik
,
pfilter()
## start with a panelPomp object
p <- panelRandomWalk()
## specify which parameters to estimate via rw_sd() and how fast to cool
mp <- mif2(p,Np=10,rw.sd=rw_sd(X.0=0.2),cooling.fraction.50=0.5,cooling.type="geometric")
mp
## the object resulting from an initial estimation can be used as a new starting point
mmp <- mif2(mp,Np=10,rw.sd=rw_sd(X.0=0.2),cooling.fraction.50=0.5,cooling.type="geometric")
mmp
## convergence can be partly diagnosed by checking estimates and likelihoods at different iterations
traces(mmp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.