From ad9e5a991bfad56b4f6a8269bbd2a0cd3d4db93d Mon Sep 17 00:00:00 2001 From: Thomas Obadia <thomas.obadia@gmail.com> Date: Mon, 24 Jun 2019 17:11:35 +0200 Subject: [PATCH] Fixed an error when sampling G6PD activity values for all individuals, where the standard deviation was incorrectly replaced by the mean --- Pv_mod/Population.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Pv_mod/Population.cpp b/Pv_mod/Population.cpp index 8e57324..c4b566b 100644 --- a/Pv_mod/Population.cpp +++ b/Pv_mod/Population.cpp @@ -172,13 +172,13 @@ void Population::human_step(Params& theta) // males, deficient (hemizygous) HH.G6PD_def = 1; - HH.G6PD_activity = gennor(theta.mu_G6PD_def, theta.mu_G6PD_def); + HH.G6PD_activity = gennor(theta.mu_G6PD_def, theta.sig_G6PD_def); } else { // males, normal (hemizygous) HH.G6PD_def = 0; - HH.G6PD_activity = gennor(theta.mu_G6PD_nor, theta.mu_G6PD_nor); + HH.G6PD_activity = gennor(theta.mu_G6PD_nor, theta.sig_G6PD_nor); } } else { @@ -190,7 +190,7 @@ void Population::human_step(Params& theta) // females, deficient (homozygous) HH.G6PD_def = 1; - HH.G6PD_activity = gennor(theta.mu_G6PD_def, theta.mu_G6PD_def); + HH.G6PD_activity = gennor(theta.mu_G6PD_def, theta.sig_G6PD_def); } if ((q_rand > theta.G6PD_prev*theta.G6PD_prev) && (q_rand <= theta.G6PD_prev*theta.G6PD_prev + 2 * theta.G6PD_prev*(1.0 - theta.G6PD_prev))) @@ -198,7 +198,7 @@ void Population::human_step(Params& theta) // females, deficient (heterozygous) HH.G6PD_def = 2; - HH.G6PD_activity = gennor(theta.mu_G6PD_het, theta.mu_G6PD_het); + HH.G6PD_activity = gennor(theta.mu_G6PD_het, theta.sig_G6PD_het); } if (q_rand > (theta.G6PD_prev*theta.G6PD_prev + 2 * theta.G6PD_prev*(1.0 - theta.G6PD_prev))) @@ -206,7 +206,7 @@ void Population::human_step(Params& theta) // females, normal (homozygous) HH.G6PD_def = 0; - HH.G6PD_activity = gennor(theta.mu_G6PD_nor, theta.mu_G6PD_nor); + HH.G6PD_activity = gennor(theta.mu_G6PD_nor, theta.sig_G6PD_nor); } } -- GitLab