tests/ou2-spect.R

library(pomp)
pompExample(ou2)

set.seed(362083261L)

pdf(file="ou2-spect.pdf")

gm1 <- spect.match(ou2,
                  kernel.width=3,
                  detrend="mean",
                  nsim=50,
                  est=c("alpha.1","alpha.4"),
                  method="Nelder-Mead")
gm1@value
plot(gm1)

gm2 <- spect.match(ou2,
                   kernel.width=3,
                   detrend="mean",
                   nsim=49,
                   est=c("alpha.1","alpha.4"),
                   method="Nelder-Mead")
gm2@value
plot(gm2)

gm3 <- spect.match(ou2,
                   kernel.width=3,
                   detrend="linear",
                   nsim=50,
                   est=c("alpha.1","alpha.4"),
                   method="Nelder-Mead")
gm3@value
plot(gm3)

gm4 <- spect.match(ou2,
                   kernel.width=3,
                   detrend="quadratic",
                   nsim=50,
                   est=c("alpha.1","alpha.4"),
                   method="Nelder-Mead")
gm4@value
plot(gm4)

dev.off()

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.