Skip to content

Commit

Permalink
attempt fix to gen_ar_income
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-becker committed Jul 29, 2023
1 parent db027f1 commit 1eb7d1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def gen_ar_income(n, ar_coefficients, start, sd, baseline, min_income, m):
shocks[:, :p] = np.random.normal(0, sd, (m, p)) # initialize first p shocks

for i in range(m):
for t in range(p, n):
for t in range(p, min(n, len(baseline))):
# Calculate the new shock value based on the AR process
new_shock = np.dot(
ar_coefficients, shocks[i, t - p : t][::-1]
Expand Down

0 comments on commit 1eb7d1e

Please sign in to comment.