davidrpugh / population-ecology-approach

0 stars 2 forks source link

Validating the restructured model #34

Closed davidrpugh closed 9 years ago

davidrpugh commented 9 years ago

@markeschaffer

I am starting to play with simulation results for the restructured model. Is there an obvious reason why...

  1. in the event that the equilibrium is a corner solution, that the total number of female children should sum to PiAA or Piaa (depending on whether corner solution has all altruistic, or selfish females)?
  2. in the event of an interior equilibrium, the total number of female children should sum to (almost but not exactly) PiAa + PiaA?

If the answer to the above is: "Yes! This is exactly what we should have expected." Then this is great, it suggests that the code is working properly (and that I need to learn more about the model!). If the answer to the above is: "No!" Then this good be bad (code might not be working properly), or very interesting...

markeschaffer commented 9 years ago

Yes for 1, but not for 2.

If it’s a AA corner solution, then all females are A. Therefore all families are AA, therefore all adult females are obtaining payoff Pi_AA, therefore the total number of children (male+female) is 2*Pi_AA, therefore the total number of female children is Pi_AA. Similarly for an aa corner solution.

If it’s an interior equilibrium, then the total number of children will depend on the distribution of family types. 2 will hold only if every family is an Aa family, and there are no AA or aa families. I don’t see how that can happen in our current setup – matching would have to be conditional to get this, i.e., any male that gets an A for the 1st wife then gets an a for the 2nd or visa-versa.

You should be able to see what is going on if you track the shares of the 3 kinds of families: AA, aa and Aa (=aA). This means summing over U_ijk. AAs are where i,j=0 or 2; aas are where i,j=1 or 3; Aas are the rest. Or using indicator functions: AAs are where A(i)_A(j)=1; aas are where a(i)_a(j)=1; etc.

Definitely worth tracking these shares, come to think of it….

davidrpugh commented 9 years ago

OK. Good to know. In case 2, the number of female children was converging to a number close but not exactly equal to PiAa + PiaA. I was actually concerned that we might expect the number of female children to be converging to the total family payoff, when in the code (at least for params that I have tried) gets close to the total payoff while out actually converging.

In order to compare the simulation results obtained from the restructured model with the original setup I will need to normalize the compute the equilibrium share of adult females for each genotype. How would I obtain this? Simply divided the equilibrium number of female children for each genotype by the total number of female children?

markeschaffer commented 9 years ago

On your second point – no, the equilibrium distribution of female children genotypes will differ from the equilibrium distribution of female adult genotypes, because of differential selection/matching/etc.

I think you have to calculate explicitly the distribution of adult female genotypes. These are the wives, i.e., the female children chosen as mates. If I’m not mistaken, since the choice of wife #1 is independent from the choice of wife #2, the equation for distribution of adult female genotypes is the U_ijk(.) recurrence relation except that there is only one R(.) term, i.e.,

F_x(t+1) = sum_i M_i(t+1) * R(i,x,f0(t), …, f3(t))

We sum over the distribution of adult male genotypes. For each adult male genotype, we calculate the probability of getting matched with a wife with genotype x. This will give us the distribution of genotypes of wife #1, and since the distributions of wife #1 and #2 are independent, that’s all we need.

davidrpugh commented 9 years ago

Done. Validated results merged to master.