pmcmc {pomp} | R Documentation

## The particle Markov chain Metropolis-Hastings algorithm

### Description

The Particle MCMC algorithm for estimating the parameters of a partially-observed Markov process. Running `pmcmc` causes a particle random-walk Metropolis-Hastings Markov chain algorithm to run for the specified number of proposals.

### Usage

    ## S4 method for signature 'data.frame'
    pmcmc(data, Nmcmc = 1, proposal, Np,
      tol = 1e-17, max.fail = Inf, params, rinit, rprocess, dmeasure,
      dprior, ..., verbose = getOption("verbose", FALSE))

    ## S4 method for signature 'pomp'
    pmcmc(data, Nmcmc = 1, proposal, Np, tol = 1e-17,
      max.fail = Inf, ..., verbose = getOption("verbose", FALSE))

    ## S4 method for signature 'pfilterd_pomp'
    pmcmc(data, Nmcmc = 1, proposal, Np, tol,
      max.fail = Inf, ..., verbose = getOption("verbose", FALSE))

    ## S4 method for signature 'pmcmcd_pomp'
    pmcmc(data, Nmcmc, proposal, ...,
      verbose = getOption("verbose", FALSE))

### Arguments

`data` | either a data frame holding the time series data, or an object of class ‘pomp’, i.e., the output of another pomp calculation.
`Nmcmc` | The number of PMCMC iterations to perform.
`proposal` | optional function that draws from the proposal distribution. Currently, the proposal distribution must be symmetric for proper inference: it is the user's responsibility to ensure that it is. Several functions that construct appropriate proposal function are provided: see MCMC proposals for more information.

`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 `Np` either as a vector of positive integers of length

    length(time(object,t0=TRUE))

or as a function taking a positive integer argument. In the latter case, `Np(k)` must be a single positive integer, representing the number of particles to be used at the `k`-th timestep: `Np(0)` is the number of particles to use going from `timezero(object)` to `time(object)[1]`, `Np(1)`, from `timezero(object)` to `time(object)[1]`, and so on, while when `T=length(time(object,t0=TRUE))`, `Np(T)` is the number of particles to sample at the end of the time-series.

`tol` | positive numeric scalar; particles with likelihood less than `tol` are considered to be incompatible with the data. See the section on Filtering Failures for more information.
`max.fail` | integer; the maximum number of filtering failures allowed (see below). If the number of filtering failures exceeds this number, execution will terminate with an error. By default, `max.fail` is set to infinity, so no error can be triggered.
`params` | optional; named numeric vector of parameters. This will be coerced internally to storage mode `double`.
`rinit` | simulator of the initial-state distribution. This can be furnished either as a C snippet, an R function, or the name of a pre-compiled native routine available in a dynamically loaded library. Setting `rinit=NULL` sets the initial-state simulator to its default. For more information, see ?rinit_spec.
`rprocess` | simulator of the latent state process, specified using one of the rprocess plugins. Setting `rprocess=NULL` removes the latent-state simulator. For more information, see ?rprocess_spec for the documentation on these plugins.
`dmeasure` | evaluator of the measurement model density, specified either as a C snippet, an R function, or the name of a pre-compiled native routine available in a dynamically loaded library. Setting `dmeasure=NULL` removes the measurement density evaluator. For more information, see ?dmeasure_spec.
`dprior` | optional; prior distribution density evaluator, specified either as a C snippet, an R function, or the name of a pre-compiled native routine available in a dynamically loaded library. For more information, see ?prior_spec. Setting `dprior=NULL` resets the prior distribution to its default, which is a flat improper prior.

`...`

additional arguments supply new or modify existing model characteristics or components. See `pomp` for a full list of recognized arguments.

When named arguments not recognized by `pomp` are provided, these are made available to all basic components via the so-called userdata facility. This allows the user to pass information to the basic components outside of the usual routes of covariates (`covar`) and model parameters (`params`). See ?userdata for information on how to use this facility.

`verbose` | logical; if `TRUE`, diagnostic messages will be printed to the console.

### Value

An object of class ‘pmcmcd_pomp’.

### Re-running PMCMC Iterations

To re-run a sequence of PMCMC iterations, one can use the `pmcmc` method on a ‘pmcmc’ object. By default, the same parameters used for the original PMCMC run are re-used (except for `tol`, `max.fail`, and `verbose`, the defaults of which are shown above). If one does specify additional arguments, these will override the defaults.

### Filtering failures

If the degree of disagreement between model and data becomes sufficiently large, a “filtering failure” results. A filtering failure occurs when, at some time point, none of the `Np` particles is compatible with the data. In particular, if the conditional likelihood of a particle at any time is below the tolerance value `tol`, then that particle is considered to be uninformative and its likelihood is taken to be zero. A filtering failure occurs when this is the case for all particles. A warning is generated when this occurs unless the cumulative number of failures exceeds `max.fail`, in which case an error is generated.

### Author(s)

Edward L. Ionides, Aaron A. King, Sebastian Funk

### References

C. Andrieu, A. Doucet, and R. Holenstein (2010) Particle Markov chain Monte Carlo methods. Journal of the Royal Statistical Society, Series B, 72: 269–342.

C. Andrieu and G.O. Roberts (2009) The pseudo-marginal approach for computation Annals of Statistics, 37:697-725.

### See Also

MCMC proposals

Other particle filter methods: `bsmc2`, `cond.logLik`, `eff.sample.size`, `filter.mean`, `filter.traj`, `mif2`, `pfilter`, `pred.mean`, `pred.var`

Other pomp parameter estimation methods: `abc`, `bsmc2`, `kalman`, `mif2`, `nlf`, `pomp-package`, `probe.match`, `spect.match`

[Package pomp version 2.3 Index]