WiNDC Household Model
Add the package by running
pkg> add https://github.com/julia-mpsge/windc_household_model.jlIt is also useful to add both MPSGE and DataFrames packages,
pkg> add MPSGE, DataFramesLoad and use the package by running
using windc_household_model
using DataFrames, MPSGE
data = load_data(2017)
M = household_model(data);
solve!(M, cumulative_iteration_limit=0)
zero_profit(M[:KS])
value(M[:ta]["AL", "ppd"])
set_value!(M[:ta]["AL", "ppd"], .5)
solve!(M)windc_household_model.household_model — Methodhousehold_model(data)Constructs a MPSGE model for the WiNDC household model. The model is constructed using the data provided by the load_data function.
windc_household_model.load_data — Methodload_data(year::Int)Load the household data for a given year. Only the years 2017 and 2021 are available.
windc_household_model.variable_to_dataframe — Methodvariable_to_dataframe(var::MPSGEIndexedVariable, columns::Symbol...; value_name = :value)
variable_to_dataframe(var::MPSGEScalarVariable, columns::Symbol...; value_name = :value)Converts a MPSGEIndexedVariable to a DataFrame. The resulting DataFrame will have columns for each of the dimensions of the variable, as well as a column for the value of the variable.
If the variable is a scalar variable, the resulting DataFrame will only have a column.