run_cp2015 | R Documentation |
Caliendo and Parro (2015) develop a Ricardian quantitative trade model that considers multiple countries and multiple sectors. The model allows interactions across sectors based on Input-Output linkages.
The model is originally used to study the trade and welfare effects of NAFTA given the observed tariff changes. However, from data provided by the user, this model can be used for simulations to assess the effects of different trade policies (changes in tariffs and/or iceberg trade costs).
run_cp2015(
data,
zero_aggregate_deficit = FALSE,
ufactor = 0.5,
tol = 1e-07,
maxiter = 10000,
verbose = TRUE,
triter = 100,
nthreads = 1
)
data |
a List with the model data. Run |
zero_aggregate_deficit |
a boolean indicating whether the simulation should impose zero aggregate deficits. |
ufactor |
an update factor between (0, 1]. This value is used to update the value of variables at each iteration. |
tol |
a tolerance number for convergence. The default is 1e-7. |
maxiter |
the number of maximum iterations. |
verbose |
a boolean indicating whether convergence information should be printed. |
triter |
an integer indicating that information should be printed for each multiple of that number. |
nthreads |
an integer indicating the number of threads to use. |
A list with 13 elements:
c_nj_hat (changes in cost an input bundle) - a data.frame with 3 columns:
region
sector
c_nj_hat (relative change)
P_nj_hat (changes in the region-sector price index) - a data.frame with 3 columns:
region
sector
P_nj_hat (relative change)
pi_nij (bilateral trade share) - a data.frame with 5 columns:
importer
exporter
sector
pi_bln (trade share in the baseline scenario)
pi_cfl (trade share in the counterfactual scenario)
X_nj (total expenditure) - a data.frame with 4 columns:
region
sector
X_bln (expenditure in the baseline scenario)
X_cfl (expenditure in the counterfactual scenario)
I_n (regional income) - a data.frame with 3 columns:
region
I_bln (regional income in the baseline scenario)
I_cfl (regional income in the counterfactual scenario)
P_n_hat (consumer price index) - a data.frame with 2 columns:
region
P_n_hat (relative change)
w_n_hat ("wages") - a data.frame with 2 columns:
region
w_hat (relative change)
trade (trade data) - a data.frame with 9 columns:
importer
exporter
sector
tau_bln (tariffs in the baseline scenario)
tau_cfl (tariffs in the counterfactual scenario)
d_bln (relative changes of the iceberg trade costs in the baseline scenario)
d_cfl (relative changes of the iceberg trade costs in the counterfactual scenario)
trade_bln (trade value, net of tariffs, in the baseline scenario)
trade_cfl (trade value, net of tariffs, in the counterfactual scenario)
tot (terms of trade) - a data.frame with 4 columns:
partner
region
sector
tot (contribution of terms of trade to welfare in %)
vot (volume of trade) - a data.frame with 4 columns:
region
partner
sector
vot (contribution of volume of trade to welfare in %)
tech (technical efficiency) - a data.frame with 4 columns:
region
partner
sector
tech (contribution of technical efficiency to welfare in %)
welfare (total welfare by region) - a data.frame with 6 columns:
region
tot (contribution of terms of trade to welfare in %)
vot (contribution of volume of trade to welfare in %)
tech (contribution of technical efficiency to welfare in %)
welfare (total welfare in %)
realwage (relative change in the real wage).
convergence_info (info about the solution) - a data.frame with 3 variables:
scenario
criteria_value
message
Lorenzo Caliendo, Fernando Parro, Estimates of the Trade and Welfare Effects of NAFTA, The Review of Economic Studies, Volume 82, Issue 1, January 2015, Pages 1–44, https://doi.org/10.1093/restud/rdu035
## Not run:
data("cp2015_nafta")
results_without_deficits <- run_cp2015(
data = cp2015_nafta,
zero_aggregate_deficit = TRUE,
verbose = TRUE
)
results_with_deficits <- run_cp2015(
data = cp2015_nafta,
zero_aggregate_deficit = FALSE,
verbose = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.