Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quantitative Methods 2: “Decision Making Under Uncertainty” Lecture 1 IRCO 454 Professor Edmund Malesky, UCSD 1 Copyrighted by Edmund Malesky. Do not.

Similar presentations


Presentation on theme: "Quantitative Methods 2: “Decision Making Under Uncertainty” Lecture 1 IRCO 454 Professor Edmund Malesky, UCSD 1 Copyrighted by Edmund Malesky. Do not."— Presentation transcript:

1

2 Quantitative Methods 2: “Decision Making Under Uncertainty” Lecture 1 IRCO 454 Professor Edmund Malesky, UCSD 1 Copyrighted by Edmund Malesky. Do not distribute without permission.

3 Outline of Today’s Lecture 1) Introduction to QM2 2) Flip to the last page of the novel – What is linear modeling and how is it used? 3) A brief review of critical concepts that you learned in QM1. 2 Copyrighted by Edmund Malesky. Do not distribute without permission.

4 Goals of the Course  Learn to do quantitative empirical work for use in economic analysis, public policy and social sciences.  Learn the basic properties of the regression estimator.  Learn to diagnose and address problems with fit between data and estimator  Learn to present results in a meaningful way.  Learn STATA. 3 Copyrighted by Edmund Malesky. Do not distribute without permission.

5 Topics We Will Address  ONE basic equation:  Y = β 0 + β 1 X + u  This is a VERY flexible model for understanding social, political, economic behavior.  First part of course will be about HOW to estimate β 0 and β 1  Also about what ASSUMPTIONS are needed to make those estimates. 4 Copyrighted by Edmund Malesky. Do not distribute without permission.

6 Topics We Will Address  Y = β 0 + β 1 X + u  The rest of the course will be about what to do if those assumptions are not reasonable  How do we make sure that our estimates of β 1 are unbiased, or at least consistent 5 Copyrighted by Edmund Malesky. Do not distribute without permission.

7 Problems with u (the error term /residual)  Omitted Variable Bias  Heteroskedasticity  Dichotomous Dependent Variables  Autocorrelation 6 Copyrighted by Edmund Malesky. Do not distribute without permission.

8 Problems with X  Measurement Error  Multicollinearity 7 Copyrighted by Edmund Malesky. Do not distribute without permission.

9 Problems with β 0 & β 1  Dummy variables for new intercepts  Non-linear effects  Interaction Effects 8 Copyrighted by Edmund Malesky. Do not distribute without permission.

10 Problems with Y  Endogeneity Bias  Selection Bias  The use (abuse) of R-squared and “curve fitting” 9 Copyrighted by Edmund Malesky. Do not distribute without permission.

11 Course Structure (Two Components)  Monday: A theory based lecture on the mathematical properties of the linear regression technique and problems with its application. No laptops!  Wednesdays: A practical hands-on lab, where we will learn how to program statistical code in STATA. Bring your laptops!! 10 Copyrighted by Edmund Malesky. Do not distribute without permission.

12 Course Requirements  50% - Weekly Problem Sets Will your own computer code (A.K.A. “The.Do File”) Will your own computer code (A.K.A. “The.Do File”) File sent in one hour before class on the Wednesday following distribution.File sent in one hour before class on the Wednesday following distribution. Send to “QM2 Homework” FolderSend to “QM2 Homework” Folder “LastName_ProblemSet#” Whether.do file runs is worth 20% of HW gradeWhether.do file runs is worth 20% of HW grade Word write-up handed in before class lecture. Word write-up handed in before class lecture.  50% - Final Take-Home Exam Will test cumulative knowledge. Will test cumulative knowledge. Will involve a.do file Will involve a.do file Grade will be determined based on your answers to the questions and whether I can successfully run your.do files without error. Grade will be determined based on your answers to the questions and whether I can successfully run your.do files without error. 11 Copyrighted by Edmund Malesky. Do not distribute without permission.

13 Required Readings  Wooldridge, Jeffrey M. 2008. Introductory Economics: A Modern Approach, Volume 4E.  Other brief reading assignments sent out by professor. 12 Copyrighted by Edmund Malesky. Do not distribute without permission.

14 One Administrative Issue  What do we do to make-up for missing classes due to Martin Luther King and President’s Day? Continue with class as normal? Continue with class as normal? Schedule make-up class? Schedule make-up class? Webcast missing class? Webcast missing class? Malesky lectures at TA review sessions? Malesky lectures at TA review sessions? 13 Copyrighted by Edmund Malesky. Do not distribute without permission.

15 Optional Readings Baum, Christopher. 2008. An Introduction to Modern Econometrics Using Stata.” Stata Press. http://www.stata.com/bookstore/statabooks.html http://www.stata.com/bookstore/statabooks.html Xiao Chen, Philip B. Ender, Michael Mitchell & Christine Wells. 2006. Stata Web Books: Regression with Stata. http://www.ats.ucla.edu/stat/stata/webbooks/reg/default.htm http://www.ats.ucla.edu/stat/stata/webbooks/reg/default.htm Zorn, Christopher. Stata for Dummies http://www.buec.udel.edu/yatawarr/Stata4Dummies.pdf Acock, Alan. 2005. A Gentle Introduction to Stata. http://www.stata.com/bookstore/statabooks.html 14 Copyrighted by Edmund Malesky. Do not distribute without permission.

16 A New Way of Studying  Excelling in QM2 requires a different approach to learning than in many other classes at IRPS.  This course is about skill acquisition. The speed-reading, participation, and writing skills that you have fine-tuned in other courses are important, but they will serve you less well here.  At the end of the day, you will be evaluated on your ability to understand and employ OLS regression in policy analysis. Period. 15 Copyrighted by Edmund Malesky. Do not distribute without permission.

17 READING Reading assignments are short, but they are difficult, technical, and essential to understanding the material in the course. Reading assignments are short, but they are difficult, technical, and essential to understanding the material in the course. You cannot read Wooldridge like you are reading for the policy or political science courses at IRPS. You cannot read Wooldridge like you are reading for the policy or political science courses at IRPS. Find a quiet spot, read with a pencil in hand, highlight and take notes vigorously. Find a quiet spot, read with a pencil in hand, highlight and take notes vigorously. Do not skip over the equations or boxes. Do not skip over the equations or boxes. Read the equations, as if you are reading a sentence.Read the equations, as if you are reading a sentence. The boxes are examples of the material covered. Refer back to the preceding lesson, as you read each box.The boxes are examples of the material covered. Refer back to the preceding lesson, as you read each box. 16 Copyrighted by Edmund Malesky. Do not distribute without permission.

18 Lectures  I will provide you with my lecture notes at the end of every class.  Do not feel obligated to type everything I say.  You will do much better if you simply listen, ask questions, and record a few important issues.  Stop me if you don’t understand. Probably half or more of the class is also confused. Probably half or more of the class is also confused. If you didn’t understand slide 10, you will not understand slide 11, and …ZZZZZZZZZZZZZ If you didn’t understand slide 10, you will not understand slide 11, and …ZZZZZZZZZZZZZ 17 Copyrighted by Edmund Malesky. Do not distribute without permission.

19 STATA  Learning to write a.do file is like learning to speak another language. All of you have mastered this ability before.  Keep your own glossary of commands and syntax that I introduce to you in the course. The process will help you remember the code and give you a personalized reference guide.  Feel free to make use of the help function, pull- down menus, and the UCLA statistics website.  When using help, look most carefully at examples. 18 Copyrighted by Edmund Malesky. Do not distribute without permission.

20 Homework  Feel free to work in groups, but make sure you write-up your own final.do file. Do not cut and paste the work of others. After the group session, do the write-up and.do file on your own. That will help you know if you really understand it. 19 Copyrighted by Edmund Malesky. Do not distribute without permission.

21 Prof. and TA Availability Prof Malesky Office Hours: MW 3 to 4 and by appointment. Kevin   OH/Breakout: Thursday, 3:30 pm Matt   OH/Breakout: 20 Copyrighted by Edmund Malesky. Do not distribute without permission.

22 Any Questions? 21 Copyrighted by Edmund Malesky. Do not distribute without permission.

23 The Linear Regression Model Approach to Research Otherwise known as…… Advanced Line Drawing 22 Copyrighted by Edmund Malesky. Do not distribute without permission.

24  The “General Linear Model” refers to a class of statistical models which are “generalizations” of simple linear regression analysis.  Regression is the predominant statistical tool used in the social sciences due to its simplicity and versatility.  Also called Linear Regression Analysis. General Linear Model 23 Copyrighted by Edmund Malesky. Do not distribute without permission.

25 Notations for Regression Line  Alternate Mathematical Notation for the straight line th Grade Geometry th Grade Geometry Statistics Literature Statistics Literature Econometrics Literature Econometrics Literature  Y = β 0 + β 1 X + u Wooldrigde uses this specification, so we will too! 24 Copyrighted by Edmund Malesky. Do not distribute without permission.

26 Translating Math into English  The linear model states that the dependent variable is directly proportional to the value of the independent variable.  Thus, if a theory implies that Y increases in direct proportion to an increase in X, it implies a specific mathematical model of behavior - the linear model.  E.g. “It’s the economy, stupid!” 25 Copyrighted by Edmund Malesky. Do not distribute without permission.

27 Simple Linear Regression: The Basic Mathematical Model  Regression is based on the concept of the simple proportional relationship  A.K.A... the straight line.  We can express this idea mathematically!  Y = β 0 + β 1 X + u 26 Copyrighted by Edmund Malesky. Do not distribute without permission.

28 The Theory Implies the Math  ALL statements of relationships between variables imply a mathematical structure.  Even if we don’t like to phrase our theories in these terms, they DO imply mathematical relationships.  Much of this course is about elaborating the basic model to fit our more nuanced theories. 27 Copyrighted by Edmund Malesky. Do not distribute without permission.

29 Implications of a Linear Model  The linear aspect means that the same increase in inflation will always produce the same reduction in presidential approval.  This is perhaps the most restrictive of all the assumptions of OLS.  We will work to loosen this assumption through the quarter. 28 Copyrighted by Edmund Malesky. Do not distribute without permission.

30 The Regression Parameters  β 0 = the intercept the point where the line crosses the Y-axis. the point where the line crosses the Y-axis. (the value of the dependent variable when all of the independent variables = 0) (the value of the dependent variable when all of the independent variables = 0)  β 1 = the slope the increase in the dependent variable per unit change in the independent variable (also known as the 'rise over the run') the increase in the dependent variable per unit change in the independent variable (also known as the 'rise over the run') 29 Copyrighted by Edmund Malesky. Do not distribute without permission.

31 Regression in a Perfect World…  Y = 1X 30 Copyrighted by Edmund Malesky. Do not distribute without permission.

32 …but life is full of errors…  Y = 1X + u 31 Copyrighted by Edmund Malesky. Do not distribute without permission.

33 The Error Term  Our models do not predict behavior perfectly. Life is not a “Just So” Story. Life is not a “Just So” Story.  So we add a term to adjust or compensate for the errors in prediction (u).  Much of our ability to estimate β 1 depends upon the assumptions we make about the errors (u).  Sometimes u is called the “Disturbance” 32 Copyrighted by Edmund Malesky. Do not distribute without permission.

34 The 'Goal' of Ordinary Least Squares  Ordinary Least Squares (OLS) is a method of finding the linear model which minimizes the sum of the squared errors.  Such a model provides the best explanation/prediction of the data.  It is the “Best Linear Unbiased Estimator” It’s BLUE It’s BLUE 33 Copyrighted by Edmund Malesky. Do not distribute without permission.

35 Other Goals are Possible  Minimize total errors  Minimize Absolute Value of Errors  Maximum Likelihood Models OLS is a special case of MLE OLS is a special case of MLE 34 Copyrighted by Edmund Malesky. Do not distribute without permission.

36 Why Least Squared error?  Why not simply minimum error?  The errors about the line sum to 0.0!  Minimum absolute deviation (error) models now exist, but they are mathematically cumbersome.  Try algebra with | Absolute Value | signs! 35 Copyrighted by Edmund Malesky. Do not distribute without permission.

37 Implications of Squared Errors  This model seeks to avoid BIG misses  A big u for one case leads to a REALLY big u 2.  This means regression results can be heavily influenced by outlier cases  Some feel this is theoretically appropriate  Always look at your data 36 Copyrighted by Edmund Malesky. Do not distribute without permission.

38 Minimizing the Sum of Squared Errors  How to put the Least in OLS?  In mathematical jargon we seek to minimize the residual sum of squares (SSR), where: 37 Copyrighted by Edmund Malesky. Do not distribute without permission.

39 Picking the Parameters  To Minimize SSR, we need parameter estimates.  In calculus, if you wish to know when a function is at its minimum, you take the first derivative.  In this case we must take partial derivatives since we have two parameters (β 0 & β 1 ) to worry about. 38 Copyrighted by Edmund Malesky. Do not distribute without permission.

40 How “good” does it fit?  To measure “reduction in errors” we need a benchmark variable is a relevant and tractable benchmark for comparing predictions for comparison.  The mean of the dependent.  The mean of Y represents our “best guess” at the value of Y i absent other information. 39 Copyrighted by Edmund Malesky. Do not distribute without permission.

41 Sums of Squares  This gives us the following 'sum-of- squares' measures: SST=Total Sum of Squares SST=Total Sum of Squares SSE= Explained Sum of Squares SSE= Explained Sum of Squares SSR= Residual (Unexplained Sum of Squares) SSR= Residual (Unexplained Sum of Squares)  Total Variation (SST) = Explained Variation (SSE) + Unexplained Variation (SSR) 40 Copyrighted by Edmund Malesky. Do not distribute without permission.

42 “Explained and “Unexplained” Variation XiXiXiXi yiyiyiyi 41 Copyrighted by Edmund Malesky. Do not distribute without permission.

43 “Explained and “Unexplained” Variation XiXiXiXi yiyiyiyi Square this quantity and sum across all observations and we have our SST (Total Sum of Squares) Square this quantity and sum across all observations and we have our SSE (Explained Sum of Squares) Square this quantity and sum across all observations and we have our SSR (Residual Sum of Squares) 42 Copyrighted by Edmund Malesky. Do not distribute without permission.

44 Some Confusing Terminology  Occasionally you may see people refer instead to USS (Unexplained) and ESS (Error)  These terms are interchangeable, but…  ESS can be confused with explained sum of squares  USS is not confused with any mathematical jargon, but does pose issues for statistical work on the US Navy. 43 Copyrighted by Edmund Malesky. Do not distribute without permission.

45 Let’s Test Some “Theories”  Presidential approval depends upon the performance of the US economy  The development of US military power was a response to America’s threatening environment 44 Copyrighted by Edmund Malesky. Do not distribute without permission.

46 Plotting Approval and Inflation 45 Copyrighted by Edmund Malesky. Do not distribute without permission.

47 Regressing Approval on Inflation . reg approve inflat  Source | SS df MS Number of obs = 46  ---------+------------------------------ F( 1, 44) = 17.20  Model | 1960.60398 1 1960.60398 Prob > F = 0.0002  Residual | 5015.26094 44 113.983203 R-squared = 0.2811  ---------+------------------------------ Adj R-squared = 0.2647  Total | 6975.86492 45 155.01922 Root MSE = 10.676  ------------------------------------------------------------------------------  approve | Coef. Std. Err. t P>|t| [95% Conf. Interval]  ---------+--------------------------------------------------------------------  inflat | -2.213684.5337539 -4.147 0.000 -3.289394 -1.137973  _cons | 63.80565 2.711964 23.527 0.000 58.34004 69.27125  ------------------------------------------------------------------------------ 46 Copyrighted by Edmund Malesky. Do not distribute without permission.

48 Fitting Inflation to Approval 47 Copyrighted by Edmund Malesky. Do not distribute without permission.

49 Plotting US Power & Disputes 48 Copyrighted by Edmund Malesky. Do not distribute without permission.

50 Regress US Power on Disputes . reg uscapbl numtargt  Source | SS df MS Number of obs = 177  ---------+------------------------------ F( 1, 175) = 18.61  Model |.110444241 1.110444241 Prob > F = 0.0000  Residual | 1.03834672 175.00593341 R-squared = 0.0961  ---------+------------------------------ Adj R-squared = 0.0910  Total | 1.14879096 176.006527221 Root MSE =.07703  ------------------------------------------------------------------------------  uscapbl | Coef. Std. Err. t P>|t| [95% Conf. Interval]  ---------+--------------------------------------------------------------------  numtargt |.0201142.0046621 4.314 0.000.010913.0293155  _cons |.1455665.0067132 21.684 0.000.1323172.1588157  ------------------------------------------------------------------------------ 49 Copyrighted by Edmund Malesky. Do not distribute without permission.

51 Fitting Disputes to US Power 50 Copyrighted by Edmund Malesky. Do not distribute without permission.

52 A Brief Review of Critical Concepts  Measures of Central Tendency (Mean, Median, Mode)  Population Variance  Standard Deviation  Covariance  Correlation  Marginal Effect 51 Copyrighted by Edmund Malesky. Do not distribute without permission.

53 Distributions – The Usual Suspects  Normal Distribution  Standard Normal  Chi-Square  t  F 52 Copyrighted by Edmund Malesky. Do not distribute without permission.

54 The Normal Distribution (Probability Density Function) x µ 53 Copyrighted by Edmund Malesky. Do not distribute without permission.

55 The Standard Normal Distribution (PDF) Z 0 54 Copyrighted by Edmund Malesky. Do not distribute without permission.

56 Chi-Square Distribution f(x) x df=2 df=4 df=6 55 Copyrighted by Edmund Malesky. Do not distribute without permission.

57 t-distribution: The Statistical Workhorse 0 3-3 df=2 df=4 df=6 As the degrees of freedom increase, the t-distribution approaches the normal distribution. 56 Copyrighted by Edmund Malesky. Do not distribute without permission.

58 Quick Review: Hypothesis Testing  In STATA, the null hypothesis for a two- tailed t-test is: H 0: β j =0 57 Copyrighted by Edmund Malesky. Do not distribute without permission.

59 Quick Review: Hypothesis Testing  To test the hypothesis, I need to have a rejection rule. That is, I will reject the null hypothesis if, t is greater than some critical value (c). c is up to me to some extent, I must determine what level of significance I am willing to accept. For instance, if my t- value is 1.85 with 40 df and I was willing to reject only at the 5% level, my c would equal 2.021 and I would not reject the null. On the other hand, if I was willing to reject at the 10% level, my c would be 1.684, and I would reject the null hypotheses. 58 Copyrighted by Edmund Malesky. Do not distribute without permission.

60 t-distribution: 5 % rejection rule for the that H 0: β j =0 with 25 degrees of freedom Rejection Region Area=.025 Rejection Region Area=.025 0 Looking at table G- 2, I find the critical value for a two- tailed test is 2.06 2.06-2.06 59 Copyrighted by Edmund Malesky. Do not distribute without permission.

61 Quick Review:  But this operation hides some very useful information.  STATA has decided that it is more useful to provide what is the smallest level of significance at which the null hypothesis would be rejected. This is known as the p-value.  In the previous example, we know that.05 { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/9/1388433/slides/slide_61.jpg", "name": "Quick Review:  But this operation hides some very useful information.", "description": " STATA has decided that it is more useful to provide what is the smallest level of significance at which the null hypothesis would be rejected. This is known as the p-value.  In the previous example, we know that.05

62 T-distribution: Obtaining the p-value against a two-sided alternative, when t=1.85 and df=40. P-value=P(|T|>t) In this case, P(|T|>1.85)= 2P(T>1.85)=2(.0359) =.0718 Area=.9282 Rejection Region Area=.0359 Rejection Region Area=.0359 0 61 Copyrighted by Edmund Malesky. Do not distribute without permission.

63 F Distribution f(x) x df=2,8 df=6,8 df=6,20 F and Chi Square testing involves only a one-tailed test of the area underneath the right portion of the curve. 62 Copyrighted by Edmund Malesky. Do not distribute without permission.


Download ppt "Quantitative Methods 2: “Decision Making Under Uncertainty” Lecture 1 IRCO 454 Professor Edmund Malesky, UCSD 1 Copyrighted by Edmund Malesky. Do not."

Similar presentations


Ads by Google