50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


spatPomp (version 0.36.1)

runit_measure: runit_measure

Description

runit_measure simulates a unit's observation given the entire state

Usage

# S4 method for spatPomp
runit_measure(object, x, unit, time, params, log = FALSE)

Value

A matrix with the simulated observation corresponding to state x and unit unit with parameter set params.

Arguments

object

An object of class spatPomp

x

A state vector for all units

unit

The unit for which to simulate an observation

time

The time for which to simulate an observation

params

parameters to use to simulate an observation

log

logical; should the density be returned on log scale?

Author

Kidus Asfaw

Examples

Run this code
# Complete examples are provided in the package tests
if (FALSE) {
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]
runit_measure(b, x=s, unit=2, time=1, params=p)
}

Run the code above in your browser using DataLab