forcing

Difficulty running an ODE model in R including a parameter that varies by time (forcing function)

强颜欢笑 提交于 2021-01-28 15:04:47
问题 I am trying to fit a reasonably basic ODE model using deSolve, including within the model a parameter that varies by time (force of infection; FOI). While running the model without this parameter works fine, inclusion of the time dependent parameter gives an error (see below). I am relatively new to R and mathematical modelling, and have been trying to solve this problem for some time now. I have created the FOI parameter as a matrix of values and then used the approxfun function for

Difficulty running an ODE model in R including a parameter that varies by time (forcing function)

风格不统一 提交于 2021-01-28 14:22:16
问题 I am trying to fit a reasonably basic ODE model using deSolve, including within the model a parameter that varies by time (force of infection; FOI). While running the model without this parameter works fine, inclusion of the time dependent parameter gives an error (see below). I am relatively new to R and mathematical modelling, and have been trying to solve this problem for some time now. I have created the FOI parameter as a matrix of values and then used the approxfun function for