Git Product home page Git Product logo

ppml_simulation's Introduction

ppml_simulation version 1

This script estimates a gravity model of international trade based on a setting file, setup.csv. In the setup file, one can choose his or her desired number of simulations, s, number of countries, c, the number of time periods, t, and the true parameters, b. This script allows multiple settings. Please save your desired settings by rows.

The estimated model

export = exp(Xb + exporter time fixed effects + importer time fixed effects + e).

To note that, there is no constant term in this model. The exporter and importer fixed effects, and the error term, e, are generated from a standard normal distribution, N(0, 1). The exogenous control variable, X, follows a uniform distribution range from negative one to positive one, u(-1, 1).

The setup file

  • n_simulation: integer, the number of simulations.
  • n_countries: integer, the number of countries.
  • n_year: integer, the number of year.
  • b: an array of true parameters countained in square brackets and separated by commas. For example, [1, -1].
  • drop_importer_each_year: set to 1 to drop one importer fixed effect each year; set to 0 to drop only the first year importer fixed effect. For example, if the data include three countries and two years, there will be six (3 x 2 = 6) exporter dummies and four (3 x 2 - 2 = 4) importer dummies when drop_importer_each_year equals to 1.

The estimation program

  • main.m: use local machine.
  • par_main.m: use local machine and parallel computing method.
  • cloud_main.m: use Techila and Google Cloud computing method. For details in installing, please visit this website; for details in implementing on Matlab, please visit this website.

ppml_simulation's People

Contributors

errard70101 avatar

Stargazers

 avatar  avatar

Forkers

kawkab786

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.