spectrum matching in pomp #208
-
I'm playing with 'spect()' in pomp and comparing with 'spec.pgram()' in R. While I found the difference in the outputs using the same data. The 'spec.pgram()' calculated the raw periodogram using discrete Fourier transform ( Another question is that, I tried to calculate the metrics of 'spect()' using |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
In I am not sure what you mean by "calculate the metrics of |
Beta Was this translation helpful? Give feedback.
-
As I mentioned above, the difference in the plots is likely due to the fact that
See the manual for more about spectrum-matching. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for the reply. The difference has been resolved, while yet there is an issue in the likelihood. There is a model that always returned NA in The first one is that this model is affected by stochastic extinction. That means, most of the simulated spectrum (> 98%) returned -Inf because most of the simulations went extinct during the burn-in period (before the beginning of the data). Not sure if this affects likelihood calculation because the sample size is small (7 out of 500 simulations). The second one is that the remaining 7 simulations always have a dominant semi-annual cycle. Not sure if this caused NA in the likelihood, such as zero covariance matrix. While the spectral density of semi-annual cycle varies across simulations but always center around a certain value. Could you explain how is the likelihood calculated for the power spectrum in pomp? In addition, I would like to know your comments about how convincing the dynamics can explain the data if it is severely affected by stochastic extinction while the valid simulations fit the data well. Thank you! |
Beta Was this translation helpful? Give feedback.
-
It's important to understand that, although the spectrum-matching objective function value can be extracted using the With respect to your question about extinction. I don't want to sound glib, and I'm not perfectly sure what you're asking, but it seems that if your model predicts extinction more than 98% of the time, and the data don't show extinction, then perhaps there's a better explanation out there somewhere. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the comments, this is helpful as a discussion point. Thank you so much! |
Beta Was this translation helpful? Give feedback.
As I mentioned above, the difference in the plots is likely due to the fact that
spect()
uses different arguments in its call tospec.pgram()
than you use in your own call. You can examine the code to see just what these differences are.logLik()
returnsNA
when you call it on the 'spectd_pomp' object created by your call tospect()
because it is undefined for objects of that type. If you want an objective function for spectrum-matching, usespect_objfun
to create one. For example: