Skip to content

Commit

Permalink
use 1-rho rather than surv_rate
Browse files Browse the repository at this point in the history
  • Loading branch information
jdebacker committed Oct 11, 2023
1 parent c9139e0 commit 8303d4e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ogcore/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,9 @@ def compute_default_params(self):
if self.constant_demographics:
self.g_n_ss = 0.0
self.g_n = np.zeros(self.T + self.S)
surv_rate = np.ones_like(self.rho) - self.rho
surv_rate1 = np.ones((self.S,)) # prob start at age S
surv_rate1[1:] = np.cumprod(self.surv_rate[:-1], dtype=float)
surv_rate1[1:] = np.cumprod(self.surv_rate[-1, :-1], dtype=float)
# number of each age alive at any time
omega_SS = np.ones(self.S) * surv_rate1
self.omega_SS = omega_SS / omega_SS.sum()
Expand Down

0 comments on commit 8303d4e

Please sign in to comment.