help for qogmergealso see: qoguse

Title

Merging Quality of Government (QoG) data

Syntax

qogmerge country time [using filepath|filename],
version() format() [merge_options]

country is either (a) a variable holding the names of the
countries OR (b) a single country name.

time is either (a) a variable holding the years in the survey
OR (b) a single 4-digit year.

Description

The QoG-data is a dataset containing aggregate statistics of the quality of government of
various countries worldwide measured at various points in time. It is provided by
University of Gothenburg: The Quality of Government Institute.

qogmerge merges the latest release of Quality of Government (QoG) data
to the data stored in the memory, using country and year as a key. To make this possible, the
user must specify country and year in specific format. The country must be specified either in
the "numeric ISO-3166 format" or as "full English country names" as defined by the International
Standardization Organization. Year must be specified in 4-digit-numeric-format.

Usually both, country and time, will be specified by listing the variables in the data loaded in memory in which
countries and years are stored. If data is based on only one country or on a single year, specify only this
country/year instead of a country-variable or a time-variable (see Examples below)

When you not want to automatically download the latest version from the internet, specify the location of the
QoG-data on your computer with using. You can specify the path on your computer or a certain filename.
qogmerge detects whether a folder or a file is given.

If you specify the folder on your computer containing the QoG-data, the filename
will be set automatically based on your version() and format(). Therefore, you need the latest
QoG-data available through qoguse or http://www.qog.pol.gu.se/data/.

Options

version() defines which version of the QoG-data you want to use. The alternatives are Basic (bas), Standard
(std), OECD (oecd), Expert Survey (exp), EQI (eqi) and EU Regional (eureg).
Each version has different formats which you have to specify:

format() defines the different datasets. For the Basic, Standard and OECD version you can choose between
Cross-Section Data (cs) and Time-Series Data (ts). For the Expert Survey and EQI data you can choose
individual (ind) or aggregate (agg) formats. The EU Regional data is available in three formats:
Long (long), NUTS 1 (wide1) and NUTS 2 (wide2).).

Merging the Expert Survey is only possible for Country-Level (agg) data. It is not possible to merge format(ind)
since this data is based on a web-survey by country experts and has individual experts, not country-year, as the unit of analysis.

Time information (year) is only available for format()-options: ts, long, wide1, wide2 and for EQI
data with format(ind). If you specify a time-variable (or a single year) for any other dataset, this information will be ignored.

other Options

All merge-options are allowed with qogmerge. If
keep() is not specified, keep(1 3) is default.

Examples

Example 1: Merge QoG-data to the World Values Survey (WVS)

Assume you have already downloaded and unzipped the data of the
World Values Survey (WVS). We load into memory all rounds of the WVS

. use WVS_Longitudinal_1981_2014_stata_v2015_04_18, clear

In this file the country names are stored in variable S009. However,
the information in this file given in ISO 3166 Alpha-2 format, which
is not suitable for qogmerge. We use the user defined program
kountry
by Rafal Raciborski to convert the information stored in
S009 into the correct format:

. kountry S009, from(iso2c)

This command creates the variable NAMES_STD holding the
standardized English country names. You can now use qogmerge, in this case with S020 holding year-information.
Here we add all variables from QoG to the WVS

. qogmerge NAMES_STD S020, version(std) format(ts)

although it is recommended to apply the option keepusing(varlist) to reduce the size of the new data set.

Example 2: Merge QoG to the first wave of European Social Survey (ESS)

. use ESS1e06_5.dta, clear

. kountry cntry, from(iso2c)

. qogmerge NAMES_STD, version(bas) format(cs)

Example 3: Merge QoG and ESS for Sweden only

. use ESS1e06_5.dta if cntry == "SE", clear

. qogmerge Sweden inwyr, version(oecd) format(ts)

Example 4: Merge QoG to round II of the European Quality of Life Survey (EQLS)

. use analytical_file_8_sept_2008_compact_file.dta, clear

. kountry country_abbr, from(iso2c)

. qogmerge NAMES_STD 2007, version(bas) format(ts)

Example 5: With local data

-with filename:

. qogmerge country time using "C:/Data/qog_std_ts_jan17.dta", version(std) format(ts)

-with folder:

. qogmerge country time using "C:/Data/", version(std) format(ts)

Author

Christoph Thewes, University of Potsdam, thewes@mailbox.org

The QoG-data is provided by University of Gothenburg: The Quality of Government Institute

(Thanks to William Lisowski and Daniel Klein for useful help)

(Code-snippet from confirmdir. By Dan Blanchette)

Also see

Help: merge, qoguse (if installed), kountry (if installed)

Online:
kountry

Source: http://www.qog.pol.gu.se

Data: http://www.qog.pol.gu.se/data/

Version

2.1.2: 25/05/2020