Power spectrum computation and spectrum-matching for partially-observed Markov processes.
# S4 method for data.frame
spect(
data,
...,
vars,
kernel.width,
nsim,
seed = NULL,
transform.data = identity,
detrend = c("none", "mean", "linear", "quadratic"),
params,
rinit,
rprocess,
rmeasure,
verbose = getOption("verbose", FALSE)
)# S4 method for pomp
spect(
data,
...,
vars,
kernel.width,
nsim,
seed = NULL,
transform.data = identity,
detrend = c("none", "mean", "linear", "quadratic"),
verbose = getOption("verbose", FALSE)
)
# S4 method for spectd_pomp
spect(
data,
...,
vars,
kernel.width,
nsim,
seed = NULL,
transform.data,
detrend,
verbose = getOption("verbose", FALSE)
)
# S4 method for spect_match_objfun
spect(data, ..., seed, verbose = getOption("verbose", FALSE))
# S4 method for objfun
spect(data, ..., seed = NULL)
An object of class ‘spectd_pomp’, which contains the model, the data, and the results of the spect
computation.
The following methods are available:
produces some diagnostic plots
displays a summary
gives a measure of the agreement of the power spectra
either a data frame holding the time series data,
or an object of class ‘pomp’,
i.e., the output of another pomp calculation.
Internally, data
will be coerced to an array with storage-mode double
.
additional arguments are passed to pomp
.
This allows one to set, unset, or modify basic model components within a call to this function.
optional; names of observed variables for which the power spectrum will be computed. By default, the spectrum will be computed for all observables.
width parameter for the smoothing kernel used for calculating the estimate of the spectrum.
number of model simulations to be computed.
optional; if non-NULL
, the random number generator will
be initialized with this seed for simulations.
See simulate
.
function; this transformation will be applied to the observables prior to estimation of the spectrum, and prior to any detrending.
de-trending operation to perform. Options include no detrending, and subtraction of constant, linear, and quadratic trends from the data. Detrending is applied to each data series and to each model simulation independently.
optional; named numeric vector of parameters.
This will be coerced internally to storage mode double
.
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 specification.
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 specification for the documentation on these plugins.
simulator of the measurement model, 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 rmeasure=NULL
removes the measurement model simulator.
For more information, see rmeasure specification.
logical; if TRUE
, diagnostic messages will be printed to the console.
Some Windows users report problems when using C snippets in parallel computations.
These appear to arise when the temporary files created during the C snippet compilation process are not handled properly by the operating system.
To circumvent this problem, use the cdir
and cfile
options to cause the C snippets to be written to a file of your choice, thus avoiding the use of temporary files altogether.
Daniel C. Reuman, Cai GoGwilt, Aaron A. King
spect
estimates the power spectrum of 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 frequency-domain parameter estimation
(spect.match
).
A call to spect
results in the estimation of the power spectrum for
the (transformed, detrended) data and nsim
model simulations. The
results of these computations are stored in an object of class
‘spectd_pomp’.
When spect
operates on a spectrum-matching objective function (a ‘spect_match_objfun’ object), by default, the
random-number generator seed is fixed at the value given when the objective function was constructed.
Specifying NULL
or an integer for seed
overrides this behavior.
D.C. Reuman, R.A. Desharnais, R.F. Costantino, O. Ahmad, J.E. Cohen. Power spectra reveal the influence of stochasticity on nonlinear population dynamics. Proceedings of the National Academy of Sciences 103, 18860-18865, 2006. tools:::Rd_expr_doi("10.1073/pnas.0608571103").
D.C. Reuman, R.F. Costantino, R.A. Desharnais, J.E. Cohen. Color of environmental noise affects the nonlinear dynamics of cycling, stage-structured populations. Ecology Letters 11, 820-830, 2008. tools:::Rd_expr_doi("10.1111/j.1461-0248.2008.01194.x").
More on methods based on summary statistics:
abc()
,
basic_probes
,
nlf
,
probe()
,
probe_match
,
spect_match
More on pomp elementary algorithms:
elementary_algorithms
,
kalman
,
pfilter()
,
pomp-package
,
probe()
,
simulate()
,
trajectory()
,
wpfilter()