[R-sig-dyn-mod] metapopulation model with random effect in parameters

胡艺 @tevenhuyi @ending from gm@il@com
Thu Sep 27 03:20:53 CEST 2018


Thomas, thanks for your studying files and they are very useful. As for the
above problem, there are three subpopulations in my model and I want each
to have different birth rate. If I just use  b1(time) in the model, there
is only one birth rate for one subpopulation at each integration time,
right? I'm wondering whether there is a way to let approxfun() to return
three birth rates (a vector) at each integration time. Thanks.

Yi

On Wed, Sep 26, 2018 at 4:44 PM Thomas Petzoldt <
thomas.petzoldt using tu-dresden.de> wrote:

> Hi,
>
> Note that approxfun uses a special feature of R: It returns a function.
>
> If you create:
>
> b1<-approxfun(x=c(0,365),y=c(3,6),rule = 2)
>
> then just use
>
> b1(time)
>
> in your model.
>
>
> Please read the ?approxfun help page again. For examples how to use it
> with desolve, have a look at:
>
> http://limno-live.hydro.tu-dresden.de/user2017/
>
> and in particular:
>
>
> http://limno-live.hydro.tu-dresden.de/user2017/2.1-forcing+events/desolve-forcing.html#(5)
>
> Thomas
>
>
> --
> http://tu-dresden.de/Members/thomas.petzoldt
>
>

	[[alternative HTML version deleted]]



More information about the R-sig-dynamic-models mailing list