Changes

Jump to navigation Jump to search
1,600 bytes added ,  17:44, 5 October 2020
no edit summary
{{Project
|Has project output=Content
|Has sponsor=McNair Center
|Has title=LBO Data Description
|Has owner=James Chen,Brian Ayash,Ed Egan
|Has project status=Complete
}}
 
 
This page is included in the project [[Leveraged Buyout Innovation (Academic Paper)]]
==Work Scripts==
===SQL===
*<code>E:\McNair\Projects\LBO\LBO academic paper patent data script pre compustat</code>*<code>E:\McNair\Projects\LBO\LBO academic paper script post compustat</code>
===Stata===
*<code>E:\McNair\Projects\LBO\STATAdatasetup2</code>*<code>E:\McNair\Projects\LBO\STATAanalysisSTATAanalysis2</code>
==Work Description==
===LBO Data and Patent Data===
See script for exact work.: <code>E:\McNair\Projects\LBO\patent data script</code>
*Get the source file for the LBOs
*Load the LBO data into a dbase
*match Match the LBO data to the patent data
:<code>Z:\allpatentsprocessed\LBO Patent matched</code>
*Note - all data in '''allpatentsprocessed ''' database
:access it by logging on to <code>researcher@McNair DBServ:/bulk/allpatentsprocessed</code>
*Create Table firstjoin_cleaned: Join patent data to assignee data, creating firstjoin_cleaned. firstjoin_cleaned shows organization names of assignees from the patent data and their patent numbers:again, just look inside database
*Create Table secondjoin_cleaned: join firstjoin_cleaned to matchassignees data, creating secondjoin_cleaned. secondjoin_cleaned shows standardized organization names, organization names, and patent numbers
* OLD PROCESS (NOT USED ANYMORE) join secondjoin_cleaned to lbopatentmatch data, creating thirdjoin_cleaned. thirdjoin_cleaned shows LBO's names, standardized organization names, and their patent numbers in order to show lbo's that had patents: a text file of the final copy can be found here:: <code>Z:\allpatentsprocessed\LBO Patent Data Joined</code> create table lbopatentinfo showing lbo names, patent numbers, and grant dates of the patents use lbopatentinfo to create table lbopatentsummary to show lbo names, amount of patents they have, minimum grant date years, maximum grant date years, and average grant date years import lbo data matched against itself into table(lbodistinct), then use that table and lbopatentsummary to create to create lbofinal. lbofinal then shows distinct lbonames, number of patents, minimum grant year, maximum grant year, and average grant year use lbofinal to create lboreallyfinal. lboreallyfinal is the same as lbofinal but with null space in number of patents replaced with 0 FINAL DATA IN THE FOLLOWING FOLDER <code>E:\McNair\Projects\LBO</code> #After getting lboreallyfinal, create a table with all of its columns in addition to the lbo deal numbers, and whether it was public to private or private to private in the following steps #import LBOcleaneddata.txt into table dealnumbxcleannames. it will have the deal numbers and cleaned original lbo names (duplicates not removed) #import Originallbomatch.txt into table lbonamesxcleannames. it will have the matched standardized lbo names and the cleaned original lbo names #join those two tables together to reach the standardized lbo names with the deal numbers in table lbonamesxdealnumb, and create a column that says whether the deal was public to private or private to private in the table lboxpriv #join lbo_list_and_data and lbopatentmatch together using lboxpriv as a go between. this provides a reference in case we want to join using stdorgname to the patent database #join lbo_list_and_data and lboreallyfinal together using lboxpriv as a go between. this is the final table it can be found in the following folder under the name lbopatentsreallyfinal :<code>E:\McNair\Projects\LBO\Data Sets</code>
*create table lbopatentinfo showing lbo names, patent numbers, ===Introduction of Compustat and grant dates of the patentsPreparation for Stata===See script for exact work: <code>E:\McNair\Projects\LBO\LBO academic paper script post compustat</code>
*use lbopatentinfo to create table lbopatentsummary to show lbo names, amount of patents they have, minimum grant date years, maximum grant date years, and average grant date yearsCreate tables as follows:
*import lbo '''SDC''' with SDC data imported from the initial LBO data matched against itself into table(lbodistinct), then use that table and lbopatentsummary to create to create lbofinal. lbofinal then shows distinct lbonames, number of patents, minimum grant year, maximum grant year, and average grant year
*use lbofinal to create lboreallyfinal'''LBOCOMPUSTAT4''' with Compustat data imported. lboreallyfinal is the same as lbofinal but with null space in number of patents replaced with 0
*FINAL DATA IN THE FOLLOWING FOLDER:<code>E:\McNair\Projects\LBO</code>'''dealnumbxgvkey''' selecting deal numbers and gvkeys from table sdc.
*After getting lboreallyfinal, create a table '''compustatnamematch''' with all of its columns in addition to the lbo deal numbers, and whether it was public to private or private to private in the following steps#import LBOcleaneddata.txt into table dealnumbxcleannames. it will have the deal numbers and cleaned original lbo compustat names (duplicates not removed)#import Originallbomatch.txt into table lbonamesxcleannames. it will have the matched standardized lbo names and the cleaned original lbo names#join those two tables together to reach the standardized lbo names with the deal numbers in table lbonamesxdealnumb, and create a column that says whether the deal was public to private or private to private in the table lboxpriv#join lbo_list_and_data and lbopatentmatch together using lboxpriv as a go between. this provides a reference in case we want to join using stdorgname to the patent database#join lbo_list_and_data and lboreallyfinal together using lboxpriv as a go between. this is the final table it can be found in the following folder under the name lbopatentsreallyfinal:<code>E:\McNair\Projects\LBO\Data Sets</code>against themselves imported
===Introduction of Compustat and Preparation for Stata===See script for exact work.*'''stdcompnamestdorgnamematched''' with standardized compustat names matched against stdorgname
*Create table sdc '''matchedlbocompnames''' with SDC data imported from the initial LBO data.standardized original lbo names matched to standardized compustat names
*Create table LBOCOMPUSTAT4 '''compnamematchlbocompnames''' with Compustat data imported.**Note: There were 3 prior Compustat pulls. The 1st is used to create several cross reference tables that are not made obsolete by the subsequent pulls.standardized compustat names, compustatnames, and standardized original lbo names
*Create table dealnumbxgvkey selecting deal '''stdcompnamepatentjoin''' with variables standardized compustat names and patent numbers and gvkeys from table sdc.
*Create table compustatnamematch '''compustatpatentinfo''' with variables standardized compustat names matched against themselves imported, patent numbers, and grant dates
*Create table stdcompnamestdorgnamematched '''stdcompnamexgvkeycleaned''' with variables standardized compustat names matched against stdorgnameand gvkeys
*Create table stdcompnamepatentjoin '''ALLGVKey''' with variables standardized compustat names and patent numbersall distinct gvkeys from stdcompnamexgvkeycleaned
*Create table compustatpatentinfo '''AllYears''' with variables standardized compustat names, patent numbers, and grant datesall years from 1970 to 2016
*Create table stdcompnamexgvkeycleaned '''KeysXYears''' with variables standardized compustat names gvkey and gvkeysyear. Each gvkey corresponds to 47 years.
*Create table ALLGVKey '''keysxyearsxstdcompname''' with all distinct variables gvkeys from stdcompnamexgvkeycleaned, years, and standardized compustat names
*Create table AllYears '''compupatentyearsummary''' with all variables standardized compustat names, gvkeys, years from 1970 to 2016, and number of patents per year
*Create table KeysXYears '''dealnumbxgvkeyxlboyeartemp''' with variables gvkey deal numbers, gvkeys, LBO years, and year. Each gvkey corresponds to 47 exit years.
*Create table keysxyearsxstdcompname '''dealnumbxgvkeyxlboyear''' with variables deal numbers, gvkeys, lbo years, exit years, entry year 1, entry year 2, exit year 1, and standardized compustat namesexit year 2
*Create table compupatentyearsummary '''compupatentlboyearsummary''' with variables standardized standard compustat names, gvkeys, years, and number of patents per year, and lbo entries/exits in each year
*Create table dealnumbxgvkeyxlboyeartemp '''statastaging''' with all variables from compupatentlboyearsummary in addition to all the pulled compustat variables deal numbers, gvkeys, LBO years, and exit years
*Create table dealnumbxgvkeyxlboyear '''sicnaicsconversion''' with variables deal numbers, gvkeys, lbo years, exit years, entry year 1, entry year 2, exit year 1, sic codes and exit year 2naics codes as a conversion table for adding naics that correspond to the sic codes in blank rows. Table from https://www.census.gov/eos/www/naics/concordances/concordances.html
*Create table compupatentlboyearsummary '''statastagingnew''' with variables standard compustat namestwo extra columns, gvkeys, years, number of patents per yearconcordsic and concordnaics, and lbo entries/exits in each yearthen export to stata
*Create table statastaging with all variables from compupatentlboyearsummary in addition to all the pulled compustat variables===Stata Work===See script for exact work: <code>E:\McNair\Projects\LBO\STATAdatasetup2</code>
====Setup====*Create table sicnaicsconversion with sic codes Label Compustat/patent variables imported from SQL *Generate compound variables and naics codes label them*Set the data as panel data and a conversion table time series*Set the data for adding survival analysis*Generate variable of first two numbers in naics that correspond code/lagged variable of first two numbers*Generate log of non-ratio variables*Generate lagged variables*Find first fiscal year in which data appears for each company*Find last fiscal year in which data appears for each company, or set it to 2016*Recode the sic codes in blank rowsindustry (based on NAICS2) to Manufacturing, Retail, Prof. Services, and other*Generate additional lagged variables
*Create table statastagingnew with two extra columns, concordsic and concordnaics, then export to stata
 
===Stata Work===
====Setup====
====Analysis====
See script for exact work: <code>E:\McNair\Projects\LBO\STATAanalysis2</code>
*Summary of variables intended for use in hazard model (mean, count)
*Run Cox Proportional Hazard Model multiple times to determine statistically significant variables
*Regress on variables that are questionable to determine which may be correlated
*Run Cox Hazard again with final list of variables
*Run diff-and-diff
==Regressions & Tables==
RE -- Retained Earnings
==ResourcesSQL Fixes==WRDS USER(Moved here from deleted page: mcnairLBO Fix List) *Improve SIC to NAICS fill in further**Manually add in conversions from three digit SIC (e.g., 1110) to three digit NAICS (e.g., 134)**Re-import into STATAWRDS PASS: 9Mil2015
http[[category://www.axial.net/forum/how-private-equity-screens-lbo-candidates/ - Variables that private equity firms examine to decide whether or not to lboInternal]]

Navigation menu