Пример #1
0
def calc_des_num_children():
    "Calculates the desired number of children for this person."
    des_num_children_prob_dist = rcParams['prob.num.children.desired']
    # Use np.floor as the last number in the des_num_children prob dist (10) is 
    # not actually seen in the Chitwan data. It is included only as the 
    # right-hand bound of the distribution.
    return np.floor(draw_from_prob_dist(des_num_children_prob_dist))
Пример #2
0
def calc_total_possessions():
    """
    Calculates the number of possessions this household owns (based on analysis 
    of 1996 CVFS data).
    """
    return np.floor(draw_from_prob_dist(rcParams['total_possessions_probs']) + 1)
Пример #3
0
def calc_birth_interval():
    "Calculates the birth interval for this person."
    birth_interval_prob_dist = rcParams['prob.birth.intervals']
    return np.floor(draw_from_prob_dist(birth_interval_prob_dist))