hyunjimoon / DataInDM

Workflow iteration starting from 15.879
3 stars 0 forks source link

Flow variable as observed data #20

Open hyunjimoon opened 2 years ago

hyunjimoon commented 2 years ago

Anyone (@jandraor @Dashadower @hazhirr) feel free to comment, please!

@hazhirr mentioned flow variables can be observed data (a.k.a driving data) different from my assumption that only stock can be observed. I wonder whether this can be modeled under the original framework where all family distribution is used to penalize the difference between simulated stock variable (integrated_result) and observed stock variable.

For instance, assume the model has two of each stock variables (S1,2), flow variables (F1,2), parameters (P1,2). We have three scenarios:

  1. Data for S1
  2. Data for S1, F1
  3. Data for S12, F1

Q1. Based on the insight @jandraor shared that dynamics is the function of only two: exogenous parameters and stocks, may I call each of the three as under-identified, well-identified, over-identified?

Q2. If so, infinite number and no parameter can be expected from the under and over identified case. Would giving prior be the solution to this identification problem?be returned for under-identified problem and would no parameter be returned for 1 and what could we expect from the results of under and over identified?

Q3. For 1, is there any way we can pre-calculate S2 using S1, F1 then compare this with the result purely integrated from the start? Integration will happen in transformed parameter block whereas comparison will be in model block. @Dashadower and I concluded there is no easy way for this but wanted to check with you, @jandraor.

Q4. When we say state variables is this equivalent with stock variable?

jandraor commented 2 years ago

We can discuss Q1-Q3 in our next meeting. I'm not sure about the categories. I need more context. The answer for Q4 is yes.

Regarding the measurent of flow, let me say the following:

As you already know, mathematically, a flow is a derivative. The derivative is the instantaneous change of a stock (state). Thus, strictly speaking, we cannot take measurements of a flow. It happens too fast (infinitesimally). However, we can take measurements of the change of a stock at larger time frames. For instance, in epidemiology, we work with the incidence "flow". But this flow is defined at a much larger scale. In practice, we take the change of the stock over a day or week. You can see this approach in my SDR paper & Grinzstajn et al.

That's why I proposed that users can define measurement models as:

y ~ poisson(net_flow(stock_variable))

hazhirr commented 2 years ago

As Jair said, strictly speaking flow variables are not observable, but in practice our models are providing estimates for the instantaneous daily/weekly/monthly rates which could be compared to relevant data (averaged over day/week/month, etc) and as such good observables, e.g. infections per day (in case of COVID models). We could always treat these as stocks, i.e. cumulating the flow inside a stock over the last day/week/month (and then flushing it out to restart accumulation for the next period), as we are doing in our GDP model (angie knows), but if the time period of accumulation is short (e.g. a day in a month with a time step around 0.125 day for example), then the approximation that instantaneous flow is equal to the average over the measurement period is pretty good and building the stock version is not worth the additional structure

On Fri, Aug 26, 2022 at 6:27 PM Jair Andrade @.***> wrote:

We can discuss Q1-Q3 in our next meeting. I'm not sure about the categories. I need more context. The answer for Q4 is yes.

Regarding the measurent of flow, let me say the following:

As you already know, mathematically, a flow is a derivative. The derivative is the instantaneous change of a stock (state). Thus, strictly speaking, we cannot take measurements of a flow. It happens too fast (infinitesimally). However, we can take measurements of the change of a stock at larger time frames. For instance, in epidemiology, we work with the incidence "flow". But this flow is defined at a much larger scale. In practice, we take the change of the stock over a day or week. You can see this approach in my SDR paper & Grinzstajn et al.

That's why I proposed that users can define measurement models as:

y ~ poisson(net_flow(stock_variable))

— Reply to this email directly, view it on GitHub https://github.com/hyunjimoon/DataInDM/issues/20#issuecomment-1229012103, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORHR5SFUY4OWOXXS2TNXP3V3FAFPANCNFSM57X5Q5MA . You are receiving this because you were mentioned.Message ID: @.***>