pomp (version 0.34-1)

probe: Probe a partially-observed Markov process.

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.

Usage

probe(object, probes, ...)
  ## S3 method for class 'pomp':
probe(object, probes, params, nsim, seed = NULL, \dots)
  ## S3 method for class 'probed.pomp':
probe(object, probes, params, nsim, seed = NULL, \dots)
  probe.match(object, start, est = character(0),
              probes, weights,
              nsim, seed = NULL,
              method = c("subplex","Nelder-Mead","SANN"),
              verbose = getOption("verbose"), 
              eval.only = FALSE, fail.value = NA, ...)

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.
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.
weights
optional numeric vector of relative weights. Must be of the same length as probes.
method
Optimization method. Choices are subplex and any of the methods used by optim.
verbose
logical; print diagnostic messages?
eval.only
logical; if TRUE, no optimization is attempted. Instead, the probe-mismatch value is simply evaluated at the start parameters.
fail.value
optional scalar; if non-NA, this value is substituted for non-finite values of the objective function.
...
Additional arguments. In the case of spec, these are currently ignored. In the case of spec.match, these are passed to optim or subplex in the control list.

Value

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.

References

B. E. Kendall, C. J. Briggs, W. M. Murdoch, P. Turchin, S. P. Ellner, E. McCauley, R. M. Nisbet, S. N. Wood Why do populations cycle? A synthesis of statistical and mechanistic modeling approaches, Ecology, 80:1789--1805, 1999.

See Also

pomp-class, pomp-methods, basic.probes, probe.match

Examples

Run this code
data(ou2)
good <- probe(
              ou2,
              probes=list(
                y1.mean=probe.mean(var="y1"),
                y2.mean=probe.mean(var="y2"),
                y1.sd=probe.sd(var="y1"),
                y2.sd=probe.sd(var="y2"),
                extra=function(x)max(x["y1",])
                ),
              nsim=500
              )
summary(good)
plot(good)

ou2.bad <- ou2
coef(ou2.bad,c("x1.0","x2.0","alpha.1","alpha.4")) <- c(0,0,0.1,0.2)
bad <- probe(
             ou2.bad,
             probes=list(
               y1.mean=probe.mean(var="y1"),
               y2.mean=probe.mean(var="y2"),
               y1.sd=probe.sd(var="y1"),
               y2.sd=probe.sd(var="y2"),
               extra=function(x)range(x["y1",])
               ),
             nsim=500
             )
summary(bad)
plot(bad)

Run the code above in your browser using DataLab