Tuesday, August 30, 2011

Professional Writing Sample

Abstract: the following writing sample is part of an assignment for an applied econometrics course. In this assignment I make use of advanced graphing techniques and pivot tables in Excel. I also use STATA statistical software to conduct a “synthetic control” graphical calculation. 



The objective of this assignment is to determine whether or not primary seat belt laws have an effect on the level of fatal car accidents in state TU (an imaginary state that is calculated by averaging out the values of Connecticut, Iowa, New Mexico and Texas). For additional clarification, primary seat belt laws stipulate that a law enforcement officer can ticket a driver for not wearing a seat belt, regardless of whether or not the driver has broken any other laws. The primary seat belt law was implemented in 1986 in state TU.
This dataset covers the period 1981-2003. The next table compares the pre period (1981-1985) log of fatalities per capita for state TU and the 44 control states. We can observe that the treatment state (TU) has a larger number of ln(fatalities per capita) during this period.  In fact, the ln(fatalities per capita) for the control states is approximately 1.17 times lower than TU. 

 From the graph below we can observe the same pattern as the table above where TU has a higher level of ln(fatalities per capita) during the 1981-1985 time period. What this implies is that we need to assign a higher weight to the states that show a pattern that more closely resembles the pattern exhibited by TU in this time period.  
 
When we sort the values of ln(fatalities per capita) in 1985 we find that the state that most closely resembles TU is Alabama:
 
A graphical presentation of this can be seen below:
To attempt to predict the level of fatalities per capita in a regression framework I also use the variables per capita beer consumption, rain, and snow in addition to primary seat belt laws.
   
We can observe the values of all variable below differ significantly. This implies that if we use Alabama as a counterfactual state we would not be making an “apples to apples” comparison. Therefore using Alabama as a counterfactual state would be problematic. We observe similar values in the pre-intervention (1981-1985) dependent variable ln(fatalities per capita) for both states. However, the difference in explanatory variables implies that there would be unobserved determinants that can change over time and affect the level of fatalities.  
 
Synthetic Control Method:
The synthetic control method puts heavier weight on the states that more closely resemble TU. This is done to obtain a counterfactual or a comparable control state. This synthetic control state is obtained by calculating the weighted average of all states in the control group. The predictor variables per capita beer consumption, rain, and snow are averaged over the entire period (1981-1985) before the primary seat belt laws were implemented in 1986 in state TU. 
 The graph above was obtained using STATA statistical software. From it we can observe that traffic fatalities per capita declined in the imaginary state TU after 1986 when the primary seat belt law was implemented. Again, the synthetic TU is obtained by averaging out the values of other states in the pre-primary seat belt law period (1981-1985). Based on this information, we can observe what happened in the states that did not implement a primary seat belt law and we can conclude that the decrease in the level of fatalities in state TU after 1988 can be attributed to the implementation of primary seat belt laws.

Friday, August 26, 2011

Nice Graphics in Excel 2007

I designed these graphs for a research proposal to quantify the economic impacts of a massive wind farm project in Oaxaca, Mexico. As part of the exploratory research phase, I wanted to get an idea of the size of the wind energy generation market in Mexico. The data is courtesy of Mexico's Energy Department. When I finalized the graphs I realized Excel 2007 has some very neat graphing and data presentation capabilities. Conclusion: despite representing only a small share of overall gross electricity production in Mexico,  wind energy has experienced a phenomenal growth rate in the last decade.


Master's Thesis Defense

I defended my master's thesis in front of a panel of 6 economics professors on April 28, 2011. The outcome: unanimous pass with honors. On the first picture I am introducing the topic by talking about innovative approaches to measuring subjective well-being. The examples on the slide include: the United Nations' Human Development Report, Gallup-Healthways' Well-Being Index, the New Economic Foundation's Happy Planet Index, and the Legatum Institute's Legatum Prosperity Index Report.

On the second picture I am presenting the empirical methodology I employed for my research: household fixed effects, instrumental variables, and ordered probit. If you are able to connect the dots. The hh fixed effects and instrumental variables equations represent the regression output I posted for my Welcome! entry.






 


Tuesday, August 23, 2011

Example of STATA's Analytical and Graphing Power

I really wanted to combine many graphs into one using STATA statistical software when I saw the graph below. However, even if you look at a really large version of this 6x5 graph, you won't be able to see the details unless you have 20+/20+ eyesight, which most of us don't.

After looking at some STATA manuals I came up with this graph below. I think it is really neat how you can write a simple piece of code in STATA to merge as many graphs as you want. Here is the simple piece of code I used to make the graphs happen:

twoway scatter   npl2000 hrs_82
graph save g1.gph, replace
twoway (scatter meanhs8 hrs_82) (lfit meanhs8 hrs_82), ytitle(mean housing prices in 1980)
graph save g2.gph, replace
gr combine g1.gph g2.gph

And here is the actual explanation of what the graphs mean:

3b)  From the graph on the left below we can observe that an HRS score higher than 28.5 accounts for some but not all the variation for determining whether or not a census tract contains a hazardous waste site listed on the NPL by year 2000.
3c) The graph on the right gives a linear regression estimate, showing a mildly positive relationship between the HRS score in 1982 and mean housing prices in 1980. Additionally, from this graph we can conclude that HRS score in 1982 serves as a good predictor for housing values in 1980.
And here is the graph: 


Sunday, August 21, 2011

The Power of Web Analytics

Web analytics is a field that has the potential to experience exponential growth in the near future. Why? Because an increasingly large number of people use the internet to carry out more and more transactions (aka purchases). Just think about Amazon.com and Borders. Amazon is doing great because people choose to purchase books online instead of going to a traditional establishment like Borders, which results in traditional establishments like Borders going out of business. The bottom line is that businesses need to adapt to this new environment and web analytics is an excellent tool as it dissects  key metrics about what is going on in the internet. Here is the snapshot of one of the slides of a presentation I put together recently.


Saturday, August 20, 2011

Welcome!

Hi Everyone,

Welcome and thank you for taking the time to check out my blog. This is a space to share my ideas, thoughts, and interesting content with the world.

The table below shows you regression results the way they are presented in an academic economics journal. Columns 1-4 present 4 specifications of an Ordinary Least Squares with Fixed Effects Model and columns 5-8 also present an Ordinary Least Squares Model but using Sponsorship Eligibility as an Instrumental Variable.

This is the way researchers attempt to identify a cause and effect relationship. The asterisks to the right of some of the coefficients indicate these coefficients help explain variation in your "Y" variable of interest....... 

Oh, and by the way, I am proud to announce that I did put together this table myself.