* USER NEEDS TO SPECIFY DROPRULE ON LINE 32 below * USER ALSO NEEDS TO CHANGE PATHNAMES TO DATASETS AND LOG FILES * SEARCHING ON "log using", "infile", "save", and "use" will give all lines that need changing. * This version: 12 May 2005 * Author: Robert V. Breunig (Robert.Breunig@anu.edu.au) * Please cite when using #delimit; version 8.2; clear; pause on; set more off; pause off; local regul_list accc vic nsw qld wa sa act; local indlist water electran elecdist gasdist gastran; *Need to specify droprule; * There are four data points based upon half-year observations; * (1) ElectraNet, 2002 (2) SPI Powernet, 2002 (3) Epic Moomba to Adelaide, 2000 (4) EAPL Moomba to Sydney, 2003; *Five decisions where we have information on multiple proposals; * (1) Gladstone Area Water Authority (QCA), (2) TXU (Esc-Victoria), (3) Australian Inland (IPART), (4) Energex (QCA), (5) Ergon (QCA); * 0 Drop nothing; * 1 Drop half-years; * 2 Drop 5 dropped decisions; * 3 Drop 5 dropped decisions plus half-years; ****************************************************************************************** SPECIFY DROPRULE HERE ******************************************************************************************; scalar droprule=0; ****************************************************************************************** SPECIFY LOG FILE FOR OUTPUT HERE ******************************************************************************************; log using c:\bob\research\toughreg\proj4.log, replace; ****************************************************************************************** SPECIFY LOCATION OF DATA INPUT FILE HERE ******************************************************************************************; infile projid omit_half omit_odd y electran elecdist gasdist gastran vic nsw qld wa sa act y1997 y1998 y1999 y2000 y2001 y2002 y2003 y2004 y2005 y2006 y2007 y2008 y2009 y2010 y2011 private using c:\bob\research\toughreg\proj4.txt; ****************************************************************************************** END OF THINGS TO CHANGE ******************************************************************************************; if droprule == 1 {; qui drop if omit_half==1; }; if droprule == 2 {; qui drop if omit_odd==1; }; if droprule==3 {; qui drop if omit_half==1; quietly drop if omit_odd==1; }; qui gen water=0; qui replace water=1 if (electran+elecdist+gasdist+gastran)== 0; qui gen accc=0; qui replace accc=1 if (vic+nsw+act+qld+sa+wa)== 0; qui gen regulator=1; qui replace regulator=2 if vic == 1; qui replace regulator=3 if nsw == 1; qui replace regulator=4 if qld == 1; qui replace regulator=5 if wa == 1; qui replace regulator=6 if sa == 1; qui replace regulator=7 if act == 1; qui label variable regulator "Regulator"; qui label define responselabel 1 "ACCC" 2 "Vic" 3 "NSW" 4 "QLD" 5 "WA" 6 "SA" 7 "ACT"; qui label values regulator responselabel; qui label variable private "Ownership"; qui label define privlabel 0 "Public" 1 "Private" 2 "Mixed"; qui label values private privlabel; qui gen industry=1; qui replace industry=2 if elecdist==1; qui replace industry=3 if gasdist==1; qui replace industry=4 if gastran==1; qui replace industry=5 if water==1; qui label variable industry "Industry"; qui label define indlabel 1 "ElecTran" 2 "ElecDist" 3 "GasDist" 4 "GasTran" 5 "Water"; qui label values industry indlabel; qui gen year=2012; qui replace year=1997 if y1997==1; qui replace year=1998 if y1998==1; qui replace year=1999 if y1999==1; qui replace year=2000 if y2000==1; qui replace year=2001 if y2001==1; qui replace year=2002 if y2002==1; qui replace year=2003 if y2003==1; qui replace year=2004 if y2004==1; qui replace year=2005 if y2005==1; qui replace year=2006 if y2006==1; qui replace year=2007 if y2007==1; qui replace year=2008 if y2008==1; qui replace year=2009 if y2009==1; qui replace year=2010 if y2010==1; qui replace year=2011 if y2011==1; display " Observation count for Table 1"; tab industry regulator; pause; display "Some other descriptitve statistics"; sum vic nsw qld wa sa act; tab year; pause; display " Mean outcomes for Table 2"; table industry regulator, contents(mean y) format(%6.3f); pause; format y %9.3f; sort industry; by industry: sum y, format; pause; sort regulator; by regulator: sum y, format; pause; regress y electran elecdist gasdist gastran vic nsw qld wa sa act y1997 y1998 y1999 y2000 y2001 y2002 y2003 y2004 y2005 y2006 y2007 y2008; estimates store OLS_1; pause; test vic=nsw; test vic=sa, accum; test vic=act, accum; test vic=sa; test vic=act; test vic=wa; test vic=qld; test nsw=act; test nsw=sa; test nsw=wa; test nsw=qld; test qld=wa; test qld=sa; test qld=act; test wa=sa; test wa=act; test sa=act; test gastran=electran; test elecdist=gasdist; pause; regress y electran elecdist gasdist gastran vic nsw qld wa sa act y1997 y1998 y1999 y2000 y2001 y2002 y2003 y2004 y2005 y2006 y2007 y2008, cluster(projid); estimates store Clust_1; pause; *begin p-values used in Table 4; test vic=nsw; test vic=sa, accum; test vic=act, accum; test vic=sa; test vic=act; test vic=wa; test vic=qld; test nsw=act; test nsw=sa; test nsw=wa; test nsw=qld; test qld=wa; test qld=sa; test qld=act; test wa=sa; test wa=act; test sa=act; test gastran=electran; test elecdist=gasdist; *end p-values used in Table 4; pause; display "HERE ARE THE RESULTS FOR TABLE 3"; estimates table OLS_1 Clust_1, keep(electran elecdist gasdist gastran vic nsw qld wa sa act) b(%8.3f) se(%8.3f); pause; display "THE DIFFERENCE IN GAS TRANSMISSION REGULATION BETWEEN ACCC AND WA IS THE SOURCE OF THAT COEFFICIENT"; sort accc; by accc: sum y if gastran==1; pause; save c:\bob\research\toughreg\proj0, replace; * Note that not much changes if one drops the ACCC/electran observations; drop if accc==1 & electran==1; tab industry regulator; pause; regress y electran elecdist gasdist gastran vic nsw qld wa sa act y1997 y1998 y1999 y2000 y2001 y2002 y2003 y2004 y2005 y2006 y2007 y2008, cluster(projid); estimates store clust_2; regress y electran elecdist gasdist gastran vic nsw qld wa sa act y1997 y1998 y1999 y2000 y2001 y2002 y2003 y2004 y2005 y2006 y2007 y2008; estimates store ols_2; estimates table OLS_1 ols_2 Clust_1 clust_2, keep(elecdist gasdist gastran vic nsw qld wa sa act) b(%8.3f) se(%8.3f); pause; use c:\bob\research\toughreg\proj0, replace; drop if accc==1; drop if gastran==1; *Here are the alternative regressions that produce the p-values in Table 5; regress y electran elecdist gasdist gastran vic nsw qld wa sa act y1997 y1998 y1999 y2000 y2001 y2002 y2003 y2004 y2005 y2006 y2007 y2008, cluster(projid); estimates store Clust_1; pause; *begin p-values for Table 5; test vic=nsw; test vic=sa, accum; test vic=act, accum; test vic=sa; test vic=act; test vic=wa; test vic=qld; test nsw=act; test nsw=sa; test nsw=wa; test nsw=qld; test qld=wa; test qld=sa; test qld=act; test wa=sa; test wa=act; test sa=act; test elecdist=gasdist; *end p-values for Table 5; pause; *This regression imposes the restrictions from above and gives the regresssion results for Table 6; use c:\bob\research\toughreg\proj0, replace; gen vna=vic+nsw+act; gen qw=qld+wa; reg y vna sa qld wa y1997 y1998 y1999 y2000 y2001 y2002 y2003 y2004 y2005 y2006 y2007 y2008, cluster(projid); pause; ****************************************************************************************** EXPLORATION OF THE PRIVATE VARIABLE ******************************************************************************************; *Note that we treat the 15 mixed observations as private in the paper; replace private=private~=0; save c:\bob\research\toughreg\proj0, replace; display " Observation count for Table 7"; tab private regulator; tab private industry; display " Observation count for Table 8"; table private regulator, contents(mean y) format(%6.3f); pause; *Note that private is not significant if we reproduce the regressions of Table 3; regress y electran elecdist gasdist gastran vic nsw qld wa sa act y1997 y1998 y1999 y2000 y2001 y2002 y2003 y2004 y2005 y2006 y2007 y2008 private, clust(projid); pause; *begin p-values used in Table 4; test vic=nsw; test vic=sa, accum; test vic=act, accum; test vic=sa; test vic=act; test vic=wa; test vic=qld; test nsw=act; test nsw=sa; test nsw=wa; test nsw=qld; test qld=wa; test qld=sa; test qld=act; test wa=sa; test wa=act; test sa=act; test gastran=electran; test elecdist=gasdist; *end p-values used in Table 4; pause; drop if accc==1; drop if gastran==1; *Here are the alternative regressions that produce the p-values in Table 5; regress y elecdist gasdist vic nsw qld wa sa act y1997 y1998 y1999 y2000 y2001 y2002 y2003 y2004 y2005 y2006 y2007 y2008 private, cluster(projid); pause; *begin p-values for Table 5; test vic=nsw; test vic=sa, accum; test vic=act, accum; test vic=sa; test vic=act; test vic=wa; test vic=qld; test nsw=act; test nsw=sa; test nsw=wa; test nsw=qld; test qld=wa; test qld=sa; test qld=act; test wa=sa; test wa=act; test sa=act; test elecdist=gasdist; *end p-values for Table 5; pause; *This regression imposes the restrictions from above and gives the regresssion results for Table 6; use c:\bob\research\toughreg\proj0, replace; reg y vna sa qld wa y1997 y1998 y1999 y2000 y2001 y2002 y2003 y2004 y2005 y2006 y2007 y2008 private, cluster(projid); pause; *An alternative to clustering is to treat each decision as an observation; *Time dummies are then replaced with dummies for the year in which the project started; *The following gives a flavor of what happens if one does this. *Results are quite similar; *This gives the regresssion results for Table 3; use c:\bob\research\toughreg\proj0, replace; collapse (mean) y electran elecdist gasdist gastran water accc vic nsw qld wa sa act private industry regulator (min) year, by(projid); tab year, gen(beg); desc; *Additional information for Table 7 on decisions by private/regulator; tab private regulator; *Additional information for Table 1 on decisions by industry/regulator; tab industry regulator; pause on; pause; pause off; save c:\bob\research\toughreg\proj0_grp, replace; regress y electran elecdist gasdist gastran vic nsw qld wa sa act beg*; pause; test vic=nsw; test vic=sa, accum; test vic=act, accum; test vic=sa; test vic=act; test vic=wa; test vic=qld; test nsw=act; test nsw=sa; test nsw=wa; test nsw=qld; test qld=wa; test qld=sa; test qld=act; test wa=sa; test wa=act; test sa=act; test gastran=electran; test elecdist=gasdist; pause; log close;