Household | R Documentation |
The Household
class aggregates information about
a household and its members.
An object of class Household
.
expected_income
Set of rules that are used to generate streams of expected income
expected_spending
Set of rules that are used to generate streams of expected spending
risk_tolerance
Risk tolerance of the household
consumption_impatience_preference
Consumption impatience preference of the household - subjective discount rate (rho). Higher values indicate a stronger preference for consumption today versus in the future.
smooth_consumption_preference
Smooth consumption preference of the household - Elasticity of Intertemporal Substitution (EOIS) (eta). Higher values indicate more flexibility and a lower preference for smooth consumption.
get_members()
Getting members of the household
Household$get_members()
add_member()
Adding a member to the household It will fail if a member with the same name already exists.
Household$add_member(household_member)
household_member
A HouseholdMember
object.
set_member()
Setting a member of the household If a member already exists, it will be overwritten.
Household$set_member(member)
member
A HouseholdMember
object.
set_lifespan()
Setting an arbitrary lifespan of the household
Household$set_lifespan(value)
value
A number of years.
get_lifespan()
Getting a lifespan of the household If not set, it will be calculated based on the members' lifespans.
Household$get_lifespan(current_date = get_current_date())
current_date
A date in the format "YYYY-MM-DD".
calc_survival()
Calculating a survival rate of the household based on its members' parameters of the Gompertz model.
Household$calc_survival(current_date = get_current_date())
current_date
A date in the format "YYYY-MM-DD".
get_min_age()
Calculating a minimum age of the household members.
Household$get_min_age(current_date = get_current_date())
current_date
A date in the format "YYYY-MM-DD".
clone()
The objects of this class are cloneable with this method.
Household$clone(deep = FALSE)
deep
Whether to make a deep clone.
household <- Household$new()
household$risk_tolerance
household$consumption_impatience_preference
household$smooth_consumption_preference
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.