**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code "statadatasetup4.do" and "statapredictLBOclean.do"
**This is the input file, except with an additional column "matchpair" indicating matched pairs:
positive **Positive integers identify pairs matched, negative integers identify matched non-LBOs in years other than the match, -0.1 identifies LBOs that failed to match to any non-LBOs under given constraintsprovided
===Running Code===
*Open Julia command line in administrator mode
*Change directory to E:\McNair\Projects\LBO\New matching\
cd("E:/McNair/Projects/LBO/New\ matching")
*Run script LBOmatchscript.jl
include("LBOmatchscript.jl")
==Options==
There are a few options that can be customized in the script before running. Getting the code into a more user-friendly form is a WIP. In fact, some parts might be difficult, if not impossible, to write in a more accessible way.
===Specify input file (if using different file than default)===
*Alternatively, can use the above options, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw
Line 58:
mscore = :logitpw;
===Specify whether matching priority should be deterministic or random===
*If deterministic, priority goes to lower GVKEY
Line 61:
randoption = 0;
===Specify additional constraints on valid matches (modify code within function mcexpr as desired)===*Run script LBOmatchscriptFor example, default code forces matches to be within the same industry group, within the same decade, and with patent stocks within +/- 20% of LBO firm.jl
Lines 69-81: function mcexpr(i) #note that the below syntax is the simplest way to store a long string over multiple lines #(i.e., appending additional characters per line) #Also, note that order of operations forces us to put each condition in parentheses mcriteria ="nonLBOs[:matchsubset] =(nonLBOs[:industrygroup3].=Options=LBOs[$i,:industrygroup3])" mcriteria =mcriteria * " .* (nonLBOs[:decade].==LBOs[$i,:decade])" mcriteria = mcriteria * " .* (nonLBOs[:patentstock] .>= (LBOs[$i,:patentstock]*.8))" mcriteria = mcriteria * " .* (nonLBOs[:patentstock] .<= (LBOs[$i,:patentstock]*1.2))" mcriteria = mcriteria * " .* (nonLBOs[:matchpair] .== 0 )" return eval(parse(mcriteria)) end