| Title: | One Sector Armington-CES Gravity Model with General Equilibrium |
|---|---|
| Description: | Implements a one-sector Armington-CES gravity model with general equilibrium (GE) effects. This model is designed to analyze international and domestic trade by capturing the impacts of trade costs and policy changes within a general equilibrium framework. Additionally, it includes a local parameter to run simulations on productivity. The package provides functions for calibration, simulation, and analysis of the model. |
| Authors: | Noé J Nava [aut, cre], Maros Ivanic [aut] |
| Maintainer: | Noé J Nava <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-06-10 09:44:47 UTC |
| Source: | https://github.com/cran/gravityGE |
Solves one sector Armington-CES gravity model with general equilibrium
gravityGE( trade_data, theta = 4, beta_hat_name = NULL, a_hat_name = NULL, multiplicative = FALSE )gravityGE( trade_data, theta = 4, beta_hat_name = NULL, a_hat_name = NULL, multiplicative = FALSE )
trade_data |
A data frame that contains 'orig', 'dest', and 'flow' named columns, with additional variables as described below. |
theta |
Trade elasticity parameter (default = 4). |
beta_hat_name |
A character name in trade_data for the beta_hat variable. If NULL, a matrix of ones is used. Domestic trade ('orig' == 'dest') must have a value of 0. |
a_hat_name |
A character name in trade_data for the a_hat variable. If NULL, a matrix of ones is used. All values across 'orig' in a_hat must be the same. |
multiplicative |
Logical. If TRUE, the model is multiplicative. If FALSE, the model is additive. Default = FALSE. Additive is recommended when trade data is unbalanced. |
A list containing two data frames. A dyadic ('orig' and 'dest') data frame with the new trade flows, and a unidirectional ('orig') data frame with the welfare effects.
flows <- expand.grid(LETTERS, LETTERS) flows$flow <- 1 names(flows)[1:2] <- c("orig", "dest") # There should be no change in welfare (all ones) out <- gravityGE::gravityGE( trade_data = flows, theta = 4, beta_hat_name = NULL, a_hat_name = NULL, multiplicative = FALSE )flows <- expand.grid(LETTERS, LETTERS) flows$flow <- 1 names(flows)[1:2] <- c("orig", "dest") # There should be no change in welfare (all ones) out <- gravityGE::gravityGE( trade_data = flows, theta = 4, beta_hat_name = NULL, a_hat_name = NULL, multiplicative = FALSE )