panelPomp_methods: Manipulating 'panelPomp' objects

panelPomp_methodsR Documentation

Manipulating panelPomp objects

Description

Tools for manipulating panelPomp objects.

Usage

## S4 method for signature 'panelPomp'
coef(object, format = c("vector", "list"))

## S4 replacement method for signature 'panelPomp'
coef(object, ...) <- value

## S4 method for signature 'panelPomp'
length(x)

## S4 method for signature 'panelPomp'
names(x)

toParamList(value)

## S4 method for signature 'panelPomp'
print(x, ...)

## S4 method for signature 'panelPomp'
show(object)

## S4 method for signature 'panelPomp'
unit_objects(object)

## S4 method for signature 'panelPomp'
window(x, start, end)

## S4 method for signature 'panelPomp'
x[i]

## S4 method for signature 'panelPomp'
x[[i]]

## S4 method for signature 'panelPomp'
specific(object, ..., format = c("matrix", "vector"))

## S4 replacement method for signature 'panelPomp'
specific(object) <- value

## S4 method for signature 'panelPomp'
shared(object)

## S4 replacement method for signature 'panelPomp'
shared(object) <- value

Arguments

object, x

An object of class panelPomp or inheriting class panelPomp.

format

the format (data type) of the return value.

...

....

value

value to be assigned.

start, end

position in original times(pomp) at which to start.

i

unit index (indices) or name (names).

Value

coef() returns a numeric vector.

length() returns an integer.

names() returns a character vector.

toParamList() returns a list with the model parameters in list form.

\unitobjectsReturn

window() returns a panelPomp object with adjusted times.

`[` returns a panelPomp object.

`[[` returns a pomp object.

specific() returns unit-specific parameters as a numeric matrix or vector

shared() returns shared parameters from a panelPomp 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.

toParamList

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 \Breto, Aaron A. King, Edward L. Ionides, Jesse Wheeler

Jesse Wheeler

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)
# convert vector-form parameters to list-form parameters
toParamList(coef(prw))
## summaries of objects
print(prw)
show(prw)
## access underlying pomp objects
unit_objects(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
## access and manipulate model parameters and other features
prw <- panelRandomWalk(U = 4)
specific(prw)
# replace unit-specific coefficients
specific(prw) <- c("sigmaX[rw1]"=2)
specific(prw)
## access and manipulate model parameters and other features
prw <- panelRandomWalk(U = 4)
shared(prw)
prw <- panelRandomWalk(U = 4)
# replace unit-specific coefficients
shared(prw) <- c(sigmaX=2)
shared(prw)

cbreto/panelPomp documentation built on Sept. 15, 2024, 10:42 p.m.