diff --git a/ogusa/macro_params.py b/ogusa/macro_params.py index ada35a7..3a88765 100644 --- a/ogusa/macro_params.py +++ b/ogusa/macro_params.py @@ -107,7 +107,9 @@ def get_macro_params(): # find g_y macro_parameters["g_y"] = ( - fred_data_q["GDP Per Capita"].pct_change(periods=4, freq="QE").mean() + fred_data_q["GDP Per Capita"] + .pct_change(periods=4, freq="QE", fill_method=None) + .mean() ) # # estimate r_gov_shift and r_gov_scale diff --git a/ogusa/utils.py b/ogusa/utils.py index 8520e37..587b5f7 100644 --- a/ogusa/utils.py +++ b/ogusa/utils.py @@ -1,6 +1,6 @@ import pandas as pd import numpy as np -from scipy.stats import kde +from scipy.stats import gaussian_kde import matplotlib.pyplot as plt import requests import urllib3 @@ -203,7 +203,7 @@ def MVKDE( k += 1 freq_mat = np.vstack((age_frequency, income_frequency)).T - density = kde.gaussian_kde(freq_mat.T, bw_method=bandwidth) + density = gaussian_kde(freq_mat.T, bw_method=bandwidth) age_min, income_min = freq_mat.min(axis=0) age_max, income_max = freq_mat.max(axis=0) agei, incomei = np.mgrid[