davidrpugh / population-ecology-approach

0 stars 2 forks source link

Initial condition for simulations #33

Closed davidrpugh closed 9 years ago

davidrpugh commented 9 years ago

@markeschaffer

I claim that the initial condition for simulation should specify values for adult males for genotypes i=0,1,2,3 dated t=0, and values for female children for genotypes i=0,1,2,3 dated t=-1. Do you agree?

markeschaffer commented 9 years ago

I almost agree … but I think this means we have solved another longstanding problem, namely feasibility of initial conditions. “Feasibility” means that the chosen initial conditions could have been generated by a configuration of families.

Initial conditions should specify male/female children at time t for genotypes i=0,1,2,3, where the number/distribution of genotypes are identical for males and females. That is, m_i(t)=f_i(t) for all i=0,1,2,3.

This means the initial conditions will always obey the 1:1 sex ratio requirement, i.e., the distribution of genotypes at birth is independent of gender.

The male children at time t, m(t), become the male adults at time t+1, M(t+1), and then choose wives from the f(t).

--Mark

From: David R. Pugh [mailto:notifications@github.com] Sent: 30 August 2014 20:55 To: davidrpugh/population-ecology-approach Cc: Schaffer, Mark E Subject: [population-ecology-approach] Initial condition for simulations (#33)

@markeschafferhttps://github.com/markeschaffer

I claim that the initial condition for simulation should specify values for adult males for genotypes i=0,1,2,3 dated t=0, and values for female children for genotypes i=0,1,2,3 dated t=-1. Do you agree?

— Reply to this email directly or view it on GitHubhttps://github.com/davidrpugh/population-ecology-approach/issues/33.


We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply.

Heriot-Watt University is a Scottish charity registered under charity number SC000278.

davidrpugh commented 9 years ago

@markeschaffer

Hmmm. OK. What prompted the question was the fact that the recurrence relation for U_ijk(t) is a function of M_i(t) and female children dated t-1. After substituting for U_ijk in the recurrence relations for female children one gets f_x(t) is some function of M_i(t) and f_i(t-1). After substituting for U_ijk in recurrence relation for adult males one gets M_x(t+1) is some function of M_i(t) and f_i(t-1).

In steady state we want to find values for our endogenous variables M_0, ...M_3 and f_0,...f_3 such that M_x(t+1) - M_x(t) = 0 and f_x(t) - f_x(t-1)=0. Correct?

markeschaffer commented 9 years ago

Yes, I think so.

-------- Original message -------- Subject: Re: [population-ecology-approach] Initial condition for simulations (#33) From: "David R. Pugh" notifications@github.com To: davidrpugh/population-ecology-approach population-ecology-approach@noreply.github.com CC: "Schaffer, Mark E" M.E.Schaffer@hw.ac.uk

@markeschafferhttps://github.com/markeschaffer

Hmmm. OK. What prompted the question was the fact that the recurrence relation for U_ijk(t) is a function of M_i(t) and female children dated t-1. After substituting for U_ijk in the recurrence relations for female children one gets f_x(t) is some function of M_i(t) and f_i(t-1). After substituting for U_ijk in recurrence relation for adult males one gets M_x(t+1) is some function of M_i(t) and f_i(t-1).

In steady state we want to find values for our endogenous variables M_0, ...M_3 and f_0,...f_3 such that M_x(t+1) - M_x(t) = 0 and f_x(t) - f_x(t-1)=0. Correct?

— Reply to this email directly or view it on GitHubhttps://github.com/davidrpugh/population-ecology-approach/issues/33#issuecomment-53970636.


We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply.

Heriot-Watt University is a Scottish charity registered under charity number SC000278.

davidrpugh commented 9 years ago

@markeschaffer

I have coded the recurrence relations for males and females and would now like to start simulating. I would like to use the following initial condition for female children at date t=0: fGA = 0.5, fGa = 0.0, fgA = 0.5, fga = 0.0. This requires that at date t=0 we have mGA = 0.5, mGa = 0.0, mgA = 0.5, mga = 0.0 in order for the sex ratio to be feasible. However males shares at date t=0 never enter into the model, what enters into the model is the share of male adults at date t=1.

Should the share of male adults at date t=1 be the same as the share of male children at date t=0? Hopefully this was clear, if not we should skype.

markeschaffer commented 9 years ago

The initial conditions below either have a typo or aren’t a good choice, because there are no individuals carrying the a gene – everybody is A. More likely you had in mind

date t=0: fGA = 0.5, fGa = 0.0, fgA = 0.0, fga = 0.5

i.e., a variant on the initial “two pure subpopulations” theme we’ve been using.

The answer to your second question is is “yes”. The male children share at t=0 is identical to the male adult share at t=1. Thus the shares for f(0) = shares for m(0) = shares for M(1).

--Mark

From: David R. Pugh [mailto:notifications@github.com] Sent: 31 August 2014 19:08 To: davidrpugh/population-ecology-approach Cc: Schaffer, Mark E Subject: Re: [population-ecology-approach] Initial condition for simulations (#33)

@markeschafferhttps://github.com/markeschaffer

I have coded the recurrence relations for males and females and would now like to start simulating. I would like to use the following initial condition for female children at date t=0: fGA = 0.5, fGa = 0.0, fgA = 0.5, fga = 0.0. This requires that at date t=0 we have mGA = 0.5, mGa = 0.0, mgA = 0.5, mga = 0.0 in order for the sex ratio to be feasible. However males shares at date t=0 never enter into the model, what enters into the model is the share of male adults at date t=1.

Should the share of male adults at date t=1 be the same as the share of male children at date t=0? Hopefully this was clear, if not we should skype.

— Reply to this email directly or view it on GitHubhttps://github.com/davidrpugh/population-ecology-approach/issues/33#issuecomment-53996116.


We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply.

Heriot-Watt University is a Scottish charity registered under charity number SC000278.

davidrpugh commented 9 years ago

Indeed, this was a typo. I had intended to use a pure sub-population initial condition. Thanks for clarification on the initial condition for males.

davidrpugh commented 9 years ago

Remind me whether the initial condition for females should be normalized to sum to one or not. We are normalizing female adults to sum to 2, but I thought we could have any number of female children.

markeschaffer commented 9 years ago

If we continue with the “initial conditions = two pure subpopulations” motivation, then the number of female children should be the equilibrium numbers for the two pure subpopulations, after normalizing the total number of males to 1. That is, the initial conditions are given by the carrying capacities of their two separate environments. Say the GAs were living in an environment that supported NGA males, and the gas were living in an environment that supported Nga males. Analyzing them separately, we would set NGA=1 and Nga=1. When we merge them, we have to enforce the initial condition that NGA+Nga=1.

So implicitly we have a single parameter for the initial conditions: NGA (and hence Nga=1-NGA),

For the GA subpopulation, the equilibrium number of total children = NGA_2_Pi_AA. Hence the equilibrium number of female children in the GA subpopulation pre-mixing is NGA*Pi_AA.

Similarly, the equilibrium number of female children in the ga subpopulation pre-mixing is Nga_Pi_aa=(1-NGA)_Pi_aa.

So … two ways to specify an initial condition.

  1. Specify NGA and hence Nga=1-NGA.  If NGA=Nga=0.5, then f_GA(0)=0.5*Pi_AA and f_ga(0)=0.5*Pi_aa.
  2. Specify f_GA(0)=f_ga(0).  From this and the values for Pi_AA and pi_aa, back out what the values of NGA, Nga, and f_GA(0)=f_ga(0) are.

--Mark

From: David R. Pugh [mailto:notifications@github.com] Sent: 31 August 2014 19:34 To: davidrpugh/population-ecology-approach Cc: Schaffer, Mark E Subject: Re: [population-ecology-approach] Initial condition for simulations (#33)

Remind me whether the initial condition for females should be normalized to sum to one or not. We are normalizing female adults to sum to 2, but I thought we could have any number of female children.

— Reply to this email directly or view it on GitHubhttps://github.com/davidrpugh/population-ecology-approach/issues/33#issuecomment-53996899.


We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply.

Heriot-Watt University is a Scottish charity registered under charity number SC000278.

davidrpugh commented 9 years ago

Option 1 is closest to the method that we are currently using to specify initial conditions in the master branch. Let's go with option 1 for now.

davidrpugh commented 9 years ago

I need to write a method for the Model class that computes an initial condition of the correct form given NGA.

markeschaffer commented 9 years ago

Isn't that given by option number (1) in my comment from 31 August?

More general statement:

  1. Specify NGA and hence Nga=1-NGA. f_GA(0)=NGA_Pi_AA and f_ga(0)=(1-NG)_Pi_aa.
davidrpugh commented 9 years ago

@markeschaffer

Does the initial condition need to be updated to take into account our fecundity factor, c? Should the above now read...

Specify NGA and hence Nga=1-NGA. f_GA(0)=NGA_c_Pi_AA and f_ga(0)=(1-NG)_c_Pi_aa.

markeschaffer commented 9 years ago

Yes, I think that’s right.

davidrpugh commented 9 years ago

Great. This is now closed.