Government Transfer Distribution Estimation Functions#
transfer_distribution.py modules
ogusa.transfer_distribution#
- ogusa.transfer_distribution.MVKDE(S, J, proportion_matrix, zaxis_label='Received proportion of total transfers', filename=None, plot=False, bandwidth=0.25)[source]#
Generates a Multivariate Kernel Density Estimator and returns a matrix representing a probability distribution according to given age categories, and ability type categories.
- Parameters:
S (scalar) – the number of age groups in the model
J (scalar) – the number of ability type groups in the model.
proportion_matrix (Numpy array) – SxJ shaped array that represents the proportions of the total going to each (s,j) combination
filename (str) – the file name to save image to
plot (bool) – whether or not to save a plot of the probability distribution generated by the kde or the proportion matrix
bandwidth (scalar) – used in the smoothing of the kernel. Higher bandwidth creates a smoother kernel.
- Returns:
- SxJ shaped array that
that represents the smoothed distribution of proportions going to each (s,j)
- Return type:
estimator_scaled (Numpy array)