<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.edegan.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JChen</id>
	<title>edegan.com - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.edegan.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JChen"/>
	<link rel="alternate" type="text/html" href="http://www.edegan.com/wiki/Special:Contributions/JChen"/>
	<updated>2026-06-02T01:16:10Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Estimating_Unobserved_Complementarities_between_Entrepreneurs_and_Venture_Capitalists_Matlab_Code&amp;diff=22817</id>
		<title>Estimating Unobserved Complementarities between Entrepreneurs and Venture Capitalists Matlab Code</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Estimating_Unobserved_Complementarities_between_Entrepreneurs_and_Venture_Capitalists_Matlab_Code&amp;diff=22817"/>
		<updated>2018-06-11T20:03:07Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Important contractions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Main Project here: [[Estimating Unobserved Complementarities between Entrepreneurs and Venture Capitalists]]&lt;br /&gt;
&lt;br /&gt;
==Important contractions==&lt;br /&gt;
&lt;br /&gt;
*GMM: Generalized Method of Moments&lt;br /&gt;
*MSM: Method of Simulated Moments&lt;br /&gt;
*MLE: Maximum Likelihood Estimation&lt;br /&gt;
*GA: Genetic Algorithm&lt;br /&gt;
*SE: Standard Error&lt;br /&gt;
&lt;br /&gt;
==How to run==&lt;br /&gt;
&lt;br /&gt;
First, you need a gurobi license, which can be obtained (free) [http://www.gurobi.com/registration/academic-license-reg here].&lt;br /&gt;
&lt;br /&gt;
In master.m, edit the options section to reflect what you want the code to do. Then run it.&lt;br /&gt;
&lt;br /&gt;
==Location/structure of the code==&lt;br /&gt;
&lt;br /&gt;
The old codebase is located in&lt;br /&gt;
  E:\McNair\Projects\MatchingEntrepsToVC\OriginalCode&lt;br /&gt;
The new codebase is located in &lt;br /&gt;
  E:\McNair\Projects\MatchingEntrepsToVC\AdjustedCode&lt;br /&gt;
The new-new codebase is located in&lt;br /&gt;
  E:\McNair\Projects\MatchingEntrepsToVC\ReAdjustedCode&lt;br /&gt;
&lt;br /&gt;
Some of this code is just library code (prefix mtimesx).&lt;br /&gt;
&lt;br /&gt;
===master.m===&lt;br /&gt;
&lt;br /&gt;
====options section====&lt;br /&gt;
&lt;br /&gt;
'''task:''' Can take the values {'data', 'monte', 'monte_data'}.&lt;br /&gt;
&lt;br /&gt;
'''estimator:''' Can take the values {'MSM'}. (other estimators removed in readjusted code)&lt;br /&gt;
&lt;br /&gt;
'''use_solver:''' Can take the values {'ga'}. (other solvers removed in readjusted code)&lt;br /&gt;
&lt;br /&gt;
'''error_type''' (currently hard coded as 1 and isn't fully written to support 2): 1 for match specific errors, with the error distribution following an exchangeable structure. var(e) = sig^2, and cov(e,e') = 1/4*sig^2. 2 for agent specific errors, with the error structure of match &amp;lt;i, j&amp;gt; as sig*ei*ej.&lt;br /&gt;
&lt;br /&gt;
===gmm_2stage_estimation.m===&lt;br /&gt;
&lt;br /&gt;
Does the majority of the work for this problem. Runs the GA, saves the results to 'empirics_match_specific_1st_stage_ga', then runs it again with different globals, and saves it to 'empirics_match_specific_2nd_stage_ga'.&lt;br /&gt;
&lt;br /&gt;
===nonlinearcons_msm.m===&lt;br /&gt;
&lt;br /&gt;
Constraints on GA. For [c,ceq] = nonlinearcons_msm(x), GA constrains x such that c ≤ 0 and ceq = 0. c and ceq are row vectors when there are multiple constraints. ceq is unused for our purposes.&lt;br /&gt;
&lt;br /&gt;
===msmf_corr_coeff.m===&lt;br /&gt;
&lt;br /&gt;
This is the fitness function. Takes a vector and returns a scalar. GA minimizes this function.&lt;br /&gt;
&lt;br /&gt;
===moments.m===&lt;br /&gt;
&lt;br /&gt;
Generates the moments needed for the GMM.&lt;br /&gt;
&lt;br /&gt;
==Location/Structure of Data==&lt;br /&gt;
Pro tip: running the command &lt;br /&gt;
  whos -file filename&lt;br /&gt;
from a matlab session will tell you the contents of any .mat file.&lt;br /&gt;
&lt;br /&gt;
There are two of both psdata and dyad_tech_mkt_data, corresponding to 4 industries or 5 industries. You can find them in &lt;br /&gt;
  E:\McNair\Projects\MatchingEntrepsToVC\OriginalCode\FVEIC4 data&lt;br /&gt;
and&lt;br /&gt;
  E:\McNair\Projects\MatchingEntrepsToVC\OriginalCode\FVEIC5 data&lt;br /&gt;
&lt;br /&gt;
The one wanted should be copied into the code directory: &lt;br /&gt;
  E:\McNair\Projects\MatchingEntrepsToVC\AdjustedCode&lt;br /&gt;
&lt;br /&gt;
'''psdata.mat''' contains&lt;br /&gt;
*vc: the number of VC's in each market, in the form of (10, 12, 13, ...): the first market has 10 VC's, the second market has 12 VC's....&lt;br /&gt;
*firm: the number of firms in each market, (13, 14, ...): the first market has 13 downstream, the second 14 downstream... this is a one (VC) to many (firms) market, and the number of firms in each market is at least as many as the number of firms&lt;br /&gt;
*m_id: unused, I'm guessing the market id&lt;br /&gt;
&lt;br /&gt;
'''dyad_tech_mkt_data.mat''' variables used include:&lt;br /&gt;
*pvc_exp_n, mean_pvc_exp_n, std_pvc_exp_n&lt;br /&gt;
*lnfpat, mean_lnfpat:&lt;br /&gt;
*mean_m_dist_1000, std_m_dist_1000:&lt;br /&gt;
*mean_exp_sector, std_exp_sector:&lt;br /&gt;
*m_match: contains the matching outcome: for each dyad (firm VC pair), 0 means not matched and 1 means matched. The variable asg in the code contains the matching outcomes of all markets. The matching outcomes are delineated by firms using the position data N1 (vc' from psdata)and N2 (firm' from psdata).&lt;br /&gt;
&lt;br /&gt;
==Location/Structure of Output==&lt;br /&gt;
&lt;br /&gt;
'''empirics_match_specific_1st_stage_ga''':&lt;br /&gt;
&lt;br /&gt;
'''empirics_match_specific_2nd_stage_ga''':&lt;br /&gt;
&lt;br /&gt;
'''empirics_match_specific_with_se''':&lt;br /&gt;
&lt;br /&gt;
'''type_(error_type)_monte_mktsize_(mktsize)_K_(K)_S_(S)_rep_(montenn)''':&lt;br /&gt;
&lt;br /&gt;
==Bugs==&lt;br /&gt;
&lt;br /&gt;
Simulated moments matrix dimension mismatch. This bug (also in the adjusted code) does not allow the &amp;quot;optimal stage&amp;quot; to complete. &lt;br /&gt;
&lt;br /&gt;
  Assignment has more non-singleton rhs dimensions than non-singleton subscripts&lt;br /&gt;
  Error in gmm_2stage_estimation (line 65)&lt;br /&gt;
        EV(:, :, m) = EV(:, :, m) + temp2;&lt;br /&gt;
  Error in master (line 513)&lt;br /&gt;
            gmm_2stage_estimation;&lt;br /&gt;
&lt;br /&gt;
This is caused because temp2 is 166x166 in monte_data, but nm = M = 1, so EV is 1x1. nm is set to size(M0, 1), but M0 is sometimes a scalar?&lt;br /&gt;
&lt;br /&gt;
This is solved by commenting out mkt_resample.m line 107:&lt;br /&gt;
  % M0 = moments(M, 1, S, K, pv', asg, H, HK, G, FF, Hu, Hd, z1, z2, psa, ps1, ps2, N1, N2) &lt;br /&gt;
&lt;br /&gt;
because it returns a scalar, but should return a 166x1 vector.&lt;br /&gt;
&lt;br /&gt;
Better fix notes:&lt;br /&gt;
The problem is narrowed down to the section of mkt_resample.m before the call to moments. Somehow the parameters to moments are changed such that it returns a scalar.&lt;br /&gt;
&lt;br /&gt;
Solution found (I think):&lt;br /&gt;
monte_M cannot be set to 1. For values greater than 1, the program seems to work. It doesn't crash, anyway.&lt;br /&gt;
&lt;br /&gt;
==Profiling==&lt;br /&gt;
&lt;br /&gt;
Ran first iteration with task='monte', use_solver='ga', estimator='MSM', gurobi output disabled (took 42 sec to finish 1st iteration)&lt;br /&gt;
&lt;br /&gt;
[[File:Unobserved comp profile monte.png]]&lt;br /&gt;
&lt;br /&gt;
Monte_data and monte run much faster than data, because data is so large.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
There is a lot of unused code. For example, monte_std and monte_x seem to only be assigned, not used.&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=James_Chen_(Work_Log)&amp;diff=22815</id>
		<title>James Chen (Work Log)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=James_Chen_(Work_Log)&amp;diff=22815"/>
		<updated>2018-06-11T18:32:27Z</updated>

		<summary type="html">&lt;p&gt;JChen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Summer 2018==&lt;br /&gt;
&lt;br /&gt;
06/11/2018 - Worked with Wei to get him set up with system&lt;br /&gt;
&lt;br /&gt;
===Fall 2017===&lt;br /&gt;
&amp;lt;onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[James Chen]] [[Work Logs]] [[James Chen (Work Log)|(log page)]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/onlyinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Spring 2017===&lt;br /&gt;
&lt;br /&gt;
02/02/2017 - Planned immediate next steps for LBO project; fixed bug in matching code (matchpair indices not being stored correctly)&lt;br /&gt;
&lt;br /&gt;
===Fall 2016===&lt;br /&gt;
&lt;br /&gt;
09/06/2016 - Discussed workload for the week, plan for project going forward with Ed and Jake.&lt;br /&gt;
&lt;br /&gt;
09/08/2016 - Reread Lerner article, compiled notes on article and state of the project&lt;br /&gt;
&lt;br /&gt;
09/09/2016 - Completed some ad hoc analyses of STATA dataset to diagnose problems with propensity score matching.&lt;br /&gt;
&lt;br /&gt;
10/13/2016 - Met with Ed and Brian to discuss results and future work for LBO Innovation project. Began rebuild/redocumentation of dataset.&lt;br /&gt;
&lt;br /&gt;
10/14/2016 - Continuing rebuild, documentation at [[Leveraged_Buyout_Innovation_(Academic_Paper)#New_Version]]. COMPUSTAT data is now standardized for linking.&lt;br /&gt;
&lt;br /&gt;
10/18/2016 - Began importing Brian's SDC data into SQL database&lt;br /&gt;
&lt;br /&gt;
10/20/2016 - Completed importing SDC data&lt;br /&gt;
&lt;br /&gt;
10/21/2016 - Matched SDC data to COMPUSTAT data for LBO entry flags.&lt;br /&gt;
&lt;br /&gt;
10/27/2016 - Reorganized SQL script for better readability. Tried to bugfix SDC join (still WIP)&lt;br /&gt;
&lt;br /&gt;
10/28/2016 - Completed initial SDC join. Adding additional matches using name-based matching.&lt;br /&gt;
&lt;br /&gt;
11/03/2016 - Continued working on name-based matching.&lt;br /&gt;
&lt;br /&gt;
11/04/2016 - Completed name-based matching for SDC data/LBOs.&lt;br /&gt;
&lt;br /&gt;
11/10/2016 - Finalized documentation for LBO side of project. Minor bugfixes for name-based matching from last week.&lt;br /&gt;
&lt;br /&gt;
11/11/2016 - Worked on matching in patent flows and stocks, basically finished up to name-based matching&lt;br /&gt;
&lt;br /&gt;
11/17/2016 - Finished matching in patent flows and stocks, contingent on having a completed active patent start/end table from Napas&lt;br /&gt;
&lt;br /&gt;
11/18/2016 - Minor bugfixes for STATA code (got winsorized variables working consistently); began working on patent start/end table&lt;br /&gt;
&lt;br /&gt;
===Summer 2016===&lt;br /&gt;
&lt;br /&gt;
07/15/2016 - Refining hazard model: revising variables used, comparing Cox Proportional Hazard and Lognormal Accelerated Failure Time models&lt;br /&gt;
&lt;br /&gt;
07/18/2016 - Cataloged SQL tables, revised STATA script (STATAdatasetup2.do) to include ratios, replace cashflow with ebitda, and filter out firms smaller than $50 million&lt;br /&gt;
&lt;br /&gt;
07/19/2016 - Investigated baseline hazard of Cox Proportional Hazard model. Compared to Lognormal and Loglogistic Accelerated Failure Time models to try to predict hazard rate (not just hazard ratio)&lt;br /&gt;
&lt;br /&gt;
07/20/2016 - Adjusted dataset to filter out firms that are small (&amp;lt;$40m) or not listed in major exchanges (AMEX, NYSE, NASDAQ). Consulted Brian on descriptive statistics of dataset.&lt;br /&gt;
&lt;br /&gt;
07/21/2016 - Investigated negative ebitda ratios.&lt;br /&gt;
&lt;br /&gt;
07/22/2016 - Performed further testing of hazard model. Ran preliminary matching analysis using patent flow data.&lt;br /&gt;
&lt;br /&gt;
07/25/2016 - Cleaned data setup do file. Organized list of data problems to consult with Ed.&lt;br /&gt;
&lt;br /&gt;
[[Category:Work Log]]&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19084</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19084"/>
		<updated>2017-06-30T16:33:38Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Specify which observations are valid for matching */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inputs and Outputs==&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
==Running Code==&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
 cd(&amp;quot;E:/McNair/Projects/LBO/New\ matching&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl &lt;br /&gt;
 include(&amp;quot;LBOmatchscript.jl&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Specify input file (if using different file than default)===&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
===Specify which observations are valid for matching===&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
 #Splitting dataset into LBO and non-LBO firms&lt;br /&gt;
 #Note that we also filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
 LBOs =  @from i in df begin&lt;br /&gt;
         @where i.everlbo == 1 &amp;amp;&amp;amp; (i.matchfilter4 == 1 ||i.matchfilter2b == 1) &amp;amp;&amp;amp; i.lboentry == 1&lt;br /&gt;
         @select i&lt;br /&gt;
         @collect DataFrame&lt;br /&gt;
         end&lt;br /&gt;
 nonLBOs = @from i in df begin&lt;br /&gt;
           @where i.everlbo == 0 &amp;amp;&amp;amp; (i.matchfilter4 == 1 ||i.matchfilter2b == 1)&lt;br /&gt;
           @select i&lt;br /&gt;
           @collect DataFrame&lt;br /&gt;
           end&lt;br /&gt;
&lt;br /&gt;
===Specify propensity score type to use for matching===&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above options, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
===Specify whether matching priority should be deterministic or random===&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
===Specify additional constraints on valid matches (modify code within function mcexpr as desired)===&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19079</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19079"/>
		<updated>2017-06-30T09:11:00Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inputs and Outputs==&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
==Running Code==&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
 cd(&amp;quot;E:/McNair/Projects/LBO/New\ matching&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl &lt;br /&gt;
 include(&amp;quot;LBOmatchscript.jl&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Specify input file (if using different file than default)===&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
===Specify which observations are valid for matching===&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
===Specify propensity score type to use for matching===&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above options, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
===Specify whether matching priority should be deterministic or random===&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
===Specify additional constraints on valid matches (modify code within function mcexpr as desired)===&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19078</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19078"/>
		<updated>2017-06-30T09:10:15Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Specify propensity score type to use for matching */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inputs and Outputs==&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
==Running Code==&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
 cd(&amp;quot;E:/McNair/Projects/LBO/New\ matching&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl &lt;br /&gt;
 include(&amp;quot;LBOmatchscript.jl&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
&lt;br /&gt;
There are a few options that can be customized in the script before running. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Specify input file (if using different file than default)===&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
===Specify which observations are valid for matching===&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
===Specify propensity score type to use for matching===&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above options, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
===Specify whether matching priority should be deterministic or random===&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
===Specify additional constraints on valid matches (modify code within function mcexpr as desired)===&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19077</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19077"/>
		<updated>2017-06-30T09:09:40Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inputs and Outputs==&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
==Running Code==&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
 cd(&amp;quot;E:/McNair/Projects/LBO/New\ matching&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl &lt;br /&gt;
 include(&amp;quot;LBOmatchscript.jl&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
&lt;br /&gt;
There are a few options that can be customized in the script before running. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Specify input file (if using different file than default)===&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
===Specify which observations are valid for matching===&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
===Specify propensity score type to use for matching===&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
===Specify whether matching priority should be deterministic or random===&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
===Specify additional constraints on valid matches (modify code within function mcexpr as desired)===&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19076</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19076"/>
		<updated>2017-06-30T09:09:19Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Specify which observations are valid for matching. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inputs and Outputs==&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
==Running Code==&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
 cd(&amp;quot;E:/McNair/Projects/LBO/New\ matching&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl &lt;br /&gt;
 include(&amp;quot;LBOmatchscript.jl&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
&lt;br /&gt;
There are a few options that can be customized in the script before running. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Specify input file (if using different file than default)===&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
===Specify which observations are valid for matching===&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
===Specify propensity score type to use for matching===&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
===Specify whether matching priority should be deterministic or random.===&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
===Specify additional constraints on valid matches (modify code within function mcexpr as desired)===&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19075</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19075"/>
		<updated>2017-06-30T09:08:17Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Running Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inputs and Outputs==&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
==Running Code==&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
 cd(&amp;quot;E:/McNair/Projects/LBO/New\ matching&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl &lt;br /&gt;
 include(&amp;quot;LBOmatchscript.jl&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
&lt;br /&gt;
There are a few options that can be customized in the script before running. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Specify input file (if using different file than default)===&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
===Specify which observations are valid for matching.===&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
===Specify propensity score type to use for matching===&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
===Specify whether matching priority should be deterministic or random.===&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
===Specify additional constraints on valid matches (modify code within function mcexpr as desired)===&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19074</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19074"/>
		<updated>2017-06-30T09:07:49Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Running Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inputs and Outputs==&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
==Running Code==&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
 cd(&amp;quot;E:\McNair\Projects\LBO\New matching\&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl &lt;br /&gt;
 include(&amp;quot;LBOmatchscript.jl&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
&lt;br /&gt;
There are a few options that can be customized in the script before running. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Specify input file (if using different file than default)===&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
===Specify which observations are valid for matching.===&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
===Specify propensity score type to use for matching===&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
===Specify whether matching priority should be deterministic or random.===&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
===Specify additional constraints on valid matches (modify code within function mcexpr as desired)===&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19073</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19073"/>
		<updated>2017-06-30T09:07:19Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Running Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inputs and Outputs==&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
==Running Code==&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl &lt;br /&gt;
 include(&amp;quot;LBOmatchscript.jl&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
&lt;br /&gt;
There are a few options that can be customized in the script before running. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Specify input file (if using different file than default)===&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
===Specify which observations are valid for matching.===&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
===Specify propensity score type to use for matching===&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
===Specify whether matching priority should be deterministic or random.===&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
===Specify additional constraints on valid matches (modify code within function mcexpr as desired)===&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19072</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19072"/>
		<updated>2017-06-30T09:05:59Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Instructions for running matching code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Inputs and Outputs==&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
==Running Code==&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
==Options==&lt;br /&gt;
&lt;br /&gt;
There are a few options that can be customized in the script before running. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Specify input file (if using different file than default)===&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
===Specify which observations are valid for matching.===&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
===Specify propensity score type to use for matching===&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
===Specify whether matching priority should be deterministic or random.===&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
===Specify additional constraints on valid matches (modify code within function mcexpr as desired)===&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19071</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19071"/>
		<updated>2017-06-30T09:04:58Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few options that can be customized in the script before running. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Specify input file (if using different file than default)====&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
====Specify which observations are valid for matching.====&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
====Specify propensity score type to use for matching====&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
====Specify whether matching priority should be deterministic or random.====&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
====Specify additional constraints on valid matches (modify code within function mcexpr as desired)====&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19070</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19070"/>
		<updated>2017-06-30T09:04:18Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
====Specify input file (if using different file than default)====&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
====Specify which observations are valid for matching.====&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
====Specify propensity score type to use for matching====&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
====Specify whether matching priority should be deterministic or random.====&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
====Specify additional constraints on valid matches (modify code within function mcexpr as desired)====&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19069</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19069"/>
		<updated>2017-06-30T09:03:52Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Specify input file (if using different file than default)====&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Specify which observations are valid for matching.====&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
====Specify propensity score type to use for matching====&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
====Specify whether matching priority should be deterministic or random.====&lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Specify additional constraints on valid matches (modify code within function mcexpr as desired)====&lt;br /&gt;
*For 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.&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19068</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19068"/>
		<updated>2017-06-30T09:02:50Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Specify input file (if using different file than default)====&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Specify which observations are valid for matching.====&lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
'''Specify propensity score type to use for matching'''&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
Specify whether matching priority should be deterministic or random. &lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
**For 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.&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19067</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19067"/>
		<updated>2017-06-30T09:02:04Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Specify input file (if using different file than default)'''&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Specify which observations are valid for matching.''' &lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
'''Specify propensity score type to use for matching'''&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
Specify whether matching priority should be deterministic or random. &lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
**For 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.&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19066</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19066"/>
		<updated>2017-06-30T09:01:44Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specify input file (if using different file than default)&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specify which observations are valid for matching. &lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
Specify propensity score type to use for matching&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
Specify whether matching priority should be deterministic or random. &lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
**For 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.&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19065</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19065"/>
		<updated>2017-06-30T09:01:04Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If matching using different file than default&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Specify which observations are valid for matching. &lt;br /&gt;
*For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
Specify propensity score type to use for matching&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
Specify whether matching priority should be deterministic or random. &lt;br /&gt;
*If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
**For 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.&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19064</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19064"/>
		<updated>2017-06-30T09:00:21Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If matching using different file than default&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 df = readtable(&amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;, separator = '\t');&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(Not implemented yet: More user-friendly way to input restrictions)&lt;br /&gt;
Specify which observations are valid for matching. For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
Specify propensity score type to use for matching&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
*Specify whether matching priority should be deterministic or random. If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
**For 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.&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19063</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19063"/>
		<updated>2017-06-30T08:59:28Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify if matching using different file&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 readtable(&amp;quot;Filepath&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(Not implemented yet: More user-friendly way to input restrictions)&lt;br /&gt;
Specify which observations are valid for matching. For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
*For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
*See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
Specify propensity score type to use for matching&lt;br /&gt;
*Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
*Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
*Specify whether matching priority should be deterministic or random. If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
**For 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.&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19062</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19062"/>
		<updated>2017-06-30T08:57:52Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
Line 12: &lt;br /&gt;
 readtable(&amp;quot;Filepath&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*Modify if matching using different file&lt;br /&gt;
&lt;br /&gt;
Lines 38-48:&lt;br /&gt;
&lt;br /&gt;
(Not implemented yet: More user-friendly way to input restrictions)&lt;br /&gt;
*Specify which observations are valid for matching. For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
**For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
**See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
*Specify propensity score type to use for matching&lt;br /&gt;
**Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
**Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
*Specify whether matching priority should be deterministic or random. If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
Lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
**For 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.&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19061</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19061"/>
		<updated>2017-06-30T08:57:15Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
line 12: &lt;br /&gt;
	readtable(&amp;quot;Filepath&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
*Modify if matching using different file&lt;br /&gt;
&lt;br /&gt;
Lines 38-48:&lt;br /&gt;
&lt;br /&gt;
(Not implemented yet: More user-friendly way to input restrictions)&lt;br /&gt;
*Specify which observations are valid for matching. For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
**For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
**See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
*Specify propensity score type to use for matching&lt;br /&gt;
**Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
**Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
*Specify whether matching priority should be deterministic or random. If deterministic, priority goes to lower GVKEY&lt;br /&gt;
&lt;br /&gt;
lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
**For 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.&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19060</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19060"/>
		<updated>2017-06-30T08:56:01Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
*If matching using different file, modify&lt;br /&gt;
line 12: &lt;br /&gt;
	readtable(&amp;quot;Filepath&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
(Not implemented yet: More user-friendly way to input restrictions)&lt;br /&gt;
*Specify which observations are valid for matching. For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
**For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
**See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
*Specify propensity score type to use for matching&lt;br /&gt;
**Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
**Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles): logitpw, probitpw, hrw&lt;br /&gt;
line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
*Specify whether matching priority should be deterministic or random. If deterministic, priority goes to lower GVKEY&lt;br /&gt;
line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
**For 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.&lt;br /&gt;
&lt;br /&gt;
lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19059</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19059"/>
		<updated>2017-06-30T08:54:55Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
*If matching using different file, modify&lt;br /&gt;
line 12: &lt;br /&gt;
	readtable(&amp;quot;Filepath&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
(Not implemented yet: More user-friendly way to input restrictions)&lt;br /&gt;
*Specify which observations are valid for matching. For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
*Specify propensity score type to use for matching&lt;br /&gt;
&lt;br /&gt;
Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles):&lt;br /&gt;
logitpw, probitpw, hrw&lt;br /&gt;
line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
*Specify whether matching priority should be deterministic or random. If deterministic, priority goes to lower GVKEY&lt;br /&gt;
line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
For 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.&lt;br /&gt;
&lt;br /&gt;
lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19058</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19058"/>
		<updated>2017-06-30T08:54:22Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Instructions for running matching code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
*If matching using different file, modify&lt;br /&gt;
line 12: &lt;br /&gt;
	readtable(&amp;quot;Filepath&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
(Not implemented yet: More user-friendly way to input restrictions)&lt;br /&gt;
*Specify which observations are valid for matching. For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
*Specify propensity score type to use for matching&lt;br /&gt;
&lt;br /&gt;
Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles):&lt;br /&gt;
logitpw, probitpw, hrw&lt;br /&gt;
line 58: &lt;br /&gt;
 mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
*Specify whether matching priority should be deterministic or random. If deterministic, priority goes to lower GVKEY&lt;br /&gt;
line 61:&lt;br /&gt;
 randoption = 0;&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
For 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.&lt;br /&gt;
&lt;br /&gt;
lines 69-81:&lt;br /&gt;
 function mcexpr(i)&lt;br /&gt;
&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
 end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19057</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19057"/>
		<updated>2017-06-30T08:52:32Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
Before running, modify the following options if necessary:&lt;br /&gt;
&lt;br /&gt;
*If matching using different file, modify&lt;br /&gt;
line 12: &lt;br /&gt;
	readtable(&amp;quot;Filepath&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
(Not implemented yet: More user-friendly way to input restrictions)&lt;br /&gt;
*Specify which observations are valid for matching. For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
*Specify propensity score type to use for matching&lt;br /&gt;
&lt;br /&gt;
Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles):&lt;br /&gt;
logitpw, probitpw, hrw&lt;br /&gt;
line 58: &lt;br /&gt;
	mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
*Specify whether matching priority should be deterministic or random. If deterministic, priority goes to lower GVKEY&lt;br /&gt;
line 61:&lt;br /&gt;
	randoption = 0;&lt;br /&gt;
&lt;br /&gt;
*Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
For 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.&lt;br /&gt;
&lt;br /&gt;
lines 69-81:&lt;br /&gt;
&lt;br /&gt;
	function mcexpr(i)&lt;br /&gt;
&lt;br /&gt;
	  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
	  #(i.e., appending additional characters per line)&lt;br /&gt;
	  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
&lt;br /&gt;
	  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
	  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
	  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
	  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
	  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
	  return eval(parse(mcriteria))&lt;br /&gt;
	end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19056</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19056"/>
		<updated>2017-06-30T08:50:56Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
&lt;br /&gt;
There are a few things that can be customized in the script. Getting this 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.&lt;br /&gt;
&lt;br /&gt;
If matching using different file, modify&lt;br /&gt;
line 12: &lt;br /&gt;
readtable(&amp;quot;Filepath&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
(Not implemented yet: More user-friendly way to input restrictions)&lt;br /&gt;
Specify which observations are valid for matching. For now, we filter out all firms that were never granted a single patent in the period 1970-2015&lt;br /&gt;
For firms that LBO, we also drop their observations in all other years from the list of candidates to match to other LBOs&lt;br /&gt;
See inline comments in code for detailed description of what matchfilter2, matchfilter4, etc. represent&lt;br /&gt;
&lt;br /&gt;
Lines 38-48&lt;br /&gt;
&lt;br /&gt;
Specify propensity score type to use for matching&lt;br /&gt;
&lt;br /&gt;
Options are: logitp (panel logit), probitp (panel probit), or Cox proportional hazard (hr)&lt;br /&gt;
Alternatively, can use the above, with regressions performed using winsorized values of regressors (trimmed at 1st and 99th percentiles):&lt;br /&gt;
logitpw, probitpw, hrw&lt;br /&gt;
line 58: &lt;br /&gt;
mscore = :logitpw;&lt;br /&gt;
&lt;br /&gt;
Specify whether matching priority should be deterministic or random. If deterministic, priority goes to lower GVKEY&lt;br /&gt;
line 61:&lt;br /&gt;
randoption = 0;&lt;br /&gt;
&lt;br /&gt;
Specify additional constraints on valid matches (modify code within function mcexpr as desired)&lt;br /&gt;
For 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.&lt;br /&gt;
&lt;br /&gt;
lines 69-81:&lt;br /&gt;
&lt;br /&gt;
function mcexpr(i)&lt;br /&gt;
&lt;br /&gt;
  #note that the below syntax is the simplest way to store a long string over multiple lines&lt;br /&gt;
  #(i.e., appending additional characters per line)&lt;br /&gt;
  #Also, note that order of operations forces us to put each condition in parentheses&lt;br /&gt;
&lt;br /&gt;
  mcriteria = &amp;quot;nonLBOs[:matchsubset] = (nonLBOs[:industrygroup3].== LBOs[$i,:industrygroup3])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:decade].==LBOs[$i,:decade])&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;gt;= (LBOs[$i,:patentstock]*.8))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:patentstock] .&amp;lt;= (LBOs[$i,:patentstock]*1.2))&amp;quot;&lt;br /&gt;
  mcriteria = mcriteria * &amp;quot; .* (nonLBOs[:matchpair] .== 0 )&amp;quot;&lt;br /&gt;
  return eval(parse(mcriteria))&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19055</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19055"/>
		<updated>2017-06-30T08:47:47Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Inputs and Outputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19054</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19054"/>
		<updated>2017-06-30T08:47:28Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Inputs and Outputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 under constraints provided&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19053</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19053"/>
		<updated>2017-06-30T08:46:59Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Inputs and Outputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
**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 under given constraints&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19052</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19052"/>
		<updated>2017-06-30T08:46:18Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Inputs and Outputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
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 under given constraints&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19051</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19051"/>
		<updated>2017-06-30T08:45:59Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Inputs and Outputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
**This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
**This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
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 under given constraints&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19050</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19050"/>
		<updated>2017-06-30T08:45:24Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Instructions for running matching code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
*Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
*Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
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 under given constraints&lt;br /&gt;
&lt;br /&gt;
===Running Code===&lt;br /&gt;
&lt;br /&gt;
*Open Julia command line in administrator mode&lt;br /&gt;
&lt;br /&gt;
*Change directory to E:\McNair\Projects\LBO\New matching\&lt;br /&gt;
&lt;br /&gt;
*Run script LBOmatchscript.jl&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19049</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19049"/>
		<updated>2017-06-30T08:41:01Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Inputs and Outputs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
&lt;br /&gt;
Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
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 under given constraints&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19048</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19048"/>
		<updated>2017-06-30T08:40:41Z</updated>

		<summary type="html">&lt;p&gt;JChen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;br /&gt;
&lt;br /&gt;
==Instructions for running matching code==&lt;br /&gt;
&lt;br /&gt;
===Inputs and Outputs===&lt;br /&gt;
Input: tab delimited file &amp;quot;E:/McNair/Projects/LBO/Clean/STATApredictLBOclean.txt&amp;quot;&lt;br /&gt;
This contains list of LBO and nonLBO firms from compustat 1970-2015, propensity scores, patent data, and other variables generated from stata code &amp;quot;statadatasetup4.do&amp;quot; and &amp;quot;statapredictLBOclean.do&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Output: tab delimited file &amp;quot;E:/McNair/Projects/LBO/New matching/matchresults.txt&amp;quot;&lt;br /&gt;
This is the input file, except with an additional column &amp;quot;matchpair&amp;quot; indicating matched pairs:&lt;br /&gt;
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 under given constraints&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19044</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19044"/>
		<updated>2017-06-29T23:01:20Z</updated>

		<summary type="html">&lt;p&gt;JChen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Leveraged Buyout Innovation (Academic Paper)]]&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19042</id>
		<title>Matching LBOs (Julia)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Matching_LBOs_(Julia)&amp;diff=19042"/>
		<updated>2017-06-29T22:59:57Z</updated>

		<summary type="html">&lt;p&gt;JChen: Created page with &amp;quot;{{McNair Projects |Has title=Matching LBOs (Julia) |Has owner=James Chen, |Has keywords=Tool |Has project status=Active }}&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{McNair Projects&lt;br /&gt;
|Has title=Matching LBOs (Julia)&lt;br /&gt;
|Has owner=James Chen,&lt;br /&gt;
|Has keywords=Tool&lt;br /&gt;
|Has project status=Active&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Sequential_Matching_of_Entrepreneurs_to_Accelerators_and_Venture_Capitalists&amp;diff=18434</id>
		<title>Sequential Matching of Entrepreneurs to Accelerators and Venture Capitalists</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Sequential_Matching_of_Entrepreneurs_to_Accelerators_and_Venture_Capitalists&amp;diff=18434"/>
		<updated>2017-06-05T17:11:34Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Simple Outline of Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{AcademicPaper&lt;br /&gt;
|Has title=Matching Entrepreneurs to Accelerators and VCs (Academic Paper)&lt;br /&gt;
|Has author=Ed Egan, Jeremy Fox,&lt;br /&gt;
|Has RAs=Amir Kazempour,&lt;br /&gt;
|Has paper status=In development&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This paper describes a two-stage matching model and estimates this model using data on entrepreneurs that match to accelerators and (lead) venture capitalists. Once the model is estimated, we can enact various policy-relevant changes and estimate their effects. For example, we could eliminate non-profit accelerators, government-sponsored venture capitalists, or other participants.&lt;br /&gt;
&lt;br /&gt;
See [[Fox (2008) - An Empirical Repeated Matching Game Applied to Market]] for a brief write up on Jeremy's theory paper&lt;br /&gt;
&lt;br /&gt;
==Simple Outline of Model==&lt;br /&gt;
&lt;br /&gt;
As of now, the goal is to simulate a repeated matching model with dynamically optimizing agents. More specifically, there are two sides for a matching market with transferable utility (generically, call these men and women for now) with a continuum of agents, but a finite number of types. They participate in matches for T periods and receive utility that is a sum of a structural component (determined solely by their type and the type they are matched with) and a individual taste component (with some known distribution).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What distinguishes this model from a static matching model is that the agents have some probability of transitioning between types that is conditional on the match they make in the previous period (e.g., a man of low type might be more likely to change into a man of high type after being matched to a woman of high type). When making these matches, the agents take these transition probabilities into account when evaluating expected future utility. This adds a dynamic element to the model.&lt;br /&gt;
&lt;br /&gt;
==Work to do==&lt;br /&gt;
&lt;br /&gt;
*Code up three algorithms to simulate match(primal,IPFP,dual)&lt;br /&gt;
*Compare with R code from NYU&lt;br /&gt;
&lt;br /&gt;
===Work done so far===&lt;br /&gt;
&lt;br /&gt;
*Coded up primal and IPFP (may have errors)&lt;br /&gt;
&lt;br /&gt;
===Work to do in near term===&lt;br /&gt;
&lt;br /&gt;
*Compare with R code from NYU (using current solvers/optimizers, and with Gurobi)&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Sequential_Matching_of_Entrepreneurs_to_Accelerators_and_Venture_Capitalists&amp;diff=18433</id>
		<title>Sequential Matching of Entrepreneurs to Accelerators and Venture Capitalists</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Sequential_Matching_of_Entrepreneurs_to_Accelerators_and_Venture_Capitalists&amp;diff=18433"/>
		<updated>2017-06-05T17:11:17Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Simple Outline of Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{AcademicPaper&lt;br /&gt;
|Has title=Matching Entrepreneurs to Accelerators and VCs (Academic Paper)&lt;br /&gt;
|Has author=Ed Egan, Jeremy Fox,&lt;br /&gt;
|Has RAs=Amir Kazempour,&lt;br /&gt;
|Has paper status=In development&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This paper describes a two-stage matching model and estimates this model using data on entrepreneurs that match to accelerators and (lead) venture capitalists. Once the model is estimated, we can enact various policy-relevant changes and estimate their effects. For example, we could eliminate non-profit accelerators, government-sponsored venture capitalists, or other participants.&lt;br /&gt;
&lt;br /&gt;
See [[Fox (2008) - An Empirical Repeated Matching Game Applied to Market]] for a brief write up on Jeremy's theory paper&lt;br /&gt;
&lt;br /&gt;
==Simple Outline of Model==&lt;br /&gt;
&lt;br /&gt;
As of now, the goal is to simulate a repeated matching model with dynamically optimizing agents. More specifically, there are two sides for a matching market with transferable utility (generically call these men and women) with a continuum of agents, but a finite number of types. They participate in matches for T periods and receive utility that is a sum of a structural component (determined solely by their type and the type they are matched with) and a individual taste component (with some known distribution).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What distinguishes this model from a static matching model is that the agents have some probability of transitioning between types that is conditional on the match they make in the previous period (e.g., a man of low type might be more likely to change into a man of high type after being matched to a woman of high type). When making these matches, the agents take these transition probabilities into account when evaluating expected future utility. This adds a dynamic element to the model.&lt;br /&gt;
&lt;br /&gt;
==Work to do==&lt;br /&gt;
&lt;br /&gt;
*Code up three algorithms to simulate match(primal,IPFP,dual)&lt;br /&gt;
*Compare with R code from NYU&lt;br /&gt;
&lt;br /&gt;
===Work done so far===&lt;br /&gt;
&lt;br /&gt;
*Coded up primal and IPFP (may have errors)&lt;br /&gt;
&lt;br /&gt;
===Work to do in near term===&lt;br /&gt;
&lt;br /&gt;
*Compare with R code from NYU (using current solvers/optimizers, and with Gurobi)&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Sequential_Matching_of_Entrepreneurs_to_Accelerators_and_Venture_Capitalists&amp;diff=18432</id>
		<title>Sequential Matching of Entrepreneurs to Accelerators and Venture Capitalists</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Sequential_Matching_of_Entrepreneurs_to_Accelerators_and_Venture_Capitalists&amp;diff=18432"/>
		<updated>2017-06-05T17:10:25Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Work to do */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{AcademicPaper&lt;br /&gt;
|Has title=Matching Entrepreneurs to Accelerators and VCs (Academic Paper)&lt;br /&gt;
|Has author=Ed Egan, Jeremy Fox,&lt;br /&gt;
|Has RAs=Amir Kazempour,&lt;br /&gt;
|Has paper status=In development&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This paper describes a two-stage matching model and estimates this model using data on entrepreneurs that match to accelerators and (lead) venture capitalists. Once the model is estimated, we can enact various policy-relevant changes and estimate their effects. For example, we could eliminate non-profit accelerators, government-sponsored venture capitalists, or other participants.&lt;br /&gt;
&lt;br /&gt;
See [[Fox (2008) - An Empirical Repeated Matching Game Applied to Market]] for a brief write up on Jeremy's theory paper&lt;br /&gt;
&lt;br /&gt;
==Simple Outline of Model==&lt;br /&gt;
&lt;br /&gt;
As of now, the goal is to simulate a repeated matching model with dynamically optimizing agents. More specifically, there are two sides for a matching market with transferable utility (for now, call these men and women) with a continuum of agents, but a finite number of types. They participate in matches for T periods and receive utility that is a sum of a structural component (determined solely by their type and the type they are matched with) and a individual taste component (with some known distribution).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What distinguishes this model from a static matching model is that the agents have some probability of transitioning between types that is conditional on the match they make in the previous period (e.g., a man of low type might be more likely to change into a man of high type after being matched to a woman of high type). When making these matches, the agents take these transition probabilities into account when evaluating expected future utility. This adds a dynamic element to the model.&lt;br /&gt;
&lt;br /&gt;
==Work to do==&lt;br /&gt;
&lt;br /&gt;
*Code up three algorithms to simulate match(primal,IPFP,dual)&lt;br /&gt;
*Compare with R code from NYU&lt;br /&gt;
&lt;br /&gt;
===Work done so far===&lt;br /&gt;
&lt;br /&gt;
*Coded up primal and IPFP (may have errors)&lt;br /&gt;
&lt;br /&gt;
===Work to do in near term===&lt;br /&gt;
&lt;br /&gt;
*Compare with R code from NYU (using current solvers/optimizers, and with Gurobi)&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=Sequential_Matching_of_Entrepreneurs_to_Accelerators_and_Venture_Capitalists&amp;diff=18431</id>
		<title>Sequential Matching of Entrepreneurs to Accelerators and Venture Capitalists</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=Sequential_Matching_of_Entrepreneurs_to_Accelerators_and_Venture_Capitalists&amp;diff=18431"/>
		<updated>2017-06-05T17:09:02Z</updated>

		<summary type="html">&lt;p&gt;JChen: /* Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{AcademicPaper&lt;br /&gt;
|Has title=Matching Entrepreneurs to Accelerators and VCs (Academic Paper)&lt;br /&gt;
|Has author=Ed Egan, Jeremy Fox,&lt;br /&gt;
|Has RAs=Amir Kazempour,&lt;br /&gt;
|Has paper status=In development&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
&lt;br /&gt;
This paper describes a two-stage matching model and estimates this model using data on entrepreneurs that match to accelerators and (lead) venture capitalists. Once the model is estimated, we can enact various policy-relevant changes and estimate their effects. For example, we could eliminate non-profit accelerators, government-sponsored venture capitalists, or other participants.&lt;br /&gt;
&lt;br /&gt;
See [[Fox (2008) - An Empirical Repeated Matching Game Applied to Market]] for a brief write up on Jeremy's theory paper&lt;br /&gt;
&lt;br /&gt;
==Simple Outline of Model==&lt;br /&gt;
&lt;br /&gt;
As of now, the goal is to simulate a repeated matching model with dynamically optimizing agents. More specifically, there are two sides for a matching market with transferable utility (for now, call these men and women) with a continuum of agents, but a finite number of types. They participate in matches for T periods and receive utility that is a sum of a structural component (determined solely by their type and the type they are matched with) and a individual taste component (with some known distribution).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What distinguishes this model from a static matching model is that the agents have some probability of transitioning between types that is conditional on the match they make in the previous period (e.g., a man of low type might be more likely to change into a man of high type after being matched to a woman of high type). When making these matches, the agents take these transition probabilities into account when evaluating expected future utility. This adds a dynamic element to the model.&lt;br /&gt;
&lt;br /&gt;
==Work to do==&lt;br /&gt;
&lt;br /&gt;
*Code up three algorithms to simulate match(primal,IPFP,dual)&lt;br /&gt;
*Compare with R code from NYU&lt;br /&gt;
&lt;br /&gt;
===Work done so far===&lt;br /&gt;
&lt;br /&gt;
*Coded up primal and IPFP (may have errors)&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=James_Chen_(Work_Log)&amp;diff=13545</id>
		<title>James Chen (Work Log)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=James_Chen_(Work_Log)&amp;diff=13545"/>
		<updated>2017-02-02T22:59:07Z</updated>

		<summary type="html">&lt;p&gt;JChen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Category:Work Log]]&lt;br /&gt;
[[Category:Internal]]&lt;br /&gt;
&lt;br /&gt;
[[James Chen]] [[Work Logs]] [[James Chen (Work Log)|(log page)]]&lt;br /&gt;
&lt;br /&gt;
07/15/2016 - Refining hazard model: revising variables used, comparing Cox Proportional Hazard and Lognormal Accelerated Failure Time models&lt;br /&gt;
&lt;br /&gt;
07/18/2016 - Cataloged SQL tables, revised STATA script (STATAdatasetup2.do) to include ratios, replace cashflow with ebitda, and filter out firms smaller than $50 million&lt;br /&gt;
&lt;br /&gt;
07/19/2016 - Investigated baseline hazard of Cox Proportional Hazard model. Compared to Lognormal and Loglogistic Accelerated Failure Time models to try to predict hazard rate (not just hazard ratio)&lt;br /&gt;
&lt;br /&gt;
07/20/2016 - Adjusted dataset to filter out firms that are small (&amp;lt;$40m) or not listed in major exchanges (AMEX, NYSE, NASDAQ). Consulted Brian on descriptive statistics of dataset.&lt;br /&gt;
&lt;br /&gt;
07/21/2016 - Investigated negative ebitda ratios.&lt;br /&gt;
&lt;br /&gt;
07/22/2016 - Performed further testing of hazard model. Ran preliminary matching analysis using patent flow data.&lt;br /&gt;
&lt;br /&gt;
07/25/2016 - Cleaned data setup do file. Organized list of data problems to consult with Ed.&lt;br /&gt;
&lt;br /&gt;
09/06/2016 - Discussed workload for the week, plan for project going forward with Ed and Jake.&lt;br /&gt;
&lt;br /&gt;
09/08/2016 - Reread Lerner article, compiled notes on article and state of the project&lt;br /&gt;
&lt;br /&gt;
09/09/2016 - Completed some ad hoc analyses of STATA dataset to diagnose problems with propensity score matching.&lt;br /&gt;
&lt;br /&gt;
10/13/2016 - Met with Ed and Brian to discuss results and future work for LBO Innovation project. Began rebuild/redocumentation of dataset.&lt;br /&gt;
&lt;br /&gt;
10/14/2016 - Continuing rebuild, documentation at [[Leveraged_Buyout_Innovation_(Academic_Paper)#New_Version]]. COMPUSTAT data is now standardized for linking.&lt;br /&gt;
&lt;br /&gt;
10/18/2016 - Began importing Brian's SDC data into SQL database&lt;br /&gt;
&lt;br /&gt;
10/20/2016 - Completed importing SDC data&lt;br /&gt;
&lt;br /&gt;
10/21/2016 - Matched SDC data to COMPUSTAT data for LBO entry flags.&lt;br /&gt;
&lt;br /&gt;
10/27/2016 - Reorganized SQL script for better readability. Tried to bugfix SDC join (still WIP)&lt;br /&gt;
&lt;br /&gt;
10/28/2016 - Completed initial SDC join. Adding additional matches using name-based matching.&lt;br /&gt;
&lt;br /&gt;
11/03/2016 - Continued working on name-based matching.&lt;br /&gt;
&lt;br /&gt;
11/04/2016 - Completed name-based matching for SDC data/LBOs.&lt;br /&gt;
&lt;br /&gt;
11/10/2016 - Finalized documentation for LBO side of project. Minor bugfixes for name-based matching from last week.&lt;br /&gt;
&lt;br /&gt;
11/11/2016 - Worked on matching in patent flows and stocks, basically finished up to name-based matching&lt;br /&gt;
&lt;br /&gt;
11/17/2016 - Finished matching in patent flows and stocks, contingent on having a completed active patent start/end table from Napas&lt;br /&gt;
&lt;br /&gt;
11/18/2016 - Minor bugfixes for STATA code (got winsorized variables working consistently); began working on patent start/end table&lt;br /&gt;
&lt;br /&gt;
02/02/2017 - Planned immediate next steps for LBO project; fixed bug in matching code (matchpair indices not being stored correctly)&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
	<entry>
		<id>http://www.edegan.com/mediawiki/index.php?title=James_Chen_(Work_Log)&amp;diff=12774</id>
		<title>James Chen (Work Log)</title>
		<link rel="alternate" type="text/html" href="http://www.edegan.com/mediawiki/index.php?title=James_Chen_(Work_Log)&amp;diff=12774"/>
		<updated>2016-11-18T23:32:55Z</updated>

		<summary type="html">&lt;p&gt;JChen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Category:Work Log]]&lt;br /&gt;
[[Category:Internal]]&lt;br /&gt;
&lt;br /&gt;
[[James Chen]] [[Work Logs]] [[James Chen (Work Log)|(log page)]]&lt;br /&gt;
&lt;br /&gt;
07/15/2016 - Refining hazard model: revising variables used, comparing Cox Proportional Hazard and Lognormal Accelerated Failure Time models&lt;br /&gt;
&lt;br /&gt;
07/18/2016 - Cataloged SQL tables, revised STATA script (STATAdatasetup2.do) to include ratios, replace cashflow with ebitda, and filter out firms smaller than $50 million&lt;br /&gt;
&lt;br /&gt;
07/19/2016 - Investigated baseline hazard of Cox Proportional Hazard model. Compared to Lognormal and Loglogistic Accelerated Failure Time models to try to predict hazard rate (not just hazard ratio)&lt;br /&gt;
&lt;br /&gt;
07/20/2016 - Adjusted dataset to filter out firms that are small (&amp;lt;$40m) or not listed in major exchanges (AMEX, NYSE, NASDAQ). Consulted Brian on descriptive statistics of dataset.&lt;br /&gt;
&lt;br /&gt;
07/21/2016 - Investigated negative ebitda ratios.&lt;br /&gt;
&lt;br /&gt;
07/22/2016 - Performed further testing of hazard model. Ran preliminary matching analysis using patent flow data.&lt;br /&gt;
&lt;br /&gt;
07/25/2016 - Cleaned data setup do file. Organized list of data problems to consult with Ed.&lt;br /&gt;
&lt;br /&gt;
09/06/2016 - Discussed workload for the week, plan for project going forward with Ed and Jake.&lt;br /&gt;
&lt;br /&gt;
09/08/2016 - Reread Lerner article, compiled notes on article and state of the project&lt;br /&gt;
&lt;br /&gt;
09/09/2016 - Completed some ad hoc analyses of STATA dataset to diagnose problems with propensity score matching.&lt;br /&gt;
&lt;br /&gt;
10/13/2016 - Met with Ed and Brian to discuss results and future work for LBO Innovation project. Began rebuild/redocumentation of dataset.&lt;br /&gt;
&lt;br /&gt;
10/14/2016 - Continuing rebuild, documentation at [[Leveraged_Buyout_Innovation_(Academic_Paper)#New_Version]]. COMPUSTAT data is now standardized for linking.&lt;br /&gt;
&lt;br /&gt;
10/18/2016 - Began importing Brian's SDC data into SQL database&lt;br /&gt;
&lt;br /&gt;
10/20/2016 - Completed importing SDC data&lt;br /&gt;
&lt;br /&gt;
10/21/2016 - Matched SDC data to COMPUSTAT data for LBO entry flags.&lt;br /&gt;
&lt;br /&gt;
10/27/2016 - Reorganized SQL script for better readability. Tried to bugfix SDC join (still WIP)&lt;br /&gt;
&lt;br /&gt;
10/28/2016 - Completed initial SDC join. Adding additional matches using name-based matching.&lt;br /&gt;
&lt;br /&gt;
11/03/2016 - Continued working on name-based matching.&lt;br /&gt;
&lt;br /&gt;
11/04/2016 - Completed name-based matching for SDC data/LBOs.&lt;br /&gt;
&lt;br /&gt;
11/10/2016 - Finalized documentation for LBO side of project. Minor bugfixes for name-based matching from last week.&lt;br /&gt;
&lt;br /&gt;
11/11/2016 - Worked on matching in patent flows and stocks, basically finished up to name-based matching&lt;br /&gt;
&lt;br /&gt;
11/17/2016 - Finished matching in patent flows and stocks, contingent on having a completed active patent start/end table from Napas&lt;br /&gt;
&lt;br /&gt;
11/18/2016 - Minor bugfixes for STATA code (got winsorized variables working consistently); began working on patent start/end table&lt;/div&gt;</summary>
		<author><name>JChen</name></author>
		
	</entry>
</feed>