Sample models

The following examples are intended to help users get started using gEcon package. The majority of these models has been written for testing purposes during gEcon development and their results have been compared to those obtained in other software.

In order to run these models, save them (.gcn files with accompanying .R scripts) on disk, load gEcon package under R, and run the accompanying R scripts (in the same directory, after setting R working directory there).

For information about the language and the R interface please refer to the Users' guide, which can be found under the documentation tab.

Unless otherwise stated, the models are distributed under the same licence as gEcon package, which can be found here.

Static / CGE models

Model Model code (.gcn)
and R script
Documentation (.pdf)
and model logfile
Static pure exchange pure_exchange.gcn
pure_exchange.R
pure_exchange.pdf
pure_exchange.model.log
Static pure exchange using templates pure_exchange_t.gcn
pure_exchange_t.R
pure_exchange_t.pdf
pure_exchange_t.model.log
Basic CGE using templates cge_templ.gcn
cge_templ.R
cge_templ.pdf
cge_templ.model.log
Basic CGE with government cge_gov_templ.gcn
cge_gov_templ.R
cge_gov_templ.pdf
cge_gov_templ.model.log
Basic CGE with calibration (Leontief technology) cge_calibration.gcn
cge_calibration.R
cge_calibration.pdf
cge_calibration.model.log
Basic CGE with calibration (Cobb-Douglas technology) cge_calibration_cd.gcn
cge_calibration_cd.R
cge_calibration_cd.pdf
cge_calibration_cd.model.log
Simple CGE model calibration using gEcon.iosam package (licence) cge_calibr_iosam.gcn
cge_calibr_iosam.R
cge_calibr_iosam.pdf
cge_calibr_iosam.model.log
CGE model for fiscal policy impact assessment developed at the Department for Strategic Analyses (DAS) at the Chancellery of the Prime Minister of the Republic of Poland (licence). For legal reasons, the actual data is not provided. cge_DAS.gcn
cge_DAS.R
cge_DAS.pdf
cge_DAS.model.log
CGE model with international trade developed at the Department for Strategic Analyses (DAS) at the Chancellery of the Prime Minister of the Republic of Poland (licence). The model is calibrated to an artificially generated data set. cge_DAS-int.gcn
cge_DAS-int.R init_par.csv
init_val.csv
cge_DAS-int.pdf
cge_DAS-int.model.log

RBC / DSGE models

Model Model code (.gcn)
and R script
Documentation (.pdf)
and model logfile
Basic RBC model rbc.gcn
rbc.R
rbc.pdf
rbc.model.log
RBC with installation costs (the model from the Users' guide) rbc_ic.gcn
rbc_ic.R
rbc_ic.pdf
rbc_ic.model.log
RBC with capacity utilization rbc_cu.gcn
rbc_cu.R
rbc_cu.pdf
rbc_cu.model.log
RBC with habit formation rbc_hf.gcn
rbc_hf.R
rbc_hf.pdf
rbc_hf.model.log
RBC with monopolistic competition rbc_mc.gcn
rbc_mc.R
rbc_mc.pdf
rbc_mc.model.log
RBC with two sectors rbc_ts.gcn
rbc_ts.R
rbc_ts.pdf
rbc_ts.model.log
Home production (based on Benhabib J., Rogerson R., and Wright R. (1991)) home_production.gcn
home_production.R
home_production.pdf
home_production.model.log
Home production (based on Benhabib J., Rogerson R., and Wright R. (1991)) using templates home_prod_templ.gcn
home_prod_templ.R
home_prod_templ.pdf
home_prod_templ.model.log
Stochastic growth with Epstein-Zin preferences epstein_zin.gcn
epstein_zin.R
epstein_zin.pdf
epstein_zin.model.log
Time-to-build model ttb.gcn
ttb.R
ttb.pdf
ttb.model.log
Two countries with risk sharing tc_rs.gcn
tc_rs.R
tc_rs.pdf
tc_rs.model.log
Two countries with risk sharing using templates tc_rs_templ.gcn
tc_rs_templ.R
tc_rs_templ.pdf
tc_rs_templ.model.log
Smets-Wouters '03 model (the model from the paper) SW_03.gcn
SW_03.R
SW_03.pdf
SW_03.model.log

Download all models

All models (models.tar.gz)