GithubHelp home page GithubHelp logo

Comments (3)

kingaa avatar kingaa commented on July 28, 2024

pomp incorporates time-varying covariates via a lookup table. Whenever your model needs the value of a covariate at a particular time, it uses the lookup table provided (via the covar and tcovar options of pomp), linearly interpolating if necessary. It can happen that the required computation depends on values of the covariates outside the time interval covered by the lookup table. When this happens, pomp does linear extrapolation, with a warning.

This can be a problem if the linear extrapolation is not accurate. To avoid this, be sure to give values for the covariates over a time interval that covers the full range of relevant times, i.e., t0 to the time of the last observation.

Note that the ODE integration algorithms underlying trajectory can sometimes evaluate the covariates beyond the last observation time. To avoid warnings (and the potential inaccuracy they signal) in this case, it may be necessary to supply values for the covariates somewhat beyond the final observation time.

Thanks for bringing this issue up. It should have long since been in the FAQ, and now it will be. Please help me polish up the FAQ by helping me clarify the above.

from pomp.

tomessilva avatar tomessilva commented on July 28, 2024

pomp incorporates time-varying covariates via a lookup table. Whenever your model needs the value of a covariate at a particular time, it uses the lookup table provided (via the covar and tcovar options of pomp), linearly interpolating if necessary. It can happen that the required computation depends on values of the covariates outside the time interval covered by the lookup table. When this happens, pomp does linear extrapolation, with a warning.

Yes, this part was clear from the documentation and the warning messages themselves.

This can be a problem if the linear extrapolation is not accurate. To avoid this, be sure to give values for the covariates over a time interval that covers the full range of relevant times, i.e., t0 to the time of the last observation.

I think I did things correctly here (covariates are defined, with no missing values, from the t0 [t=0] to the time of the last observation [t=127]). I do have missing values in the observables, but I think those are being dealt with correctly (and those occur, obviously, within the period from t0 to the time of the final observation, so they shouldn't be the source of these warnings).

Note that the ODE integration algorithms underlying trajectory can sometimes evaluate the covariates beyond the last observation time. To avoid warnings (and the potential inaccuracy they signal) in this case, it may be necessary to supply values for the covariates somewhat beyond the final observation time.

Your explanation seems like the most plausible one and, in a practical sense, the suggestion you provide is probably the easiest way to deal with the issue. In my case, the covariates are more or less locally constant, so I duplicated the t=127 row of covariates and set it to t=150 (so the extrapolation is constant) and... yes, the warnings went away.

Thanks for your help and clarifications.

from pomp.

kingaa avatar kingaa commented on July 28, 2024

This is now FAQ 4.5.

from pomp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.