Stata-Code

This a a list of my Stata packages (for more details scroll down):

xtdcce2 and xtcd2

multishell

comtrade

mmat2tex

htmltab2stata

stataid

splag

xtdcce2 and xtcd2 (on SSC)[NEW VERSION]

xtdcce2 estimates heterogeneous coefficient models using common correlated effects in a dynamic panel. xtcd2 tests for cross sectional dependence. Download and more infos are available here.

The latest version is available from within Stata: net install, from(https://janditzen.github.io/xtdcce2/)

multishell [NEW VERSION AVAILABLE]

multishell allows the efficient processing of loops and of multiple do files across a single and multiple computers. multishell dissects forvalues and foreach loops and creates for each variation (tasks) a separate do file. The do files are queued and sequentially processed. Besides the do file, a .bat file is created for each task. Then Stata's build in shell command is used to start a new instance of Stata using the .bat file. The instance is closed as soon as the task is completed (or failed, then it is reported) and a new instance processing the next task is started. One instance is reserved to organise the tasks and starts other instances. Multiple instances can be run in parallel on the same computer.

Install from within Stata using: net install multishell, from(http://www.ditzen.net/Stata) or ssc install multishell

See helpfile.

Slides for 2018 London Stata User Group Meeting.

comtrade

Downloads trade data from UN Comtrade using jsonio and parses the output in a user friendly format.

comtrade downloads trade data from UN Comtrade. Comtrade trade data is available in the JSON (JavaScript Object Notation) format. comtrade uses the user written command jsonio to download the data in the JSON format, it then parses the retrieved data bringing it in into an user friendly format. Comtrade offers data in four different ways, via a bulk download, an API call or a webadress. comtrade can retrieve data from all of those, but validates the request first. In addition it can downlaod data from the Monthly Bulletin of Statistics (MBS) of Analytical Trade Tables and World Tables of International Trade Statistics Yearbook (ITSY) including footnotes.

For more information see the git hub repository or the help file.

Install from within Stata: net install comtrade, from("https://janditzen.github.io/comtrade/")

mmat2tex (on SSC)

mmat2tex exports a Mata matrix into LaTeX table format and saves it. Only the body of the table (i.e. rows and columns) is created, but further LaTeX commands at the beginning and end of the table can be included. The mata matrix can be string, real or complex.

Installation in Stata type "ssc mmat2tex" or download the package here.

A new version is available from within Stata: net install mmat2tex, from(http://www.ditzen.net/Stata)

html2stata

html2stata loads html tables into Stata. Tables are identified by <table>...</table>. It is possible to add links to the content of a cell, use the first row as variable names and process several tables per html webpage.

For more information see the git hub repository or the help file.

Install from within Stata: net install htmltab2stata, from("https://janditzen.github.io/htmltab2stata/")


stataid

Obtaining and displaying information about running Stata instances under Microsoft Windows. stataid can close Stata instances using a Windows process id.

For more information see the git hub repository or the help file.

Install from within Stata: net install stataid, from("https://janditzen.github.io/stataid/")


splag

splag creates spatial lags using weights from a dataset. Can be installed in Stata by typing: net install splag , from(http://www.ditzen.net/Stata)

The latest versions of all commands can be retrieved from within Stata by typing net from http://www.ditzen.net/Stata in the command window.