Skip to content

spectrum matching in pomp #208

Answered by kingaa
Fuhan-Yang asked this question in Q&A
Mar 23, 2024 · 5 comments · 4 replies
Discussion options

You must be logged in to vote

As I mentioned above, the difference in the plots is likely due to the fact that spect() uses different arguments in its call to spec.pgram() than you use in your own call. You can examine the code to see just what these differences are.

logLik() returns NA when you call it on the 'spectd_pomp' object created by your call to spect() because it is undefined for objects of that type. If you want an objective function for spectrum-matching, use spect_objfun to create one. For example:

library(pomp)

ricker() |>
  spect_objfun(
    nsim = 100,
    params = c(r = exp(3.8), sigma = 0.3, phi = 10, c = 1, N_0 = 7),
    vars = "y",
    kernel.width = 3,
    detrend = "none",
    est=c("r","sigma")…

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@Fuhan-Yang
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Fuhan-Yang
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@kingaa
Comment options

@Fuhan-Yang
Comment options

@kingaa
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants