panelPomp_methods {panelPomp} | R Documentation |
Manipulating panelPomp
objects
Description
Tools for manipulating panelPomp
objects.
Usage
## S4 method for signature 'panelPomp'
coef(object)
## S4 replacement method for signature 'panelPomp'
coef(object, ...) <- value
## S4 method for signature 'panelPomp'
length(x)
## S4 method for signature 'panelPomp'
names(x)
## S4 method for signature 'panelPomp'
pparams(object)
pParams(value)
## S4 method for signature 'panelPomp'
print(x, ...)
## S4 method for signature 'panelPomp'
show(object)
## S4 method for signature 'panelPomp'
unitobjects(object)
## S4 method for signature 'panelPomp'
window(x, start, end)
## S4 method for signature 'panelPomp'
x[i]
## S4 method for signature 'panelPomp'
x[[i]]
Arguments
object , x |
An object of class |
... |
.... |
value |
value to be assigned. |
start , end |
position in original |
i |
unit index (indices) or name (names). |
Value
coef()
returns a numeric
vector.
length()
returns an integer
.
names()
returns a character
vector.
When given objects of class panelPomp
, pparams()
returns a named list with two elements: shared
, which is a named numeric
vector, and specific
, which is a matrix
with parameter names in its row names and panel unit names in its column names.
pParams()
returns a list
with the model parameters in list form.
When given objects of class panelPomp
, unitobjects()
returns a list
of pomp
objects.
window()
returns a panelPomp
object with adjusted times.
`[`
returns a panelPomp
object.
`[[`
returns a pomp
object.
Methods
- coef
Extracts coefficients of
panelPomp
objects.- coef<-
Assign coefficients to
panelPomp
objects.- length
Count the number of units in
panelPomp
objects.- names
Get the unit names of
panelPomp
objects.- pparams
Extracts coefficients from
panelPomp
objects in list form.- pParams
Converts panel coefficients from vector form to list form.
- window
Subset
panelPomp
objects by changing start time and end time.[]
Take a subset of units.
[[]]
Select the pomp object for a single unit.
Author(s)
Carles Bretó, Aaron A. King.
See Also
Other panelPomp methods:
as()
Examples
## access and manipulate model parameters and other features
prw <- panelRandomWalk()
coef(prw)
# replace coefficients
coef(prw) <- c(sigmaX=2,coef(prw)[-1])
coef(prw)
length(prw)
names(prw)
# extract parameters in list form
pparams(prw)
# convert vector-form parameters to list-form parameters
pParams(coef(prw))
## summaries of objects
print(prw)
show(prw)
## access underlying pomp objects
unitobjects(prw)
## select windows of time
window(prw,start=2,end=4)
## subsetting panelPomp objects
prw[1] # panelPomp of 1 unit (first unit of prw)
prw[[2]] # pomp object corresponding to unit 2 of prw