pomp
classThis page documents the various methods that allow one to extract information from, display, plot, and modify pomp
objects.
# S4 method for pomp
coef(object, pars, transform = FALSE, …)
# S4 method for pomp
coef(object, pars, transform = FALSE, …) <- value
# S4 method for pomp
obs(object, vars, …)
# S4 method for pomp
partrans(object, params,
dir = c("fromEstimationScale", "toEstimationScale"), …)
# S4 method for pomp
plot(x, y, variables, panel = lines,
nc = NULL, yax.flip = FALSE,
mar = c(0, 5.1, 0, if (yax.flip) 5.1 else 2.1),
oma = c(6, 0, 5, 0), axes = TRUE, …)
# S4 method for pomp
spy(object)
# S4 method for pomp
states(object, vars, …)
# S4 method for pomp
time(x, t0 = FALSE, …)
# S4 method for pomp
time(object, t0 = FALSE, …) <- value
# S4 method for pomp
timezero(object, …)
# S4 method for pomp
timezero(object, …) <- value
# S4 method for pomp
window(x, start, end, …)
The pomp
object.
optional character; names of parameters to be retrieved or set.
optional character; names of observed variables to be retrieved.
optional logical; should the parameter transformations be applied?
numeric; values to be assigned.
a vector or matrix of parameters to be transformed.
direction of the transformation.
dir="toEstimationScale"
applies the transformation from the model (or “natural”) scale to the “estimation” scale.
dir="fromEstimationScale"
applies the inverse transformation (from the estimation scale to the natural scale.
logical;
if TRUE on a call to time
, the zero time is prepended to the time vector;
if TRUE on a call to time<-
, the first element in value
is taken to be the initial time.
start and end times of the window.
ignored.
optional character; names of variables to plot.
a function of prototype panel(x, col, bg, pch, type, ...)
which gives the action to be carried out in each panel of the display.
the number of columns to use. Defaults to 1 for up to 4 series, otherwise to 2.
logical; if TRUE, the y-axis (ticks and numbering) should flip from side 2 (left) to 4 (right) from series to series.
the 'par' settings for 'mar' and 'oma' to use. Modify with care!
logical; indicates if x- and y- axes should be drawn.
Further arguments (either ignored or passed to underlying functions).
coef(object)
returns the contents of the params
slot of object
.
coef(object,pars)
returns only those parameters named in pars
.
coef(object,transform=TRUE)returns
parameter.inv.transform(coef(object)),where
parameter.inv.transform
is the user parameter inverse transformation function specified when object
was created.
Likewise, coef(object,pars,transform=TRUE)returns
parameter.inv.transform(coef(object))[pars].
Assigns values to the params
slot of the pomp
object.
coef(object) <- value
has the effect of replacing the parameters of object
with value
.
If coef(object)
exists, then coef(object,pars) <- value
replaces those parameters of object
named in pars
with the elements of value
;
the names of value
are ignored.
If some of the names in pars
do not already name parameters in coef(object)
, then they are concatenated.
If coef(object)
does not exist, then coef(object,pars) <- value
assigns value
to the parameters of object
;
in this case, the names of object
will be pars
and the names of value
will be ignored.
coef(object,transform=TRUE) <- value
assigns parameter.transform(value)
to the params
slot of object
.
Here, parameter.transform
is the parameter transformation function specified when object
was created.
coef(object,pars,transform=TRUE) <- value
first, discards any names the value
may have, sets names(value) <- pars
, and then replaces the elements of object
's params
slot parameter.transform(value)
.
In this case, if some of the names in pars
do not already name parameters in coef(object,transform=TRUE)
, then they are concatenated.
coef(object) <- NULL
erases the parameters in object
.
obs(object)
returns the array of observations.
obs(object,vars)
gives just the observations of variables named in vars
.
vars
may specify the variables by position or by name.
states(object)
returns the array of states.
states(object,vars)
gives just the state variables named in vars
.
vars
may specify the variables by position or by name.
time(object)
returns the vector of observation times.
time(object,t0=TRUE)
returns the vector of observation times with the zero-time t0
prepended.
time(object) <- value
replaces the observation times slot (times
) of object
with value
.
time(object,t0=TRUE) <- value
has the same effect, but the first element in value
is taken to be the initial time.
The second and subsequent elements of value
are taken to be the observation times.
Those data and states (if they exist) corresponding to the new times are retained.
timezero(object)
returns the zero-time t0
.
timezero(object) <- value
sets the zero-time to value
.
window(x,start=t1,end=t2
returns a new pomp
object, identical to x
but with only the data in the window between times t1
and t2
(inclusive).
By default, start
is the time of the first observation and end
is the time of the last.
Displays the structure of a pomp
object.
Plots the data and state trajectories (if the latter exist). Additional arguments are passed to the low-level plotting routine.
A pomp
object can be coerced to a data frame via
as(object,"data.frame").The data frame contains the times, the data, and the state trajectories, if they exist.