Lecture 01

Embed Size (px)

DESCRIPTION

econ

Citation preview

  • Econ 513: Practice of Econometrics

    Lecture 1: Introduction and overview

    (cf. A&P, Introduction)

    USC, Fall 2015

    1 / 30

  • Aims of this coursePractice of Econometrics

    We will:I cover methods to analyze economic data and to understand, quantify,

    and interpret economic relationships;I use both analytical and computer-based problems to gain practical

    experience in the application of these methods.

    Goal is to give you an understanding and thorough basis for applyingeconometric methods to empirical economic questions and being able toconsult reference books for more advanced problems.

    2 / 30

  • OrganizationI Lectures: Tue/Thu 45:50pm, GFS 116I Assignments: 5 timesI Midterm: October 8 in classI Final exam: December 10, 4:306:30I Office hours: Tue 23pm VPD 314L or by appointment (send email)I TA: Ahram Moon; office hours: Fri 11am1pm KAP 363

    See the syllabus for more details

    3 / 30

  • MaterialsI Textbook: Angrist & Pischke (2015), Mastering Metrics [A&P]. We

    will loosely follow the topics of this book but expand on it with moreadvanced material and some additional topics.

    I Recommended reference book: Cameron & Trivedi (2005),Micoreconometrics. Discusses the advanced topics that are not in A&Pand much more.

    I Slides and supplementary material will be made available throughBlackboard.

    I Data: These will be provided through the Blackboard page of thecourse or through giving download links.

    4 / 30

  • SoftwareI Stata (statistics/econometrics software). This is available in the USC

    computer labs.I Stata is by far the most used econometric software currently used (esp.

    in applied micro) and therefore an important part of this course isgetting experience with this.

    I I will discuss Stata examples in my lectures and will post the Stataprograms and data files on the Blackboard page.

    I The TA (Ahram Moon) will organize an introductory session in thecomputer lab.

    I A good online introduction is athttp://data.princeton.edu/stata/

    and many more resources can be found athttp://www.stata.com/links/resources-for-learning-stata/

    I Cameron & Trivedi (2010), Microeconometrics using Stata (rev. ed.) isa very useful book for learning how to use Stata to perform econometricanalyses.

    5 / 30

  • What we will be usingI Basic economic theory.

    Source: undergraduate economics course or similar.I Simple calculus.

    Source: undergraduate calculus course or similar.I Probability and statistics.

    Source: undergraduate statistics course; appendix in undergraduateeconometrics book, etc. You should already be familiar with basicstatistics, but we will briefly review this. We will discuss moreadvanced statistics extensively.

    I Matrix algebra.Source: undergraduate math course; appendix in undergraduateeconometrics book. We will review this material as well.

    6 / 30

  • Topics discussed in this courseI CausalityI Randomized trialsI Linear regressionI Instrumental variablesI Regression discontinuityI Differences in differencesI Panel dataI Binary dependent variables

    We will focus on micro-econometric methods and applications. These alsoform the basis for methods for macro, but macro problems often use timeseries data. Time series analysis is more advanced and outside the scope ofthis course.

    7 / 30

  • CausalityEconomic theory informs us about causal relations, which are relationsceteris paribus, i.e., all other things equal.

    For example: higher prices cause lower demand.

    Violation of ceteris paribus:Football team Ticket price DemandUSC Trojans $45$200 25,00080,000Santa Monica High School Vikings Free? < 1,000?

    Quality (utility) of USC games local HS game not everything else is equal.Economic theory applies to the same USC game, against the same opponent,in the same location, at the same time: for this given game, demand wouldbe lower if ticket prices were higher. And this still assumes that the qualityof the game does not depend on the ticket price.Source: http://www.gettrojantix.com/, https://en.wikipedia.org/wiki/2014 USC Trojans football team, http://samohifootball.com/,and speculation

    8 / 30

  • Causality and policy evaluationEconomists are often interested in evaluating policies (govt, company, etc.);also predict the costs and benefits of potential future policies.

    What would have happened if different policy was followed? causal effect of policy.

    State Income tax Real GDP growth (2014)CA Progressive (1%12%) 2.8%TX 5.2%

    Can California increase economic growth by eliminating income taxes?

    Many other differences between TX and CA: population growth, populationcomposition, natural resources, other (tax) policies, labor markets, etc.We cannot conclude income tax causes the different GDP growth rates.Sources: http://www.bea.gov/newsreleases/regional/gdp state/2015/xls/gsp0615.xlsx, http://comptroller.texas.gov/taxes/,https://www.ftb.ca.gov/forms/2014 California Tax Rates and Exemptions.shtml,http://www.bankrate.com/finance/taxes/state-with-no-income-tax-better-or-worse-1.aspx

    9 / 30

  • Causality and selectivityWe are often interested in causal effects in which economic agents havesome control over the cause we are interested in.Economic agents make their choices based on their expectations andpreferences, which may include factors that partially determine the outcomeof interest.

    Highest education Avg. earnings (2013)Bachelors $45,431Masters $58,402

    Is the $13,000 difference the causal effect of getting a masters?

    Masters may be smarter, more disciplined, motivated, . . . would have had higher earnings anyway.This kind of selectivity is one of the key issues in applied economicresearch, as opposed to, for example, physics.

    Source: http://www.census.gov/cps/data/cpstablecreator.html

    10 / 30

  • Randomized trialsMost powerful way to establish causality.This is the standard for approval of new drugs.

    1. Start with a pool of participants.2. Randomly assign participants to treatment or control group.

    When the number of participants is large enough, this should ensurethat all other things are equal.

    3. Administer treatment (e.g., policy) to the treatment group and not tothe control group.

    4. Compare outcomes of variables of interest in the treatment group withthe control group. Any differences (beyond those that can be expecteddue to chance) must be due to the treatment.

    5. Statistics tells us what differences can be attributed to chance and whenwe can reject chance as the sole determining factor.

    11 / 30

  • Example: Financial incentives increase productivityTeacher absence is a big problem in India.RCT: randomly assign schools to treatment and control groups.Treatment: teachers attendance was monitored daily using cameras, andtheir salaries were made a nonlinear function of attendance.

    Outcome Treatment Control DifferenceTeacher attendance 0.79 0.58 0.21(s.e.) (0.03)

    Avg. student test score 0.35 0.24 0.12(s.e.) (0.11)

    Strong evidence for causal effect on teachers attendance, but difference instudent test scores could be due to chance.Source: E. Duflo, R. Hanna, & S. P. Ryan (2012), Incentives Work: Getting Teachers to Come to School, American Economic Review, 102, 12411278,Tables 2 & 8.

    12 / 30

  • Linear regressionOften, the causal variable of interest is a continuous variable that can takemany values, and we are interested in an outcome as a function of thedetermining variable.

    For example, demand function:

    demand = a + b price +

    a = intercept;b = regression coefficient (here < 0); = error term (random variation)

    We could vary the prices experimentally and estimate these parameters.

    13 / 30

  • Controlling for confoundersWe can easily add more terms to the right-hand sides of these equations, andthis may help addressing the selectivity problem.

    For example,earnings = a + b masters + c IQ +

    masters = 1 for those with a masters degree and 0 for those with only abachelors.

    We can add other terms on the right hand side if we think they affect earningsand differ between individuals with a masters and individuals without.

    The challenge is to make sure that the remaining (unexplained) randomvariation is not related to the variables that are included in the equation,i.e., no other determinants of the outcome are related to the variables in theequation.

    14 / 30

  • Descriptive use of regressionLinear regression is also useful for purely descriptive purposes:Is there a relation between two variables (after controlling for others)?Even if there are possible confounders, this is useful information:

    I Has the relation become stronger or weaker over time?I Is it stronger in one state (or country) than another?

    This may be interesting by itself and lead to hypothesis generation andfollow-up work that tries to find the causal effect.

    15 / 30

  • Example: Earnings vs. education in CA and TX

    5.5

    6

    6.5

    7

    Log

    earn

    ings

    8 10 12 14 16 18Education in years

    Average (CA)Average (TX)Linear regression (CA)Linear regression (TX)

    16 / 30

  • Example (continued)

    Regressor California TexasEducation .144 .132(s.e.) (.010) (.011)

    Constant 4.480 4.606(s.e.) (.150) (.153)

    N 1004 684

    Interpretation:14.4% higher earnings per additional year of schooling in CA, 13.2% in TX.The s.e.s suggest that this difference could be due to chance.

    All states: lowest is .057 (ND), highest is .184 (NE).Statistically, we reject that all coefficients are the same.Source: Analysis of the 2013 CPS. Program and data are on Blackboard.

    17 / 30

  • Instrumental variablesStandard linear regression (OLS) does not estimate the causal effect ifthere are still omitted variables that affect the outcome and are correlatedwith the included variables. This often happens (at least, is often suspected).

    Most common econometric solution: instrumental variables (IVs)IVs are correlated with the included variables but uncorrelated with the errorterm.

    Simple case: one regressor (x), one IV (z), outcome is y.

    Equation of interest: y = 1 + 2x + (1)

    Reduced form: y = 1 + 2z + u (2)

    First stage: x = 1 + 2z + v (3)

    Then 2 = 2/2.OLS of (1) does not estimate 2 when x and are correlated.OLS of (2) and (3) estimates 2 and 2.IV estimate: 2 = 2/2

    18 / 30

  • Example: Demand for fishRegressing quantities sold on prices does not estimate the demand equation(nor the supply equation) because price is an equilibrium outcome thatdepends on the error terms of both the supply and demand equations.

    Demand for fish in NY:Stormy weather reduced supply higher equilibrium priceAssumption: recent stormy weather does not directly affect demand Stormy can be used as an IV to estimate the demand function.

    Regressor Outcome Price elasticityLog quantity (y) Log price (x) of demand (2)

    Stormy (z) 0.36 0.34 1.08(s.e.) (0.15) (0.07) (0.48)

    (0.36/0.34 = 1.08)Source: J. D. Angrist, K. Graddy, & G. W. Imbens (2000), The Interpretation of Instrumental Variables Estimators in Simultaneous Equations Modelswith an Application to the Demand for Fish, Review of Economic Studies, 67, 499527.

    19 / 30

  • Regression discontinuityDoes Medicare save lives?Does enrollment in an honors class improve later-life outcomes?Does being the incumbent increase the probability of being elected?

    Binary determinant that depends discontinuously on a continuous variable(age 65; GPA cutoff score; share of the vote in previous election 50%)that itself is related to the outcome.

    Regression discontinuity (RD) estimates the size of the jump at the cutoffscore, which is the causal effect of the binary variable of interest, at least forindividuals close to the cutoff score.

    20 / 30

  • Example: Incumbency effect

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8D

    emoc

    rat v

    ote

    shar

    e ne

    xt e

    lect

    ion

    0.5 0.4 0.3 0.2 0.1 0.0 0.1 0.2 0.3 0.4 0.5Difference in vote share DemocratRepublican

    Estimate of the jump at zero: 0.082 (s.e. = 0.008).So the incumbent party gets an 8.2 percentage points bonus.Source: D. S. Lee (2008), Randomized experiments from non-random selection in U.S. House elections, Journal of Econometrics, 142, 675697,Figure 4a. Program and data are on Blackboard.

    21 / 30

  • Differences in differencesComparing outcomes before and after a policy change may not estimate thecausal effect of the change because of violation of the ceteris paribuscondition: many things have changed at the same time.

    For example, fewer uninsured in 2015 than before Obamacare was enactedmay be (partially) due to decrease in unemployment and economic growth ingeneral.

    Diff-in-diff can be used if there is a population that is affected by thepolicy change and another population that is not. It compares the change inthe treated population with the change in the control population.

    22 / 30

  • Example: Workers CompensationIn 1980, Kentucky increased benefits for injured high-earning workers, butnot for low-earners.

    Higher benefits reduce the incentive to return to work longer duration.Log duration

    Income group Before change After Change Difference

    Low earners 1.13 1.13 0.01(s.e.) (0.03) (0.03) (0.04)

    High earners 1.38 1.58 0.20(s.e.) (0.04) (0.04) (0.05)

    Diff-in-diff 0.19(s.e.) (0.07)

    The non-change in the low-earners group makes the increase for thehigh-earners more plausible as a causal effect.Source: B. D. Meyer, W. K. Viscusi, & D. L. Durbin (1995), Workers Compensation and Injury Duration: Evidence from a Natural ExperimentAmerican Economic Review, 85, 322340.

    23 / 30

  • Panel dataObserve the same individuals (firms, states, countries, etc.) at multiplepoints in time.

    I Study changes in one variable as a function of changes in another.I Also helps with removing unobserved confounders.

    Suppose the model of interest is

    yit = a + bxit + it = a + bxit + i + vit, (4)

    i.e., the error term consists of a component that is constant over time (e.g.,stable preferences, abilities, and other characteristics) and a component thatvaries over time.

    It is often reasonable to assume that the main problem with estimating b isthe component i, which may be correlated with xit.Eliminate by taking first differences:

    yit = yit yi,t1 = bxit + vit.This equation can be estimated in the ordinary way.

    24 / 30

  • Example: Crime rates in counties in North CarolinaRegression without taking panel nature into account:. regress lcrmrte ///> lprbarr lprbconv lprbpris lavgsen lpolpc ldensity lpctymle lwcon lwtuc ///> lwtrd lwfir lwser lwmfg lwfed lwsta lwloc west central ///> urban lpctmin------------------------------------------------------------------------------

    lcrmrte | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+----------------------------------------------------------------

    lprbarr | -.545336 .029672 -18.38 0.000 -.6036079 -.487064lprbconv | -.4392882 .021475 -20.46 0.000 -.4814622 -.3971143lprbpris | -.1286902 .0482829 -2.67 0.008 -.2235115 -.0338689lavgsen | -.0595281 .0383381 -1.55 0.121 -.1348192 .0157629lpolpc | .3623397 .0224237 16.16 0.000 .3183026 .4063768

    ldensity | .3121217 .0278302 11.22 0.000 .2574669 .3667765lpctymle | -.1603721 .0629848 -2.55 0.011 -.2840659 -.0366783

    lwcon | .0715306 .0540324 1.32 0.186 -.0345819 .177643lwtuc | .0039808 .0289216 0.14 0.891 -.0528174 .0607791lwtrd | .0162076 .0620666 0.26 0.794 -.105683 .1380982lwfir | -.0095551 .0448274 -0.21 0.831 -.0975901 .0784799lwser | -.0358545 .0310605 -1.15 0.249 -.0968532 .0251442lwmfg | -.0827497 .0528848 -1.56 0.118 -.1866083 .021109lwfed | .0414201 .113905 0.36 0.716 -.1822742 .2651143lwsta | -.2331157 .0820558 -2.84 0.005 -.3942624 -.071969lwloc | .028267 .1156494 0.24 0.807 -.198853 .255387west | -.2212392 .0462601 -4.78 0.000 -.3120878 -.1303905

    central | -.1706151 .0274328 -6.22 0.000 -.2244895 -.1167408urban | -.1417121 .0536367 -2.64 0.008 -.2470475 -.0363767

    lpctmin | .1837615 .0196319 9.36 0.000 .145207 .222316_cons | -1.904982 .5722773 -3.33 0.001 -3.028858 -.7811051

    ------------------------------------------------------------------------------Source: Analysis of the data from C. Cornwell & W. N. Trumbull (1994), Estimating the Economic Model of Crime with Panel Data, Review ofEconomics and Statistics, 76, 360366. Inspired by their Table 3. Program and data are on Blackboard.

    25 / 30

  • Comparison with and without first differencing--------------------------------------------------------------

    | Without FD After FDlcrmrte | Coef. Std. Err. Coef. Std. Err.

    -------------+------------------------------------------------lprbarr | -.545336 .029672 -.3443183 .0307744lprbconv | -.4392882 .021475 -.2519694 .0186189lprbpris | -.1286902 .0482829 -.1763339 .0266779lavgsen | -.0595281 .0383381 -.0086446 .0222081lpolpc | .3623397 .0224237 .3910226 .027922

    ldensity | .3121217 .0278302 .1403951 .5923311lpctymle | -.1603721 .0629848 -.2287106 .7466448

    lwcon | .0715306 .0540324 -.0411665 .0315042lwtuc | .0039808 .0289216 .0112048 .0134731lwtrd | .0162076 .0620666 -.0411206 .0318461lwfir | -.0095551 .0448274 .0033035 .0219192lwser | -.0358545 .0310605 .0164855 .0148252lwmfg | -.0827497 .0528848 -.2298159 .1022266lwfed | .0414201 .113905 -.1766902 .1713265lwsta | -.2331157 .0820558 .1232835 .0933971lwloc | .028267 .1156494 .0949626 .1024504west | -.2212392 .0462601

    central | -.1706151 .0274328urban | -.1417121 .0536367

    lpctmin | .1837615 .0196319_cons | -1.904982 .5722773 -.0042917 .0206917

    --------------------------------------------------------------

    Most effects are smaller after first differencing, e.g., elasticity of Prob(arrest)is much smaller.

    26 / 30

  • Binary dependent variablesBinary outcome (1/0; e.g., whether has health insurance, whether employed,whether enrolls in masters program after bachelors)Linear regression model may predict probabilities outside the 01 range,which is logically impossible and therefore often undesirable.A nonlinear relation fits such relations better, for example the logit model

    p(x) = Pr(y = 1 | x) = ea+bx

    1 + ea+bx

    0.2

    .4

    .6

    .8

    1p(x

    ) with

    a=0,

    b=1

    4 2 0 2 4x

    27 / 30

  • Example: Bad health as a function of incomeThis is an example of a non-causal descriptive relation.

    . logit fairpoor loginc if (famincy2 >= 500)

    Iteration 0: log likelihood = -4531.5338Iteration 1: log likelihood = -4394.3345Iteration 2: log likelihood = -4386.4225Iteration 3: log likelihood = -4386.4103Iteration 4: log likelihood = -4386.4103

    Logistic regression Number of obs = 13856LR chi2(1) = 290.25Prob > chi2 = 0.0000

    Log likelihood = -4386.4103 Pseudo R2 = 0.0320

    ------------------------------------------------------------------------------fairpoor | Coef. Std. Err. z P>|z| [95% Conf. Interval]

    -------------+----------------------------------------------------------------loginc | -.4656788 .0269452 -17.28 0.000 -.5184904 -.4128671_cons | 2.671893 .2778113 9.62 0.000 2.127393 3.216393

    ------------------------------------------------------------------------------

    28 / 30

  • Example (continued)

    0

    .1

    .2

    .3

    .4

    .5Fa

    ir/po

    or h

    ealth

    6 7 8 9 10 11 12 13Log family income

    LogitLinear

    29 / 30

  • When you get homeI [Before you leave] Fill out background questionnaire and return it to

    Ahram or me.I Read the Introduction of A&P.I Read the following article:

    A. Frakt (08/17/2015), How to Know Whether to Believe a Health Study,New York Times, http://nyti.ms/1NABX1O

    This is about health studies, but most of it also applies to economicstudies.

    30 / 30