R/model_caliendo_parro_2015.R
update_trade_share_cp_2015.RdCompute new trade shares following Caliendo & Parro (2015) equation (12).
update_trade_share_cp_2015(
trade_share,
trade_cost_change,
input_cost_change,
price_change,
trade_elasticity,
model_dimensions
)Array of initial trade flows, dimensions: origin x destination x sector.
Array of change in trade costs, dimensions: origin x destination x sector.
Matrix of input cost changes, dimensions: sector x country.
Matrix of price index changes, dimensions: sector x country.
Positive Frechet trade elasticity theta, dimension: sector.
List of model dimensions.
Array of new trade shares, dimensions: origin x destination x sector.