A PanelPOMP model with all parameters unit-specific is identical to a collection of independent POMP models. There may not be anything to be gained by using the PanelPOMP framework in this case, except perhaps that the panelPomp package can help with the book-keeping for working with the collection of panels.
One can expect an overhead from using panelPomp software when the simpler pomp software is sufficient.
PanelPOMP models with all unit-specific parameters can be used to test panelPomp methodology against pomp methodology since the latter also applies in this special case.
We can first check the list of help topics:
library(help=panelPomp)
as Coercing 'panelPomp' objects as 'list',
'pompList' or 'data.frame'
contacts Contacts model
get_dim Get single column or row without dropping names
mif2 PIF: Panel iterated filtering
panelGompertz Panel Gompertz model
panelGompertzLikelihood
Likelihood for a panel Gompertz model via a
Kalman filter
panelPomp Constructing 'panelPomp' objects
panelPomp-package Inference for PanelPOMPs (Panel Partially
Observed Markov Processes)
panelPomp_methods Manipulating 'panelPomp' objects
panelRandomWalk Panel random walk model
panel_loglik Handling of loglikelihood replicates
panel_logmeanexp Log-mean-exp for panels
params Convert to and from a 'panelPomp' object
'pParams' slot format and a one-row
'data.frame'
pfilter Particle filtering for panel data
plot panelPomp plotting facilities
simulate Simulations of a panel of partially observed
Markov process
And then check out the promising ones:
?panelPomp_methods
Since a PanelPOMP is a collection of independent POMP models, they can each be filtered separately.
The pfilter
method for class panelPomp
does exactly this, after extracting the parameter vector for each unit from the shared and unit-specific parameters belonging to the panelPomp
object.
contacts <- contacts()
pf <- pfilter(contacts,Np=100)
class(pf)
[1] "pfilterd.ppomp"
attr(,"package")
[1] "panelPomp"
class(unitobjects(pf)[[1]])
[1] "pfilterd_pomp"
attr(,"package")
[1] "pomp"
It turns out that the SMC algorithm implemented by pfilter()
gives an unbiased Monte Carlo estimate of the likelihood.
For inferential purposes, we usually work with the log likelihood.
Due to Jensen’s inequality, SMC has a negative bias as an estimator of the log likelihood, i.e., it systematically underestimates the log likelihood.
Usually, the higher the Monte Carlo variance on the likelihood, the larger this bias.
Thus, lower Monte Carlo variance on the log likelihood is commonly associated with higher estimated log likelihood.
Heuristically, products propagate error rapidly. Averaging Monte Carlo replicates over units before taking a product reduces this error propagation. It does not lead to bias in the likelihood estimate since independence over units and Monte Carlo replicates insures that the expected product of the averages is the expected average of the products.
Let ˆλ(k)u be the kth replication of the Monte Carlo log likelihood evaluation for unit u.
Let ˆL(k)u=exp{ˆλ(k)u} be the corresponding likelihood.
Let ˆλ(k)=∑Uu=1λ(k)u be an estimate the log likelihood of the entire data based on replication k.
Let ˆL(k)=exp{ˆλ(k)} be the corresponding estimate of the likelihood.
Different possible estimates of the actual log likelihood λ=∑Uu=1λu are
ˆλ[1]=1KK∑k=1ˆλ(k)ˆλ[2]=log(1KK∑k=1exp{ˆλ(k)})ˆλ[3]=U∑u=11KK∑k=1ˆλ(k)uˆλ[4]=U∑u=1log(1KK∑k=1exp{ˆλ(k)u})
ˆL[2]=1KK∑k=1U∏u=1L(k)ˆL[4]=U∏u=11KK∑k=1ˆL(k)u
Bretó, Ionides, and King (2020) showed that ˆL[4] is smaller than ˆL[2].
In a limit where U and K both grow together, ˆL[4] can be stable while ˆL[2] increases to infinity.
Produced with R version 4.3.3, pomp version 5.6, and panelPomp version 1.1.0.1.
Bretó C, Ionides EL, King AA (2020). “Panel Data Analysis via Mechanistic Models.” J Am Stat Assoc, 115(531), pre–published online. https://doi.org/10.1080/01621459.2019.1604367.
Licensed under the Creative Commons Attribution-NonCommercial license. Please share and remix noncommercially, mentioning its origin.