Changes

Jump to navigation Jump to search
pg_restore -Fc -d allpatentsprocessed allpatentsprocessed_Fc_230818.dump
It looks like DataExtension.sql in E:\mcnair\Projects\LBO\Clean\Ed Run used '''usptopad''' on the old rdp but made to make tables for all of COMPUSTAT and imported import them into '''allpatentsprocessed'''. usptopad was not archived in the Big Move -- we might want to back it (and other rdp dbases ) up! It also looks like some development notes are missing. I can't find them in either E:\mcnair\Projects\LBO\Clean\Ed Run or the LBO dropbox, or Dropbox\coauthoredprojects\NonMcNair. PatentMeasures.sql takes MatchedGVKeys.txt (184) and builds the patent measures (see below) in '''allpatentsprocessed''', producing MatchedMeasuresPortfolio.txt (8468), which is merged in Analysis.do after being resaved as PatentStatistics.dta.  DROP TABLE MatchedMeasuresPortfolio; CREATE TABLE MatchedMeasuresPortfolio AS SELECT gvkeyint as gvkey, year, avg(exploitive) as avgexploitive, avg(Explorative70) as avgexplorative70, avg(Explorative80) as avgexplorative80, avg(Explorative90) as avgexplorative90, avg(gen) as avggen, avg(genunbiased) as avggenub, avg(org) as avgorg, avg(orgunbiased) as avgorgub, avg(citesmade) as avgcitesmade, avg(claims) as avgclaims FROM MatchedMeasuresBase GROUP BY gvkeyint, year ORDER BY gvkeyint, year; --8648 So, Analysis.do loads/merges the following:*PreMergeRelevant.dta, which is produced by Datasetup.do, after a ''keep if savefilter''. The sole input to Datasetup.do is '''masterv1-0.txt'''*matchresultsV7, which comes from '''matchresults - V7 nofe lagps 92 R0 indu3 20pc 5yr.txt''', which is generated by running LBOmatchscript.jl on MatchInputV7.txt*PatentStatistics.dta, which needs to be produced using PatentMeasures.sql on '''allpatentsprocessed''' once all matches have been identified*CPI.dta  export delimited gvkey year lboentry lboexit patentflow patentstock lagpatentstock indu3 indu5 indu6 decade logitpreg logitpregwindu3fe logitpregwfe hadlbo matchfilter somepatenting using "E:\McNair\Projects\LBO\Clean\Ed Run\MatchInputV7.txt", delimiter(tab) nolabel quote replace ===Analyzing DataExtension.sql=== DataExtension.sql was last saved in July 2018. The output of this script is masterv1-0.txt (last produced in March 2018), which is the sole input to Datasetup.do. This section therefore traces the construction of masterv1-0.txt.  

Navigation menu