tests/steps.R

library(pomp)

set.seed(54588699L)

pompExample(ricker)
coef(ricker,"sigma") <- 0
tm <- sort(runif(n=20,max=3))
x <- trajectory(ricker,times=tm)["N",,]
y <- simulate(ricker,times=tm,states=TRUE)["N",,]
stopifnot(identical(x,y))

pompExample(euler.sir)
tm <- sort(runif(n=100,max=1))
x <- trajectory(euler.sir,times=tm)["I",,]
y <- simulate(euler.sir,times=tm,states=TRUE)["I",,]
table(cut(x-y,breaks=c(-Inf,seq(-0.2,0.2,by=0.01),Inf),ordered=T))

Try the pomp package in your browser

Any scripts or data that you put into this service are public.

pomp documentation built on May 2, 2019, 4:09 p.m.