dunit_measure: dunit_measure 'dunit_measure' evaluates the unit measurement...

dunit_measureR Documentation

dunit_measure dunit_measure evaluates the unit measurement density of a unit's observation given the entire state

Description

dunit_measure dunit_measure evaluates the unit measurement density of a unit's observation given the entire state

Usage

## S4 method for signature 'spatPomp'
dunit_measure(object, y, x, unit, time, params, log = TRUE, ...)

Arguments

object

An object of class spatPomp

y

A U by 1 matrix of observations for all units

x

A state vector for all units

unit

The unit for which to evaluate the unit measurement density

time

The time for which to evaluate the unit measurement density

params

parameters at which to evaluate the unit measurement density

log

logical; should the density be returned on log scale?

...

additional arguments will be ignored

Value

A class ‘matrix’ with the unit measurement density for spatial unit unit corresponding to the corresponding measurement in y and states in x.

Examples

# Complete examples are provided in the package tests
## Not run: 
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]
dunit_measure(b, y=o, x=s, unit=1, time=1, params=p)

## End(Not run)


spatPomp documentation built on Aug. 10, 2023, 1:10 a.m.