vunit_measure: vunit_measure

Description Usage Arguments Value Examples

Description

vunit_measure evaluates the variance of a unit's observation given the entire state

Usage

1
2
## S4 method for signature 'spatPomp'
vunit_measure(object, x, unit, time, params, Np = 1)

Arguments

object

An object of class spatPomp

x

A state vector for all units

unit

The unit for which to evaluate the variance

time

The time for which to evaluate the variance

params

parameters at which to evaluate the unit variance

Np

numeric; defaults to 1 and the user need not change this

Value

A matrix with the unit measurement variance implied by the state, x, and the parameter set params for unit unit.

Examples

1
2
3
4
5
6
7
8
9
b <- bm(U=3)
s <- states(b)[,1,drop=FALSE]
rownames(s) -> rn
dim(s) <- c(3,1,1)
dimnames(s) <- list(variable=rn, rep=NULL)
p <- coef(b); names(p) -> rnp
dim(p) <- c(length(p),1); dimnames(p) <- list(param=rnp)
o <- obs(b)[,1,drop=FALSE]
vunit_measure(b, x=s, unit=2, time=1, params=p)

spatPomp documentation built on Sept. 5, 2021, 5:35 p.m.