- Dealscan-Compustat Link Data This link file enables researchers to merge Thomson-Reuter's LPC Dealscan database and Standard and Poor's Computstat database. Briefly, Dealscan contains detailed contract information on sole-lender and syndicated loans; Compsutat contains detailed financial information for firms.
- WRDS globally-accessed, efficient web-based service gives researchers access to accurate, vetted data and WRDS doctoral-level experts. 500+ institutions in 35+ countries – supporting 75,000+ researchers. 600+ datasets from more than 50 vendors across multiple disciplines are accessible to support users at all experience levels.
Tulane subscribes to the following databases in WRDS:
Audit Analytics Audit + Compliance: Tracks all SEC registrants, including 1200 accounting firms and 15,000 publicly registered companies. Individual datasets are updated daily and include a wide range of compliance data.
Matching between DealScan and Worldscope is based on company names; due to differences in spelling, much of the matching is manual. Out of a total of 66,730 borrowers in the sample, we match 18,347 firms (by comparison, Bae and Goyal, 2009, match 4407 borrowers between the same two databases).
Audit Analytics Corporate + Legal: Dataset collects daily legal records and correspondence from corporations, advisors, and regulators about actions and disclosures.
Bank Regulatory Database: Includes databases indexing records from bank filings with the federal government. Four databases cover Commercial Banks, Bank Holding Companies, FDIC/ OTS Deposits, and a Research Information System database.
Blockholders Database: Dataset cleans and standardizes data for blockholders of 1,913 companies. Over thirty variables covering company info and blockholder data are available.
Bets Suite by WRDS: A web-based tool used to calculate stocks’ loading on various risk factors. Use flexible monthly, weekly, and daily rolling regression on a common set of market risk factors.
BoardEx: Contains North American datasets of info on individual profiles, organization summaries, networks/ associations, compensation analysis, committee details, company profiles, and announcements.
Bureau van Dijk Amadeus: Dataset focuses on European and private company. Includes: company info, financial strength indicators, and stock prices. Dataset covers approximately 21 million companies and is subdivided according to company size.
CBOE (Chicago Board Options Exchange) Volatility Index® (VIX®): A key measure of market expectations of near-term, 30-day, volatility conveyed by S&P 500 stock index option prices. Also includes volatility “skew” using a wider range of strike prices.
Compustat-Capital IQ (Compustat-Capital IQ from Standard and Poor’s): Includes financial, statistical, and market info on active and inactive publicly-traded companies worldwide. Datasets split into North America Data and Global Data.
Bluegriffon tutorial. CRSP (The Center for Research in Security Prices): Contains annual CRSP datasets on Indexes and Stocks, as well as quarterly data on Mutual Funds.
DMEF Academic Data: Includes four datasets: multi-division, non-profit, reproduction, and specialty. Each of these provides anonymized buying history for 100,000 customers by business type with ZIP codes.
Dow Jones Averages & Total Return Indexes: Indexes are comprised of the daily and monthly Dow Jones Composite, as well other Dow Jones indices.
Efficient Frontier by WRDS: Provides risk analysis information searchable by company. Available data begins in 1970.
Event Study by WRDS: Contains sources for creating instant visualizations of the effects of events. Track M&As, new capital issues, and announcements of macroeconomic variables such as trade deficits or unemployment levels.
Eventus Software: Event study platform using data read directly from CRSP stock databases or from pre-extracted sources. Daily and monthly databases include: Basic and Volume Event Study, Cross Sectional, Event Parameters Approach, and Eventus Alternative for 'Calendar-time Portfolios'.
Fama French Portfolios and Factors: The Fama-French portfolios contain asset pricing models from two portfolios formed on size, as measured by market equity (ME), and three portfolios using the ratio of book equity to market equity (BE/ME) as a proxy for value. Two liquidity risk datasets are also available.
Federal Reserve Bank Reports: These reports contain two databases from Federal Reserve Banks – the Foreign Exchange Rates (FX) and Interest Rates (WRDS RATES).
Financial Ratios Suite by WRDS: Offers 70+ pre-calculated financial ratios for U.S. companies on firm and industry levels across categories like Capitalization, Efficiency, Financial Soundness/ Solvency, Liquidity, Profitability, and Valuation.
IBES (I/B/E/S from Thomson Reuters): Large database containing Detail History of forecast changes, Summary History of historical company data, Unadjusted Detail, Recommendations by Thomson Reuters analysts, and Information on currency rates.
Institutional Shareholder Services (ISS): Find wide-ranging info on company directors. Governance datasets contain info on classic takeover defenses and other corporate governance provisions.
Intraday Indicators by WRDS: Contains intraday information from the NYSE using TAQ data. Analyze individual stocks by variables such as volume before opening, during trading, and after closing; returns during market hours; spreads; and intraday volatility.
IRI (Information Resources, Inc.): Contains IRI’s consumer dynamics data, including info from over 11,300 grocery stores and 7,500 drug stores.
ISSM (The Institute for the Study of Security Markets): Contains tick-by-tick data from the NYSE and AMEX between 1983 and 1992, and NASDAQ between 1987 and 1992. Query by bid price and size, sale condition codes, and originating and present exchanges.
Event Study by WRDS: Contains sources for creating instant visualizations of the effects of events. Track M&As, new capital issues, and announcements of macroeconomic variables such as trade deficits or unemployment levels.
Eventus Software: Event study platform using data read directly from CRSP stock databases or from pre-extracted sources. Daily and monthly databases include: Basic and Volume Event Study, Cross Sectional, Event Parameters Approach, and Eventus Alternative for 'Calendar-time Portfolios'.
Fama French Portfolios and Factors: The Fama-French portfolios contain asset pricing models from two portfolios formed on size, as measured by market equity (ME), and three portfolios using the ratio of book equity to market equity (BE/ME) as a proxy for value. Two liquidity risk datasets are also available.
Federal Reserve Bank Reports: These reports contain two databases from Federal Reserve Banks – the Foreign Exchange Rates (FX) and Interest Rates (WRDS RATES).
Financial Ratios Suite by WRDS: Offers 70+ pre-calculated financial ratios for U.S. companies on firm and industry levels across categories like Capitalization, Efficiency, Financial Soundness/ Solvency, Liquidity, Profitability, and Valuation.
IBES (I/B/E/S from Thomson Reuters): Large database containing Detail History of forecast changes, Summary History of historical company data, Unadjusted Detail, Recommendations by Thomson Reuters analysts, and Information on currency rates.
Institutional Shareholder Services (ISS): Find wide-ranging info on company directors. Governance datasets contain info on classic takeover defenses and other corporate governance provisions.
Intraday Indicators by WRDS: Contains intraday information from the NYSE using TAQ data. Analyze individual stocks by variables such as volume before opening, during trading, and after closing; returns during market hours; spreads; and intraday volatility.
IRI (Information Resources, Inc.): Contains IRI’s consumer dynamics data, including info from over 11,300 grocery stores and 7,500 drug stores.
ISSM (The Institute for the Study of Security Markets): Contains tick-by-tick data from the NYSE and AMEX between 1983 and 1992, and NASDAQ between 1987 and 1992. Query by bid price and size, sale condition codes, and originating and present exchanges.
ISSI: Datasets from the Institute for the Study of Security Markets containing tick-by-tick data covering the NYSE and AMEX between 1983 and 1992, and NASDAQ between 1987 and 1992. Each year of data is divided into two files, one for trades and one for quotes.
Linking Suite by WRDS: Use WRDS’s Linking Suite to easily download link tables between various other WRDS platforms. Linking tools include: Bond CRSP Link, CRSP Compustat Link by CUSIP, IBES CRSP Link, Option Metrics CRSP Link, and TAQ CRSP Link.
Markit: Contains access to the Credit Default Swap (CDS) database. Markit CDS provides composite and contributor level data on 3,000 individual entities with a range of query variables for measuring data quality. Data is available from 2001 through the present.
MFLINKS (Mutual Fund Links): Contains linking tools for CRSP Mutual Fund (MFDB) data covering performance, expenses, and info related to equity holdings data in Thomson Reuters Mutual Fund Ownership data. Search for particular funds or fund groups by date.
MSRB (Municipal Securities Rulemaking Board): Contains data collected by the MSRB from their Electronic Municipal Market Access Database, representing municipal securities transactions by investors and dealers.
OptionMetrics: Contains historical options research data ideal for analyzing market movement before M&A’s, exploring relationships between option prices and daily stock return serial correlation, and investigating insider trading. Updated quarterly.
Option Suite by WRDS: Contains option and equity level indicators derived from underlying option pricing data. Datasets include US Stock Level Output and US Daily Level Output.
OTC Markets: Contains a comprehensive record of closing quote, trade, and security reference data for the ten thousand securities trading on the OTCQX, OTCQB, and OTC Pink Marketplaces.
Penn World Tables: Provides national income accounts-type of variables converted to international prices. Use this tool to create valid comparisons among countries. Data begins in 1950.
Peters and Taylor Total Q: Total q is an improved Tobin’s q proxy that includes intangible capital in the denominator, such as in the replacement cost of firms’ capital. Search data is available from 1950 through 2015. Peters and Taylor’s paper is available in the WRDS Overview section.
PHLX (Philadelphia Stock Exchange): Analyze the trade of the more than 2,800 stocks, 740 equity options, and 100 currency pairs exchanged on the PHLX. Both Currency Options and the Implied Volatility datasets include info from 1983 through 1997 and are no longer updated.
Public: Contains public data covering numerous areas, including healthcare data, BLS monthly time series data, and annual and quarterly data from the Bureau of Economic Analysis. Other info includes NYC Yellow Taxi trip info.
Research Quotient (RQ): Measure the output elasticity of R&D by locating the research quotient. Use this dataset to measure a firm’s R&D productivity.
SAS Visual Analytics: Provides an interactive analytic visualization for CRSP data. Create decision trees, network diagrams, on-the-fly forecasting, goal seeking, and scenario analysis. Instructional material is included.
SEC Order Execution (SEC-mandated Disclosure of Order Execution Statistics): Contains records of the order executions mandated by the SEC since November 2000. Data includes info on quality of executions on a stock-by-stock basis.
TAQ: Large database of NYSE trades and quotes for all securities listed on NYSE, AMEX, NMS, and SmallCap, as well as Arca. Contains a monthly product of consolidated quotes and trades, as well as NYSE short sells.
Thomson Reuters: Contains Thomson Reuters databases on Mutual Fund Holdings, Institutional Managers (13f) Holdings, WRDS–Reuters DealScan, and a Tools dataset for stock ownership info filed with the SEC.
TRACE (OTC Corporate Bond and Agency Debt Bond Transaction Data): Contains FINRA data on Bond Trading, Master Files of corporate and agency debt, and TRACE Enhanced, a dataset of bond trade info.
WRDS World Indices: Contains daily and monthly indices on 39 countries, as well as a securities profile of WRDS World Index Constituents
Markit: Contains access to the Credit Default Swap (CDS) database. Markit CDS provides composite and contributor level data on 3,000 individual entities with a range of query variables for measuring data quality. Data is available from 2001 through the present.
MFLINKS (Mutual Fund Links): Contains linking tools for CRSP Mutual Fund (MFDB) data covering performance, expenses, and info related to equity holdings data in Thomson Reuters Mutual Fund Ownership data. Search for particular funds or fund groups by date.
MSRB (Municipal Securities Rulemaking Board): Contains data collected by the MSRB from their Electronic Municipal Market Access Database, representing municipal securities transactions by investors and dealers.
OptionMetrics: Contains historical options research data ideal for analyzing market movement before M&A’s, exploring relationships between option prices and daily stock return serial correlation, and investigating insider trading. Updated quarterly.
Option Suite by WRDS: Contains option and equity level indicators derived from underlying option pricing data. Datasets include US Stock Level Output and US Daily Level Output.
OTC Markets: Contains a comprehensive record of closing quote, trade, and security reference data for the ten thousand securities trading on the OTCQX, OTCQB, and OTC Pink Marketplaces.
Penn World Tables: Provides national income accounts-type of variables converted to international prices. Use this tool to create valid comparisons among countries. Data begins in 1950.
Peters and Taylor Total Q: Total q is an improved Tobin’s q proxy that includes intangible capital in the denominator, such as in the replacement cost of firms’ capital. Search data is available from 1950 through 2015. Peters and Taylor’s paper is available in the WRDS Overview section.
PHLX (Philadelphia Stock Exchange): Analyze the trade of the more than 2,800 stocks, 740 equity options, and 100 currency pairs exchanged on the PHLX. Both Currency Options and the Implied Volatility datasets include info from 1983 through 1997 and are no longer updated.
Public: Contains public data covering numerous areas, including healthcare data, BLS monthly time series data, and annual and quarterly data from the Bureau of Economic Analysis. Other info includes NYC Yellow Taxi trip info.
Research Quotient (RQ): Measure the output elasticity of R&D by locating the research quotient. Use this dataset to measure a firm’s R&D productivity.
SAS Visual Analytics: Provides an interactive analytic visualization for CRSP data. Create decision trees, network diagrams, on-the-fly forecasting, goal seeking, and scenario analysis. Instructional material is included.
SEC Order Execution (SEC-mandated Disclosure of Order Execution Statistics): Contains records of the order executions mandated by the SEC since November 2000. Data includes info on quality of executions on a stock-by-stock basis.
TAQ: Large database of NYSE trades and quotes for all securities listed on NYSE, AMEX, NMS, and SmallCap, as well as Arca. Contains a monthly product of consolidated quotes and trades, as well as NYSE short sells.
Thomson Reuters: Contains Thomson Reuters databases on Mutual Fund Holdings, Institutional Managers (13f) Holdings, WRDS–Reuters DealScan, and a Tools dataset for stock ownership info filed with the SEC.
TRACE (OTC Corporate Bond and Agency Debt Bond Transaction Data): Contains FINRA data on Bond Trading, Master Files of corporate and agency debt, and TRACE Enhanced, a dataset of bond trade info.
WRDS World Indices: Contains daily and monthly indices on 39 countries, as well as a securities profile of WRDS World Index Constituents
WRDS Backtester: A WRDS platform for users to test the historical performance of common asset pricing signals for the U.S. equity market. Users can choose from over 100 common signals or upload their own customized signal values.
WRDS TR 13-F Stock Ownership: a WRDS tool to aggregate Thomson-Reuters Institutional Ownership data at the security level. This tool uses Thomson-Reuters S34 data.
This post is based on a presentation I was asked to give our second-year PhD students. The presentation focused on using the databases that the university subscribes to, and it includes two specific examples of the benefits of using a SAS connection rather than the online menus to pull data.
This is an example of steps one could take if one were to search for the audit opinions of firms traded on equity exchanges outside of the United States.
First, I have created a folder named c:replicationpark directly on the C-drive of my computer. If you are going to use the .do files and .sas files included in this document, you must have the same folder on your c-drive. Do not create this within your documents or user folder! Go directly onto your C-drive to create this folder.
When using online menus for WRDS accessible databases, I use the “->” symbol to indicate that you must click on specific links on a given webpage. You will see this notation below.
Once logged into WRDS, the researcher is able to pull data from a variety of databases- COMPUSTAT, CRSP, etc. Log onto WRDS -> Compustat -> Global -> Fundamentals Annual -> Manuals and Overviews -> Compustat Global (FTP) Version Data Manual -> Auditors Codes
Per the first sentence on the page, it appears that “AUOP” is the variable we need and that it is concatenated and includes both the audit firm and the audit opinion.
We can also go to WRDS -> Compustat -> Fundamentals Annual -> Manuals and Overviews -> Global Plus EX NA Item List and save the Excel file with the definitions which is Global Plus EX NA Item List.xlsx. “AUOP” is also listed on the this Excel spreadsheet.
Compustat has an online menu feature where one does not need to connect to the “backend” directly with a SAS connection. To pull data in this way, the user browses through the online menu and clicks the variables needed. There is a circular question mark button the right of each variable which will pull up examples or definitions of the variable. Note that the menu list feeds from a specific SAS table on the backend of Compustat. If we want to know if a particular variable is available via the online menu, we can take a look at the contents of the SAS table and do a keyword search for the variable we want.
Home -> Compustat -> Global -> Fundamentals Annual -> Variable Descriptions
This shows us the contents of the “gfunda” table. If one searches for “AUOP” within this page, “AUOP” will not be found. This means that AUOP is not available via the online menu. Hit the back button on your browser, then – > Dataset list
Here we are seeing the actual SAS tables that are on the “backend” of WRDS. The online menu buttons link to these and pulls specific variables, however, there are more variables available on the backend than what appear to be available via the online menu.
Scroll down to Comp:Global: company [/wrds/comp/sasdata/global/company] -> G_CO_AAUDIT
Note that “au” is the auditor and “auop” is the auditor opinion. The data dictionary we pulled above made it look like “AUOP” was concatenated with both the auditor and the opinion, but it appears in the dataset that these are actually separate variables.
We need to log onto WRDS directly with SAS to pull the “AUOP” variable since it is not available via the menu pulldown. We can either log on to the backend and look at the full tables, or we can pull data directly via the SAS connection. First, we log on and view the table.
Open SAS and run intl_table_view.sas
The code for this is:
%let wrds=wrds.wharton.upenn.edu 4016;
options comamid=tcp;
signon wrds username=_prompt_;
libname intl “/wrds/comp/sasdata/global/company/” server=wrds;
options comamid=tcp;
signon wrds username=_prompt_;
libname intl “/wrds/comp/sasdata/global/company/” server=wrds;
Note that to view tables on the backend directly, the “libname” referencing statement is modified with “… server=wrds;” This modification is not present when we will pull data directly in the next example.
The first three lines of code above create the remote log in. The fourth line of code references the backend table and calls this table “intl”
-> Libraries -> Intl (this will be the name you gave the remote library and will show the blue box icon)
Now, we can see all of the backend tables in the directory. We click on G_Co_Aaudit and can see the records in the table. This is great, but to pull the data down onto our computer, we need a different program.
Open SAS and run intl_table_pull.sas
The code for this is:
%let wrds=wrds.wharton.upenn.edu 4016;
options comamid=tcp;
signon wrds username=_prompt_;
libname local’c:replicationpark’;
rsubmit;
libname intl”/wrds/comp/sasdata/global/company/”;
data intl_op;
set intl.g_co_aaudit (keep= gvkey indfmt datafmt consol popsrc rank au auop auopic ceoso cfoso datadate);
keep gvkey indfmt datafmt consol popsrc rank au auop auopic ceoso cfoso datadate;
procdownload data= intl_op out= local.intl_op;
run;
endrsubmit;
options comamid=tcp;
signon wrds username=_prompt_;
libname local’c:replicationpark’;
rsubmit;
libname intl”/wrds/comp/sasdata/global/company/”;
data intl_op;
set intl.g_co_aaudit (keep= gvkey indfmt datafmt consol popsrc rank au auop auopic ceoso cfoso datadate);
keep gvkey indfmt datafmt consol popsrc rank au auop auopic ceoso cfoso datadate;
procdownload data= intl_op out= local.intl_op;
run;
endrsubmit;
The blog platform separated the “set intl.g_co_aaudit…” line of code into two lines when I published this entry. These two lines of code are actually one line in my SAS code. Every line of SAS code must end with a “;”. If you see a line of SAS code that does not end with a semi-colon on this post, run it together with the line of code immediately below when you execute the file to avoid errors. You will see that this pulls a SAS dataset named intl_op.sas onto your computer. Next, use StatTransfer to convert the SAS dataset to Stata.
Note that we pulled the entire table. This is inefficient, because it is likely that we only want certain firms or certain years depending upon our research question and/or time period we wish to study. I am a Stata user and not a SAS user. There are ways to modify the SAS code to only pull specific firms, specific years, ignore duplicates etc. but I find that it’s often faster for me to pull everything and then clean the data up in Stata since I’m much more familiar with Stata code. What I have learned about SAS is purely from wading through help forums. With fast processing time, I find it’s easier to pull entire tables than to try and write the perfect piece of SAS code to get only what I really need.
![Database Database](https://www.lpccollateral.com/collateral/App_Themes/Default/LandingPageSlideImages/Holdings.png)
Having said that, here is an example of pulling the audit opinions for international firms for years after 12/31/2000 and before 12/31/2002. I used the following pdf file to help me create this example:
Here is the code:
%let wrds=wrds.wharton.upenn.edu 4016;
options comamid=tcp;
signon wrds username=_prompt_;
libname local’c:replicationpark’;
rsubmit;
libname intl”/wrds/comp/sasdata/global/company/”;
data intl_op;
set intl.g_co_aaudit (keep= gvkey indfmt datafmt consol popsrc rank au auop auopic ceoso cfoso datadate);
where datadate > ’31dec2000’d & datadate < ’31dec2002’d;
keep gvkey indfmt datafmt consol popsrc rank au auop auopic ceoso cfoso datadate;
procdownload data= intl_op out= local.intl_op_years;
run;
endrsubmit;
options comamid=tcp;
signon wrds username=_prompt_;
libname local’c:replicationpark’;
rsubmit;
libname intl”/wrds/comp/sasdata/global/company/”;
data intl_op;
set intl.g_co_aaudit (keep= gvkey indfmt datafmt consol popsrc rank au auop auopic ceoso cfoso datadate);
where datadate > ’31dec2000’d & datadate < ’31dec2002’d;
keep gvkey indfmt datafmt consol popsrc rank au auop auopic ceoso cfoso datadate;
procdownload data= intl_op out= local.intl_op_years;
run;
endrsubmit;
Note the “where” statement keeps only observations with datadates after 12/31/2000 and before 12/31/2002.
For our second example, say we want to find which stock exchange non US-traded firms are traded on.
WRDS-> Compustat -> Global -> Fundamentals Annual-> do a key word search for “exchange” “Stock Exchange Code” is found via this key word search. Click on the question box marker next to this item. It says that the “exchg” variable has the information needed and references the Compustat manual for the full list of codes.
To find a list of what the codes are,
WRDS -> Compustat -> Global -> Fundamentals Annual -> Manuals and Overviews -> Compustat Global (FTP) Version Data Manual -> Exchange Listing Codes
These codes are alphanumeric, but the examples given for the “exchg” variable per the online menu were not alphanumeric. We know the “exchg” variable starts with the letter “e”, so we can try to look in a different spot to see if we can find only numeric codes.
WRDS -> Compustat -> Global -> Fundamentals Annual -> Manuals and Overviews -> Compustat Global (FTP) Version Data Manual -> Data Definitions A- Fo
Search for “exchg” and we find “exchgi”, which also appears to be alpha numeric.
Let’s use the menu to pull data dates between Jan 2006 and Feb 2013. Select “Search the entire database” since we want all firms and not a subset. Click the “Company Name” and “Stock Exchange Code” variable boxes and select Stata as the dataset. Save the dataset on your computer as exchg_menu_pull.dta, open it, and type:
tab exchg
You will see that none of these codes are alphanumeric. They are purely numeric. At this point, the data definitions we have found do not appear to be useful for the exchange codes we have pulled from the online menu. However, there are SAS data dictionary files available on the “backend”.
WRDS -> Compustat -> Global -> Fundamentals Annual -> Dataset List
Look under the COMP:GLOBAL: dictionary: [ /wrds/comp/sasdata/global/dictionary ] heading.
Under this heading we see the G_R_Ex_Codes table. Let’s log on to view the table and see if this helps.
Run the exchg_table_view.sas file which executes the following code:
%let wrds=wrds.wharton.upenn.edu 4016;
options comamid=tcp;
signon wrds username=_prompt_;
libname exchg “/wrds/comp/sasdata/global/dictionary” server=wrds;
options comamid=tcp;
signon wrds username=_prompt_;
libname exchg “/wrds/comp/sasdata/global/dictionary” server=wrds;
-> Libraries -> Exchg -> G_r_ex_codes
These codes are purely numeric and also contain the data definitions for the exchange data we pulled earlier.
We can run a second SAS file to pull the table down. This SAS file is exchg_table_pull.sas, and runs the following code:
%let wrds=wrds.wharton.upenn.edu 4016;
options comamid=tcp;
signon wrds username=_prompt_;
libname local’c:replicationpark’;
rsubmit;
libname exchg”/wrds/comp/sasdata/global/dictionary”;
data exchanges;
set exchg.g_r_ex_codes (keep= exchgcd exchgdesc);
keep exchgcd exchgdesc;
procdownload data= exchanges out= local.exchg;
run;
endrsubmit;
options comamid=tcp;
signon wrds username=_prompt_;
libname local’c:replicationpark’;
rsubmit;
libname exchg”/wrds/comp/sasdata/global/dictionary”;
data exchanges;
set exchg.g_r_ex_codes (keep= exchgcd exchgdesc);
keep exchgcd exchgdesc;
procdownload data= exchanges out= local.exchg;
run;
endrsubmit;
Next, using StatTransfer we can convert the exchg.sas dataset into a Stata file, exchg.dta, and can merge it with exchg_menu_pull.dta.
Run dbases.do which merges these files together. This is a many-to-one merge based on exchg. The code for this .do file is:
capture log close
log using dbases.log, replace
cd c:replicationpark
use exchg.dta, clear
log using dbases.log, replace
cd c:replicationpark
use exchg.dta, clear
/* Rename the exchgcd variable to exchg so that we can merge.
It is a good practice to not overwrite raw datasets, so
once we modify the variable name the dataset is saved
as “exchg_merge.dta” */
It is a good practice to not overwrite raw datasets, so
once we modify the variable name the dataset is saved
as “exchg_merge.dta” */
rename exchgcd exchg
save c:replicationparkexchg_merge.dta, replace
use exchg_menu_pull.dta
/* merge the two datasets together */
merge m:1 exchg using exchg_merge.dta
/* We know that per the dictionary Ghana is exchg 100. Let’s
do a quick reasonableness check. */
do a quick reasonableness check. */
list if exchg100
/* We can see that the firm names appear to be firms in Ghana */
/* This is beyond the scope of this post
but it’s a good idea to always examine observations
that failed to merge. I will do a post on merging
sometime in the future. */
but it’s a good idea to always examine observations
that failed to merge. I will do a post on merging
sometime in the future. */
list exchg if _merge1
Dealscan Database Manual Pdf
/* These didn’t merge because the exchg is a missing value in one of the datasets */
Dealscan Database Manual Free
list exchg exchgdesc if _merge2
Dealscan Database Manual Download
/* These didn’t merge because they were not included in the
data we pulled from the online menu pulldown. */
data we pulled from the online menu pulldown. */