sledgehammer
Posts: 533 Joined: Sep. 2008
|
Quote (Bob O'H @ June 17 2009,23:58) | Quote | Favorable Mutations:
c... Compute mean absolute fitness effect for favorable mutations.
sum = 0. d2 = 1.
do i=1,1000000 d1 = d2 d2 = exp(-alpha_fav*(0.000001*i)**gamma_fav) sum = sum + d1 + d2 end do
fav_mean = 0.0000005*sum*max_fav_fitness_gain |
Ugh. That's a horrible way to do the integration. I recognise the density (George Box was promoting it in the 50s), and it has an analytic solution: alpha_fav*gamma_fav*Gamma(1/gamma_fav), where Gamma() is the gamma function.
(ref: Box, G. E. P. 1953. A note on regions for tests of kurtosis. Biometrika 40: 465-468)
Also, where does the 0.0000005 come from? I'm always suspicious of constants like that. |
Well it is 1/2*1/1,000,000, and since it is a density, the sum-as-integral needs to be scaled, but I thought the (0.000001*i) was supposed to do that. I think it's a boo-boo.
-------------- The majority of the stupid is invincible and guaranteed for all time. The terror of their tyranny is alleviated by their lack of consistency. -A. Einstein (H/T, JAD)
If evolution is true, you could not know that it's true because your brain is nothing but chemicals. ?Think about that. -K. Hovind
|