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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
## S4 method for signature 'pomp' probe(object, probes, params, nsim, seed = NULL, ...) ## S4 method for signature 'probed.pomp' probe(object, probes, params, nsim, seed, ...) ## S4 method for signature 'pomp' probe.match.objfun(object, params, est, probes, nsim, seed = NULL, fail.value = NA, transform = FALSE, ...) ## S4 method for signature 'probed.pomp' probe.match.objfun(object, probes, nsim, seed, ...) ## S4 method for signature 'pomp' probe.match(object, start, est = character(0), probes, nsim, seed = NULL, method = c("subplex","Nelder-Mead","SANN","BFGS", "sannbox","nloptr"), verbose = getOption("verbose"), fail.value = NA, transform = FALSE, ...) ## S4 method for signature 'probed.pomp' probe.match(object, probes, nsim, seed, ..., verbose = getOption("verbose")) ## S4 method for signature 'probe.matched.pomp' probe.match(object, est, probes, nsim, seed, transform, fail.value, ..., verbose = getOption("verbose")) ## S4 method for signature 'probed.pomp' logLik(object, ...) ## S4 method for signature 'probed.pomp' values(object, ...)
An object of class
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
optional named numeric vector of model parameters.
The number of model simulations to be computed.
optional; if non-
named numeric vector; the initial guess of parameters.
character vector; the names of parameters to be estimated.
Choices refer to algorithms used in
logical; print diagnostic messages?
optional numeric scalar;
In the case of
A call to
probe results in the evaluation of the probe(s) in
probes on the data.
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
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
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
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 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.
probe returns an object of class
probed.pomp is derived from the
pomp class and therefore have all the slots of
In addition, a
probed.pomp class has the following slots:
list of the probes applied.
values of each of the probes applied to the real and simulated data, respectively.
fraction of simulations with probe values less than the value of the probe of the data.
fraction of the
simvals that deviate more extremely from the mean of the
simvals than does
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
probe.matched.pomp objects therefore have all the slots above plus the following:
values of the corresponding arguments in the call to
value of the objective function at the optimum.
number of function and gradient evaluations by the optimizer.
Convergence code and message from the optimizer.
probe.match.objfun returns a function suitable for use as an objective function in an
displays diagnostic plots.
displays summary information.
extracts the realized values of the probes on the data and on the simulations as a data frame in long format.
.id indicates whether the probes are from the data or simulations.
returns the synthetic likelihood for the probes. NB: in general, this is not the same as the likelihood.
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.
In addition, slots of this object can be accessed via the
Daniel C. Reuman, Aaron A. King
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.
S. N. Wood Statistical inference for noisy nonlinear ecological dynamic systems, Nature, 466: 1102–1104, 2010.
pomp, probe functions, spect, and the tutorials on the package website.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
pompExample(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) bad <- probe( ou2, params=c(alpha.1=0.1,alpha.4=0.2,x1.0=0,x2.0=0, alpha.2=-0.5,alpha.3=0.3, sigma.1=3,sigma.2=-0.5,sigma.3=2, tau=1), 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.