Probe a partially-observed Markov process by computing summary statistics and the synthetic likelihood.

Share:

Description

probe applies one or more “probes” to time series data and model simulations and compares the results.
It can be used to diagnose goodness of fit and/or as the basis for “probe-matching”, a generalized method-of-moments approach to parameter estimation.
probe.match calls an optimizer to adjust model parameters to do probe-matching, i.e., to minimize the discrepancy between simulated and actual data.
This discrepancy is measured using the “synthetic likelihood” as defined by Wood (2010).
probe.match.objfun constructs an objective function for probe-matching suitable for use in optim-like optimizers.

Arguments

object

An object of class pomp.

probes

A single probe or a list of one or more probes.
A probe is simply a scalar- or vector-valued function of one argument that can be applied to the data array of a pomp.
A vector-valued probe must always return a vector of the same size.
A number of useful examples are provided with the package: see probe functions).

params

optional named numeric vector of model parameters.
By default, params=coef(object).

nsim

The number of model simulations to be computed.

seed

optional; if non-NULL, the random number generator will be initialized with this seed for simulations.
See simulate-pomp.

start

named numeric vector; the initial guess of parameters.

est

character vector; the names of parameters to be estimated.

method

Optimization method.
Choices refer to algorithms used in optim, subplex, and nloptr.

verbose

logical; print diagnostic messages?

fail.value

optional numeric scalar;
if non-NA, this value is substituted for non-finite values of the objective function.
It should be a large number (i.e., bigger than any legitimate values the objective function is likely to take).

transform

logical;
if TRUE, optimization is performed on the transformed scale.

...

Additional arguments.
In the case of probe, these are currently ignored.
In the case of probe.match, these are passed to the optimizer (one of optim, subplex, nloptr, or sannbox).
These are passed via the optimizer's control list (in the case of optim, subplex, and sannbox) or the opts list (in the case of nloptr).

Details

A call to probe results in the evaluation of the probe(s) in probes on the data.
Additionally, nsim simulated data sets are generated (via a call to simulate) and the probe(s) are applied to each of these.
The results of the probe computations on real and simulated data are stored in an object of class probed.pomp.

A call to probe.match results in an attempt to optimize the agreement between model and data, as measured by the specified probes, over the parameters named in est.
The results, including coefficients of the fitted model and values of the probes for data and fitted-model simulations, are stored in an object of class probe.matched.pomp.

The objective function minimized by probe.match — in a form suitable for use with optim-like optimizers — is created by a call to probe.match.objfun.
Specifically, probe.match.objfun will return a function that takes a single numeric-vector argument that is assumed to cotain the parameters named in est, in that order.
This function will return the negative synthetic log likelihood for the probes specified.

Value

probe returns an object of class probed.pomp.
probed.pomp is derived from the pomp class and therefore have all the slots of pomp.
In addition, a probed.pomp class has the following slots:

probes

list of the probes applied.

datvals, simvals

values of each of the probes applied to the real and simulated data, respectively.

quantiles

fraction of simulations with probe values less than the value of the probe of the data.

pvals

two-sided p-values:
fraction of the simvals that deviate more extremely from the mean of the simvals than does datavals.

synth.loglik

the log synthetic likelihood (Wood 2010).
This is the likelihood assuming that the probes are multivariate-normally distributed.

probe.match returns an object of class probe.matched.pomp, which is derived from class probed.pomp.
probe.matched.pomp objects therefore have all the slots above plus the following:

est, transform, fail.value

values of the corresponding arguments in the call to probe.match.

value

value of the objective function at the optimum.

evals

number of function and gradient evaluations by the optimizer.
See optim.

convergence, msg

Convergence code and message from the optimizer.
See optim and nloptr.

probe.match.objfun returns a function suitable for use as an objective function in an optim-like optimizer.

Methods

plot

displays diagnostic plots.

summary

displays summary information.

values

extracts the realized values of the probes on the data and on the simulations as a data frame in long format.
The variable .id indicates whether the probes are from the data or simulations.

logLik

returns the synthetic likelihood for the probes.
NB: in general, this is not the same as the likelihood.

as, as.data.frame

when a ‘probed.pomp’ is coerced to a ‘data.frame’, the first row gives the probes applied to the data; the rest of the rows give the probes evaluated on simulated data.
The rownames of the result can be used to distinguish these.