eunit_measure: eunit_measure

eunit_measureR Documentation

eunit_measure

Description

eunit_measure evaluates the expectation of a unit's observation given the entire state

Usage

## S4 method for signature 'spatPomp'
eunit_measure(object, x, unit, time, params, Np = 1, log = FALSE)

Arguments

object

An object of class spatPomp

x

A state vector for all units

unit

The unit for which to evaluate the expectation

time

The time for which to evaluate the expectation

params

parameters at which to evaluate the unit expectation

Np

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

log

logical; should the density be returned on log scale?

Value

A class ‘matrix’ with the unit expected observation for spatial unit unit corresponding to the corresponding 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]
eunit_measure(b, x=s, unit=2, time=1, params=p)

## End(Not run)


kidusasfaw/spatPomp documentation built on April 27, 2024, 2:20 p.m.