davidrpugh / population-ecology-approach

0 stars 2 forks source link

Presentation plots #43

Closed davidrpugh closed 9 years ago

davidrpugh commented 9 years ago

@markeschaffer, @PaulSeabright

Below is a plot for the corner solution with G males and A females as well as an example that shows polymorphism in the alpha gene. The only difference between parameterizations in the two plots is the value of the e (which partially determines assortativity): high values of e generate a corner solution; low values of e generate polymorphism in alpha.

Note that the payoff structure does NOT satisfy returns to scarcity. Thus the plots demonstrate a minimal set of conditions necessary to generate polymorphism in alpha.

Multiple equilibria

Multiple equilibria

Multiple equilibria

Multiple equilibria

Multiple equilibria

GA Corner solution

GA corner solution

GA corner solution selection pressure

ga Corner solution

ga corner solution

ga corner solution selection pressure

Polymorphism with A and a alleles

Polymorphism in alpha

Polymorphism in alpha selection pressure

Sweep for linear payoffs

Polymorphism sweep 1

Sweep for hierarchical payoffs

Polymorphism sweep 2

Polymorphism sweep 3

Feedback is much appreciated.

davidrpugh commented 9 years ago

@markeschaffer

Check the new parameters for the ga corner solution plot. Do these look more reasonable?

markeschaffer commented 9 years ago

Yes, that looks nice.

davidrpugh commented 9 years ago

@markeschaffer and @PaulSeabright

Have added graphics for the female selection pressure. Please advise...

markeschaffer commented 9 years ago

Nice! The only thing I can think of is that in the first female selection pressure diagram, the time axis only goes out to 100, whereas in the corresponding plot of shares it goes all the way to about 1800. When I tried to match the two plots, this confused me at first.

It’s fine in the interior equilibrium plots – they have t go 800.

markeschaffer commented 9 years ago

Also, maybe use a different colour scheme for the NS-SS pressure plot?

For the shares graph, it’s probably OK to use the same colour for G and A (blue) and g and a (green). But it’s a little confusing to also use blue and green for NS and SS, no?

PaulSeabright commented 9 years ago

I agree with Mark that there might be confusion from using blue and green for NS and SS. Perhaps yellow and brown or somethng? Also it would be good to ensure the plots are still identifiable in black and white - so use dotted and dashed lines or mixed dotted-and-dashed.

I am puzzled that in the ga corner solution the net selection pressure tends to zero. That seems to suggest it is not quite a corner solution, only very nearly a corner solution. Do you have an explanation for this?

davidrpugh commented 9 years ago

@PaulSeabright

Good point about B&W. I am sure someone has thought of good color schemes for multi-line plots that also need to work in B&W. I will look into this today and change the plots.

While not obvious visually, the net selection pressure in the ga corner solution does not tend to exactly zero but stabilizes at a value that is slightly negative indicating that natural selection effect dominates the sexual selection effect.

davidrpugh commented 9 years ago

@markeschaffer @PaulSeabright

Plots updated to include selection pressure on gamma gene. See discussion in issue #42 regarding some questions I have about measuring the selection pressure on genes. As soon as I find better color and line schemes I will update accordingly.

markeschaffer commented 9 years ago

A few things I don’t understand about the new pressure plots:

Are the alpha and gamma plots based on selection pressure for females and males, respectively? I am guessing “yes” but want to make sure.

In the GA corner solution, there is persistent total pressure >0 for A and G, which makes sense.

But in the ga corner solution, the plots seem to show net pressure of zero (red line is on 0.0). Is that a magnification problem and net pressure is really <0 for both a and g?

Same problem with the mixed monomorphic/polymorphic GAa equilibrium: is the red line for the gamma plot >0 or =0?

Also, should that be “IFC” rather than “IRC”?

davidrpugh commented 9 years ago

@markeschaffer

Indeed the selection pressure plots are based on the decomposition we have currently derived which is based on selection pressure from females (alpha) and males (gamma).

In the ga corner solution the net pressure stabilizes at a value that is slightly negative indicating that natural selection is natural selection dominates sexual selection. In the polymorphism in alpha equilibrium the net pressure converges to zero. It may be possible to find examples of the ga corner solution where the net effect is more obviously non-zero. I haven't found any yet though.

D

markeschaffer commented 9 years ago

The other possibility is that it is selection via the other – unplotted – gender that brings them to the edge.

davidrpugh commented 9 years ago

@markeschaffer

Indeed. This is why we need to develop the more elaborate decomposition. Do you think we can do this in time for the presentation?

davidrpugh commented 9 years ago

@markeschaffer

Check out the selection pressure plot for the GA corner solution. Thoughts? We should probably meet sometime to go over the measures of selection pressure to make sure that I have implemented them correctly.

davidrpugh commented 9 years ago

@markeschaffer

I have posted the selection pressure plots for the ga corner solution and the polymorphism in alpha gene. The natural selection and sexual selection effects are no longer offsetting in the polymorphic case. I suspect that this is because I have a bug in my implementation...

davidrpugh commented 9 years ago

@markeschaffer

Found and fixed the bug! Now plots behaving as expected. Feedback is much appreciated.

PaulSeabright commented 9 years ago

Thanks David, these are very nice. One small suggestion: when plotting the selection pressures could you put the alpha plots on the right and the gamma plots on the left? At present the population shares are plotted with the gammas on the left and the alphas on the right, and since there are a lot of plots to look at it helps to have a consistent spatial disposition.

I'm still trying to think about the best way pedagogically to describe our decomposition of the sexual selection component into male and female. I'll get back to you on this.

markeschaffer commented 9 years ago

Agreed. And also put the gene in () in the title of the pop share plots, e.e., "Adult males (gamma shares)".

SS models and SS reality are known to be able to generate very fast rates of evolution. I think we are seeing this in the pressure plots in the much stronger pressure on alpha.

-------- Original message -------- Subject: Re: [population-ecology-approach] Presentation plots (#43) From: PaulSeabright notifications@github.com To: davidrpugh/population-ecology-approach population-ecology-approach@noreply.github.com CC: "Schaffer, Mark" M.E.Schaffer@hw.ac.uk

Thanks David, these are very nice. One small suggestion: when plotting the selection pressures could you put the alpha plots on the right and the gamma plots on the left? At present the population shares are plotted with the gammas on the left and the alphas on the right, and since there are a lot of plots to look at it helps to have a consistent spatial disposition.

I'm still trying to think about the best way pedagogically to describe our decomposition of the sexual selection component into male and female. I'll get back to you on this.

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

{"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"https://github.com/davidrpugh/population-ecology-approach/issues/43#issuecomment-61048724","name":"View Issue"}}


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.

markeschaffer commented 9 years ago

“I'm still trying to think about the best way pedagogically to describe our decomposition of the sexual selection component into male and female.” How about (for gamma)…

Females: ln { F^G(t+1) / f^G(t) } – ln { F^g(t+1) / f^g(t) }

Males: ln { m^G(t) / M^G(t) } – ln { m^g(t) / M^g(t) }

m^G(t) = f^G(t) m^g(t) = f^g(t)

Total SS (gamma): ln { F^G(t+1) / M^G(t) } – ln { F^g(t+1) / M^g(t) }

Female SS pressure: how much more likely gamma is to get inserted into a family unit. Operates via females joining family units and selection on their alpha phenotype.

Male SS pressure: how much more likely gamma is to be passed from father to child within the family. Fathers can influence this by mate choice, and only by mate choice since they have no control over their own genetic makeup. Operates via males selection who joins family units via their gamma phenotype.

PaulSeabright commented 9 years ago

Yes, I like this way of putting it. Furthermore it reveals something that as far as I know has not appeared in the sexual selection literature before. Sexual selection is always treated as being about the differential ability of alleles to get themselves into the next generation after reaching sexual maturity BY BEING MATED (either selected by the other sex or victorious in the competition for access to the other sex). Here we have the differential ability of alleles to get theselves into the next generation by selecting a partner who has a genotype yielding high fitness. This has always as far as I know been treated as though it were purely about seleciton on the genotype of the partner, and not about selection characteristics that lead the partner to be selected. This is novel and, I hope, important

davidrpugh commented 9 years ago

@markeschaffer and @PaulSeabright

Have flipped the subplots in the population shares so that alpha allele plots are on the left and gamma allele plots are on the right in order to be consistent with the selection pressure graphic. My suggestion would be to show multiple graphics for the population shares in order to demonstrate that the model is sufficiently rich, however only show and discuss in detail one of the selection pressure graphics.

markeschaffer commented 9 years ago

We will need an additional piece of information for each case, namely whether or not the equilibrium we are displaying is globally stable or only locally stable. (Because someone in the audience is bound to want to know this.) This could be answered systematically with a sweep over m^GA(0), but a quick-and-dirty way is just to try two extrema, m^GA(0)=0.01 and 0.99, or something like that.

markeschaffer commented 9 years ago

Something else we will need to note/acknowledge/address at some point:

We are drastically limiting the range of initial conditions by setting all "mixed" genotypes to zero, i.e., m^Ga=f^Ga=m^gA=f^gA=0. This may mean that there are polymorphic equilibria that we're not finding because we're not seeding the initial population with a large enough share of these mixed types.

We have a nice story for it - we start with two separate "pure" subpopulations that start to mix - but it does have this limitation.

NB: Setting the initial male and female shares to be equal, m^GA(0)=f^GA(0) etc., is not much of a limitation because it's implied by the 1:1 sex ratio at birth.

davidrpugh commented 9 years ago

@markeschaffer

  1. A quick check using the interactive plots indicates that all of the above equilibria are globally stable. I have not checked the eigenvalues of the Jacobian at the equilibrium point yet. Assessing stability of equilibria is something that we need to address more systematically at some point. See issue #2 for dormant discussion.
  2. We are drastically limiting the range on initial conditions but we need some mechanism for limiting the degrees of freedom in the model. From a software design prospective I like the idea of creating an InitialCondition class that would store different approaches for restricting the set of initial conditions. This would allow us to "plug and play" various InitialCondition objects. Does this sound like a useful feature? If so I will open a new issue.
markeschaffer commented 9 years ago

On (1): Can I put in a request for a set of parameters and accompanying pictures that generate multiple equilibria? Just a 2-edge-case equilibrium would be enough. (We used to get these all the time with our original S function.) We wouldn’t necessarily want to present them, but we should be prepared to say something about it.

On (2): I would hold off on diving into the initial condition stuff just now. Not sure about the best way to think about it, and there are higher-priority issues in the meantime.

Looking ahead to code changes, we’ll want to be able to play around with different S functions, and especially with an expanded male strategy space (the s parameter). The new Holy Grail –identifying the male ESS strategy when the strategy space is (s1, s2) and the s parameters lie in [-1, 1].

It would be cool find that making s continuous in [-1, 1] gives you strategies that are never an ESS and males should never randomise. That is, the only possible ESS is [1,1], [-1,-1] or [1,-1]. We have now just the first two as G and g. If the 3rd (“build a hierarchy”) is the only addition we need it would be great.

davidrpugh commented 9 years ago

@markeschaffer

I seem to be having trouble getting multiple equilibria for a given set of parameters. Varying e can change to model from corner solution to a polymorphism, but given a value for e equilibrium seems to be unique.

PaulSeabright commented 9 years ago

surely there must be multiple equilibria with high enough e, in thet GA and ga are both locally stable...?

markeschaffer commented 9 years ago

Maybe not, and maybe because of the dreaded Depletion Problem. High e means that no matter how rare A is, a G male will find her:

S^GA = e + (1-e) * f^A/f

So maybe you have to try very low e…? Then big A males will have a lot of trouble finding big G females if they are both very rare, and ditto g/a.

From: PaulSeabright [mailto:notifications@github.com] Sent: 30 October 2014 13:40 To: davidrpugh/population-ecology-approach Cc: Schaffer, Mark Subject: Re: [population-ecology-approach] Presentation plots (#43)

surely there must be multiple equilibria with high enough e, in thet GA and ga are both locally stable...?

— Reply to this email directly or view it on GitHubhttps://github.com/davidrpugh/population-ecology-approach/issues/43#issuecomment-61092408. {"@context":"http://schema.org","@type":"EmailMessage","description":"View this Issue on GitHub","action":{"@type":"ViewAction","url":"https://github.com/davidrpugh/population-ecology-approach/issues/43#issuecomment-61092408","name":"View Issue"}}


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 and @PaulSeabright

I have been able to find multiple equilibria with high e=0.9 so long as PiAA - Piaa < epsilon where epsilon is sufficiently small (roughly 0.05). If this condition is satisfied then, for low mGA0 the equilibrium is corner solution with ga; for high mGA0 the equilibrium is corner solution with GA.

markeschaffer commented 9 years ago

This is good … but I am curious to see whether multiple equilibria exist with very low e, as per my previous comment. Not high priority though.

davidrpugh commented 9 years ago

@markeschaffer

I was checked for multiplicity with e=0.10 for various different payoff configurations (i.e., returns to scarcity, hierarchy, neither, etc) and was unable to find examples of multiple equilibria.

Gross speculation on my part, but I suspect that multiplicity requires a switch in sign for either the sexual or natural selection pressures.

markeschaffer commented 9 years ago

Should we have plots for the full G/g/A/p polymorphism case?

PaulSeabright commented 9 years ago

useful to have as back-up but I don't think we'll have time to get to them in the presentation.

I hope to have a full version of the presentation available for you tomorrow evening or Tuesday morning at the latest. SOrry it's been slow - I've been traveling and rather underwater with other stuff as a result of Jean's Nobel prize, which has has indirect but large repercussions for my workload too.

markeschaffer commented 9 years ago

Yes, I had the same thing in mind – backup in case anyone in the audience wants to see it.

markeschaffer commented 9 years ago

Parameter sweep plots are great. Just one minor request - change the vertical axis from "share who mate assortativity" to "Assortativity parameter e". The reason is that the "share who mate assortatively" isn't e, it's e + something that is frequency dependent.

markeschaffer commented 9 years ago

The "linear" and "hierarchical" parameter sweep plots have the same payoff structure, 5/4/3/2 (?).

davidrpugh commented 9 years ago

@markeschaffer

Fixed. Thanks!

PaulSeabright commented 9 years ago

There must be an error in the labeling of the multiple equilibria plot - it has apparently exactly the same payoffs as the sweep for linear payoffs, which doesn't have multiple equilibria. Am I right that it's just the labeling that has gone wrong and that it should Piaa=3.75?

davidrpugh commented 9 years ago

@PaulSeabright

Indeed. Except that the requirement is that Piaa=3.95. Plots have been fixed.

PaulSeabright commented 9 years ago

Thanks!

PaulSeabright commented 9 years ago

Am I right in thinking that if you did a parameter sweep for a much more hierarchical set of payoffs (PiaA=15 or whatever) you would get some rainbow colors on the right-hand plot as well?

markeschaffer commented 9 years ago

Yes, I'd like to see a double-rainbow too!

-------- Original message -------- Subject: Re: [population-ecology-approach] Presentation plots (#43) From: PaulSeabright notifications@github.com To: davidrpugh/population-ecology-approach population-ecology-approach@noreply.github.com CC: "Schaffer, Mark" M.E.Schaffer@hw.ac.uk

Am I right in thinking that if you did a parameter sweep for a much more hierarchical set of payoffs (PiaA=15 or whatever) you would get some rainbow colors on the right-hand plot as well?

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


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 @PaulSeabright

Extreme hierarchy parameter sweep is up. Probably not what you were expecting! Seems like intermediately large values of e and extreme hierarchy will produce polymorphism in both alpha and gamma.

PaulSeabright commented 9 years ago

great, thanks!

markeschaffer commented 9 years ago

Wonderfully bizarre!!

Do we have time series plots for these 2x2 polymorphisms? Not necess for the presentation but it would be interesting to compare the evolution of the shares for several starting values of e leading to qual diff equilibria.

davidrpugh commented 9 years ago

@markeschaffer @PaulSeabright

New plots are up! Note that I also fixed the notation for the initial condition in the old plots that led to some confusion.

PaulSeabright commented 9 years ago

These new plots look great but I don't understand their pedagogical purpose. Surely if we want to understand the nature of the multiple equilibria we should have two plots with the same value of e (say 0.7) and two different values of MGA, say 0.5 and 0.8, showing that these lead to different equilibria. As it stands, comparing the two equilbria in the first two plots it's not immediately clear whether the difference is due to the M or the e.

2014-11-06 18:01 GMT+01:00 David R. Pugh notifications@github.com:

@markeschaffer https://github.com/markeschaffer @PaulSeabright https://github.com/PaulSeabright

New plots requested plots are up! Note that I also fixed the notation for the initial condition in the old plots that led to some confusion.

— Reply to this email directly or view it on GitHub https://github.com/davidrpugh/population-ecology-approach/issues/43#issuecomment-62012897 .

Toulouse School of Economics, Manufacture des Tabacs, 21 allée de Brienne, 31015 Toulouse Cedex 6, France www.tse-fr.eu

Institute for Advanced Study in Toulouse www.iast.fr

Personal website:

http://paulseabright.com/

http://press.princeton.edu/titles/9169.html

davidrpugh commented 9 years ago

I think that the pedagogy would be something like...

  1. First plot shows corner solution with ga
  2. Second plot, different initial condition and different e, shows corner solution with GA.
  3. This is general: we get different equilibria depending on initial condition and parameter e.
  4. See parameter sweeps for exact description of the dependence of equilibria on both initial condition and e.

Now this pedagogy is already present in the current slides (I think). However I agree with Mark that it would be slightly better to have the corner solution plots be generated using the same payoff matrix as the first parameter sweep plot.

D

On Thu, Nov 6, 2014 at 1:00 PM, PaulSeabright notifications@github.com wrote:

These new plots look great but I don't understand their pedagogical purpose. Surely if we want to understand the nature of the multiple equilibria we should have two plots with the same value of e (say 0.7) and two different values of MGA, say 0.5 and 0.8, showing that these lead to different equilibria. As it stands, comparing the two equilbria in the first two plots it's not immediately clear whether the difference is due to the M or the e.

2014-11-06 18:01 GMT+01:00 David R. Pugh notifications@github.com:

@markeschaffer https://github.com/markeschaffer @PaulSeabright https://github.com/PaulSeabright

New plots requested plots are up! Note that I also fixed the notation for the initial condition in the old plots that led to some confusion.

— Reply to this email directly or view it on GitHub < https://github.com/davidrpugh/population-ecology-approach/issues/43#issuecomment-62012897>

.

Toulouse School of Economics, Manufacture des Tabacs, 21 allée de Brienne, 31015 Toulouse Cedex 6, France www.tse-fr.eu

Institute for Advanced Study in Toulouse www.iast.fr

Personal website:

http://paulseabright.com/

http://press.princeton.edu/titles/9169.html

— Reply to this email directly or view it on GitHub https://github.com/davidrpugh/population-ecology-approach/issues/43#issuecomment-62022460 .

PaulSeabright commented 9 years ago

In that case I think it would be better to have three plots:

  1. First plot shows corner solution with ga, say e=0.7 and MGA=0.5
  2. Second plot shows that you can get corner solution with GA by keeping the same MGA=0.5 and setting e=0.9
  3. Third plot shows you can get the GA corner solution by keeping e=0.7 and setting MGA=0.9

P

markeschaffer commented 9 years ago

I agree with Paul's 3-path-plot proposal.

-------- Original message -------- Subject: Re: [population-ecology-approach] Presentation plots (#43) From: PaulSeabright notifications@github.com To: davidrpugh/population-ecology-approach population-ecology-approach@noreply.github.com CC: "Schaffer, Mark" M.E.Schaffer@hw.ac.uk

In that case I think it would be better to have three plots:

  1. First plot shows corner solution with ga, say e=0.7 and MGA=0.5
  2. Second plot shows that you can get corner solution with GA by keeping the same MGA=0.5 and setting e=0.9
  3. Third plot shows you can get the GA corner solution by keeping e=0.7 and setting MGA=0.9

P

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


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

Done. See above.