Self-study course 8th Vintage


The course is made for autonomous online learning. It is structured in three modules: Beginners, Intermediate and Advanced. Each of them requires a different level of background knowledge with regards to economic theory and Stata software. It is advisable to follow all three modules. Finally, in the Beginners module it is also provided an extra session to learn how to employ the reduced dataset in Excel and Stata.

The e-learning material of each module includes:&nb

  • A set of scripts in Stata format (.do files), each executing one task of the analysis;
  • A detailed (.ppt) presentation explaining how to execute and interpret all the tasks included in the do-files, and providing final practice assignments;
  • Solution .do files to the assignments;
  • Data .dta files needed for the exercise implementation.

Although the course is meant for autonomous learning, the CompNet staff will be available to answer technical questions and to receive feedback or suggestions, in order to help the data users to exploit this learning opportunity at their best.


The aim of the course is to learn how to use CompNet data to analyse competitiveness, by looking at different economic dynamics including productivity, financial conditions, international trade, labor, misallocation, market power, and other economic factors. The three modules touch upon the same topics going at a deeper level of analysis, by growing in analytical complexity from Beginners to Advanced. Before the three modules start, an introductory presentation explains the structure of the CompNet database:

  • Data collection process, data release and methodology;
  • Coverage: countries, years and sectors;
  • Samples: all and 20e;
  • Data files: unconditional statistics, productivity decompositions, joint distributions, transition matrices, production function estimations, and reduced dataset;
  • Categories and types of variables;
  • Statistics: percentiles, moments (mean, variance, skewness, kurtosis), weights.

The Beginners module is intended for CompNet first users with a limited knowledge of Stata, micro-data analysis and/or economic theory. The goal is to show how to download and open data using Stata, to make the user able to understand the basic structure of the database and to carry out some initial analysis, as well as aggregating data. The final output includes tables and charts at country, macrosectoral and 2-digit industry level. Stata .do files are prepared using the simplest commands, therefore a basic knowledge of Stata would be useful but is not required in this first session.

Tasks for Beginners:

  • Task 1 - Data preparation: how to download the data from the website, open and merge data files, and tailor the sample of interest;
  • Task 2 - Data mining and aggregation: how to summarize data and represent them in simple tables, and aggregate data;
  • Task 3 - Data visualization: standard line charts, bar charts and scatter plots at different levels of aggregation.

The Intermediate module is minded for users who are familiar with the basic structure of the CompNet database and the micro-based economic analysis with Stata. It aims at showing some of the most common analyses which are typically implemented using CompNet for economic reports and working papers. Participants will deal with parametric and non-parametric variables coming from different data files. They will have the opportunity to take advantage of the database richness to understand the different trends across the firms’ distribution using statistical moments as well as joint distributions and transition matrices. Also, participants will perform some standard regressions and make more complex aggregation and charts for a richer visual representation. Rigorous definitions of the different variables’ parametric estimations are explained in the provided material, in order to make the users aware of the economic reasoning behind their usage.

Tasks for Intermediate:

  • Task 1 - Combining dimensions: combination of more dimensions in a single chart and representation over additional levels of aggregation, by using distribution of firms’ characteristics and size growth;
  • Task 2 - Descriptives: countries, years, and groups comparison using different types of indicators available within the CompNet database;
  • Task 3 - Analyzing productivity: TFP normalization and regression analysis of labor productivity and TFP, including scatter plots with fitted line and significance, comparison of punctual estimates and confidence intervals, contribution charts of the regressors’ predictive power, and growth trend;
  • Task 4 - Analyzing dispersion: trends combining mean/median values with the evolution of dispersion indicators, interquartile ranges, percentiles, and relative charts;
  • Task 5 - Further on aggregation: how to aggregate more complex indicators, e.g. markups.

The Advanced module is minded for academic scholars, PhD students and professionals with a solid knowledge of applied economics. It does not solely relate to the standard use of the CompNet database, but it also shows some more original ideas requiring a certain degree of economic and econometric understanding.

Tasks for Advanced:

  • Task 1 - Productivity and Labor Markets: relation between productivity, labor share, and market structure through simple regressions and dynamic analysis;
  • Task 2 - Drivers of Firm Performances: panel and probit models to detect determinants of growth end exports;
  • Task 3 - Computing Markups and TFP: computation of markups and TFP for single firms using the parametric indicators in the CompNet database;
  • Task 4 - Approximating Distributions: approximation of firm-level distributions for the indicators in CompNet by using the moments available in its database;
  • Task 5 - Firm Size Performances and Regional Differences: sectoral performances along the joint distribution of firm size, and mapping regional differences in terms of labor productivity.

Course Material and Layout

To implement the training course and run the Stata codes, CompNet competitiveness data are needed and all researchers can apply to have access to them by submitting the data request form to the CompNet team via the IWH Research Data Centre.

The user is advised to start the course by consulting the introduction to CompNet and its database, at the following link:

Introduction to CompNet and its Database

Afterwards, the Beginners module presentation can be found at the following link:

Beginners - Presentation

The user is recommended to follow the module task by task, and reproduce the output of each task running the respective Stata .do file code. The Beginners module Stata .do file codes are available here:

After each task, the user is asked to do an assignment in order to undertake a similar analysis as in the respective task. First, it is suggested to follow the course task, then try to do the assignment by yourself before continuing the course. Solution codes are provided below:

Task 1 - Solution

Task 2 - Solution

Task 3 - Solution

If the user is interested in better understanding the reduced dataset, a specific module is available at the following link:

Training on the Reduced Dataset - Presentation

And the relative Stata .do file can be found here:

Task on the Reduced Dataset


Subsequently, the Intermediate module presentation is available here:

Intermediate - Presentation

The user is recommended to follow the same procedure as in the previous module. The Intermediate module Stata .do file codes are available here:

Task 1 - Combining Dimensions

Task 2 - Descriptives

Task 3 - Analyzing Productivity

Task 4 - Analyzing Dispersion

Task 5 - Further on Aggregation


And the solution codes for the respective assignments can be found at the following links:

Task 1 - Solution

Task 2 - Solution

Task 3 - Solution

Task 4 - Solution

Task 5 - Solution


Finally, the Advanced module presentation is available here:

Advanced - Presentation

The user is recommended to follow the same procedure as in the previous modules. The Advanced module Stata .do file codes are available here:

Task 1 - Productivity and Labor Markets

Task 2 - Drivers of Firm Performances

Task 3 - Computing markups and

Task 4 - Approximating Distributions

Task 5 - Firm Size Performances and Regional Differences

And the solution codes for the respective assignments can be found at the following links:

Task 1 - Solution

Task 2 - Solution

Task 3 - Solution

Task 4 - Solution

Task 5 - Solution