View source: R/calculate_health_expend.R
calculate_health_expend | R Documentation |
Independent function aimed to help calculate whether a household has severe (>10% of expenditures) or catastrophic (>25% of expenditures) expenditures for health care.
calculate_health_expend(
df,
monthly_expenditures,
period_expenditures = NULL,
num_period_months = NULL,
health_exp_col
)
df |
Inputs a dataframe with monthly or period household expenditure information |
monthly_expenditures |
Inputs a character vector of column names for columns of various household expenses in the previous 30 days. |
period_expenditures |
Inputs a character vector of column names for columns of various household expenses in a previous, recall period, specified in the num_period_months paramater. |
num_period_months |
Inputs a whole integer for the number of months of the period expenditures reported. |
health_exp_col |
Inputs a character value for the name of the column specific for health household expenditures. |
Returns the dataframe with additional columns for severe and catastrophic health expenditures.
## Not run: calculate_health_expend(df = myexpendituredata, monthly_expenditures =
c("food_exp", "gas_exp", water_exp", "health_exp"), health_exp_col = "health_exp"))
## End(Not run)
## Not run: calculate_health_expend(df = myexpendituredata, monthly_expenditures =
c("food_exp", "gas_exp", water_exp"), period_expenditures = c("shelter_repair_exp",
"education_exp", "health_exp"), num_period_months = 6, health_exp_col = "health_exp")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.