kingaa/pomp

[help wanted]Measles example MLEs

mayaxm opened this issue · 3 comments

Hello, from the measles example, after the pomp model m1, there is one step load the CSV file, my question is how to get this "mles" CSV file (how did this CSV file got generated?) for those parameters? Is there any way to extract those parameters' values from m1? I was trying to test pomp package get daily transmission rate from Covid-19 data (we have daily time, cases, deaths, hospitalization data). Any suggestion for the pomp software or any links? Appreciate your help!

dat %>% 
  pomp(t0=with(dat,2*time[1]-time[2]),
       time="time",
       rprocess=euler(rproc,delta.t=1/365.25),
       dmeasure=dmeas,
       rmeasure=rmeas,
       rinit=rinit,
       partrans=parameter_trans(
         log=c("mu","sigma","gamma","alpha","iota","psi","sigmaSE","R0"),
         logit=c("rho","cohort","amplitude"),
         barycentric=c("S_0","E_0","I_0","R_0")
       ),
       covar=covariate_table(covar,times="time"),
       accumvars=c("C","W"),
       statenames=c("S","E","I","C","W"),
       paramnames=c("R0","mu","sigma","gamma","alpha","iota",
                    "rho","sigmaSE","psi","cohort","amplitude",
                    "S_0","E_0","I_0","R_0")
  ) -> m1

## ----load-mle,echo=FALSE------------------------------------------------------
read.csv(text="...", stringsAsFactors=FALSE) -> mles 

The MLEs in question were computed as part of our analysis of measles data. We estimated the parameters. You will need to estimate parameters. That is what pomp is for.

Thank you so much for your response Dr. King! There is one question not clear to me is that: which function we use from pomp to estimate parameters? where we got this CSV file? Thank you again!
read.csv(text="
town,loglik,loglik.sd,mu,delay,sigma,gamma,rho,R0,amplitude,alpha,iota,cohort,psi,S_0,E_0,I_0,R_0,sigmaSE
Bedwellty,-1125.1,0.14,0.02,4,57.9,146,0.311,24.7,0.16,0.937,0.0396,0.351,0.951,0.0396,2.64e-05,2.45e-05,0.96,0.0611
Birmingham,-3239.3,1.55,0.02,4,45.6,32.9,0.544,43.4,0.428,1.01,0.343,0.331,0.178,0.0264,8.96e-05,0.000335,0.973,0.0611

pomp is designed to assist you with estimating parameters. That is its function, as a package. There are many functions in it to help. I suggest you begin with some of the tutorials, perhaps the short course on Simulation Based Inference.