Day 4A Nonparametrics
|
|
- Alexander Poole
- 6 years ago
- Views:
Transcription
1 Day 4A Nonparametrics A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Economics Norwegian School of Economics Advanced Microeconometrics Aug 28 - Sep 2, Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 -Advanced Sep 2, 2017 Microeconometri 1 / 32
2 1. ntroduction 1. ntroduction Nonparametric methods place few restrictions on the data generating process density estimation - use kernel density estimate regression curve estimation - use kernel-weighted local constant or local linear regression F but curse of dimensionality as # regressors increases Semiparametric regression places some structure e.g. E [yjx] = g(x 0 β) where g() is unspeci ed reduces nonparametric component to one dimension. Bootstrap most often used to get standard errors more re ned bootstraps can give better nite sample inference. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 -Advanced Sep 2, 2017 Microeconometri 2 / 32
3 1. ntroduction Summary 1 ntroduction 2 Nonparametric (kernel) density estimation 3 Nonparametric (kernel) regression 4 npregress command (Stata 15) 5 Semiparametric regression 6 Stata commands A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 -Advanced Sep 2, 2017 Microeconometri 3 / 32
4 2. Nonparametric (kernel) density estimation Summary 2. Nonparametric (kernel) density estimation Parametric density estimate assume a density and use estimated parameters of this density e.g. normal density estimate: assume y i N [µ, σ 2 ] and use N [ȳ, s 2 ]. Nonparametric density estimate: a histogram break data into bins and use relative frequency within each bin Problem: a histogram is a step function, even if data are continuous Smooth nonparametric density estimate: kernel density estimate. smooths a histogram in two ways: F F use overlapping bins so evaluate at many more points use bins of greater width with most weight at the middle of the bin. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 -Advanced Sep 2, 2017 Microeconometri 4 / 32
5 2. Nonparametric (kernel) density estimation Histogram Histogram estimate A histogram is a nonparametric estimate of the density of y break data into bins of width 2h form rectangles of area the relative frequency = freq/n the height is freq/2nh (check: area = (freq/2nh) 2h = freq/n). Use freq = N i=1 1(x 0 h < x i < x 0 + h) where indicator function 1(A) equals 1 if event A happens and equals 0 otherwise The histogram estimate of f (x 0 ), the density of x evaluated at x 0, is bf HST (x 0 ) = 1 2Nh N i=1 1(x 0 h < x i < x 0 + h) = 1 Nh N 1 i=1 2 1 x i x 0 h < 1. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 -Advanced Sep 2, 2017 Microeconometri 5 / 32
6 2. Nonparametric (kernel) density estimation Histogram example Data example: histogram of lnwage for N = 175 observations Varies with the bin width (or equivalently the number of bins) default is p Nfor N 861 and 10 ln(n)/ ln(10) for N > 861 here specify 30 bins, each of width 2h ' 0.20 so h ' 0.10 histogram lnhwage, bin(30) scale(1.1) Density natural log of hwage A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 -Advanced Sep 2, 2017 Microeconometri 6 / 32
7 2. Nonparametric (kernel) density estimation Kernel density estimate Kernel density estimate Recall bf HST (x 0 ) = 1 Nh N i= x i x 0 h < 1 Replace 1 (A) by a kernel function Kernel density estimate of f (x 0 ), the density of x evaluated at x 0, is bf (x 0 ) = 1 Nh N i=1 K x i x 0 h K () is called a kernel function h is called the bandwidth or window width or smoothing parameter h Example is Epanechnikov kernel K (z) = 0.75(1 z 2 ) 1(jzj < 1) in Stata epan2 kernel more weight on data at center, less weight at end More generally kernel function must satisfy conditions including Continuous, K (z) = K ( z), R K (z)dz = 1, R K (z)dz = 1, tails go to zero. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 -Advanced Sep 2, 2017 Microeconometri 7 / 32
8 2. Nonparametric (kernel) density estimation Kernel density example Data example: kernel of lnwage for 175 observations Stata s epanechnikov kernel K (z) = 0.75(1 z 2 )/ p 5 1(jzj < p 5) default h = 0.9m/N 0.2 where m = min(st.dev.(x), interquartilerange x /1.349) yields h = h = 0.07 (oversmooths), 0.21 (default) or 0.63 (undersmooths) e.g. kdensity lnhwage, bw(0.21) kdensity lnhwage x Default Twice default Half default. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 -Advanced Sep 2, 2017 Microeconometri 8 / 32
9 2. Nonparametric (kernel) density estimation mplementation mplementation Key is choice of bandwidth The default can oversmooth: may need to decrease bw() For kernel choice for given bandwidth get similar results across kernels if K (z) > 0 for jzj < 1 and K (z) = 0 for jzj 1. this is most kernels aside from epanichnikov and gaussian. Other smooth estimators exist most notably k-nearest neighbors but usually no reason to use anything but kernel. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 -Advanced Sep 2, 2017 Microeconometri 9 / 32
10 3. Kernel regression Local average estimator 3. Kernel regression: Local average estimator We want to estimate at various values x 0 the conditional mean function m(x 0 ) = E [yjx = x 0 ] The functional form m() is not speci ed. A local average estimator is The weights w(x i, x 0, h) bm(x 0 ) = N i=1 w(x i, x 0, h)y i, sum over i to one decrease as the distance between x i and x 0 increases place more weight on observations with x i close to x 0 as bandwidth h decreases most common: kernel weights, Lowess and k-nearest neighbors (average the yi 0 s for the k x 0 i s closest to x 0). Evaluate bm(x 0 ) at a variety of points x 0 gives a regression curve. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 10 / 32
11 3. Kernel regression Kernel (local constant) regression Kernel (local constant) regression Let w(x i, x 0, h) = K x i x 0 h / N j=1 K xj x 0 h. Kernel regression with 95% con dence bands, default kernel (Epanechnikov) and default bandwidth lpoly lnhwage educatn, ci msize(medsmall) Local polynomial smooth natural log of hwage years of completed schooling % C natural log of hwage lpoly smooth k ernel = epanec hnik ov, degree = 0, bandw idth = 1.53, pw idth = 2.3. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 11 / 32
12 3. Kernel regression Di erent bandwidths Local linear regression A sample mean of y = OLS of y on an intercept. A weighted sample mean of y = weighted OLS of y on an intercept. So the kernel (local constant) estimator bm(x 0 ) = bα 0 that minimizes N i=1 w(x i, x 0, h)(y i α 0 ) 2. The local linear estimator generalizes to bm(x 0 ) = bα 0 that minimizes N i=1 w(x i, x 0, h)fy i α o β 0 (x i x 0 )g 2. furthermore bβ 0 = bm 0 (x 0 ), an estimate of E [yjx]/ xj x0. Advantage - better estimates at endpoints of the data. n Stata lpoly lnhwage educatn,degree(1). And can extend to higher order polynomials. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 12 / 32
13 3. Kernel regression Lowess Lowess (locally weighted scatterplot smoothing) is a variation of local linear with variable bandwidth, tricubic kernel and downweighting of outliers. Kernel, local linear and lowess with default bandwidths graph twoway lpoly y x jj lpoly y x, deg(1) jj lowess y x kernel erroneously underestimates m(x) at the endpoint x = Kernel Local linear lowess A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 13 / 32
14 3. Kernel regression mplementation mplementation Di erent methods work di erently Local linear and local polynomial handle endpoints better than kernel. bm(x 0 ) is asymptotically normal this gives con dence bands that allow for heteroskedasticity Bandwidth choice is crucial optimal bandwidth trades o bias (minimized with small bandwidth) and variance (minimized with large bandwidth) theory just says optimal bandwidth for kernel regression is O(N 0.2 ) plug-in or default bandwidth estimates are often not the best so also try e.g. half and two times the default. cross validation minimizes the empirical mean square error i (y i bm i (x i )) 2, where bm i (x i ) is the leave-one-out" estimate of bm(x i ) formed with y i excluded F empirical estimate of MSE[ bm(x i )] = Variance + Bias 2. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 14 / 32
15 4. npregress command 4. npregress command Stata 15 has new npregress command. Does local constant and local linear regression. Determines bandwidth by cross-validation whereas lpoly uses plug-in value Evaluates at each x i value whereas lpoly default is to evaluate at 50 equally spaced values. For local linear computes partial e ects. Can use margins and marginsplot for plots and average partial e ects. Can have more than one regressor. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 15 / 32
16 4. npregress command npregress with defaults LOOCV separate for bandwidth for bm(x 0 ) and bm 0 (x 0 ). * npregress command local linear. npregress kernel lnhwage educatn Computing mean function Minimizing cross validation function: teration 0: Cross validation criterion = teration 1: Cross validation criterion = teration 2: Cross validation criterion = teration 3: Cross validation criterion = teration 4: Cross validation criterion = teration 5: Cross validation criterion = teration 6: Cross validation criterion = teration 7: Cross validation criterion = teration 8: Cross validation criterion = Computing optimal derivative bandwidth teration 0: Cross validation criterion = teration 1: Cross validation criterion = teration 2: Cross validation criterion = teration 3: Cross validation criterion = teration 4: Cross validation criterion = A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 16 / 32
17 4. npregress command npregress reports averages bα = 1 N N i=1 [ α(x i ) and bβ = 1 N N i=1 [ β(x i ) Bandwidth Mean Effect Mean educatn Local linear regression Number of obs = 177 Kernel : epanechnikov E(Kernel obs) = 177 Bandwidth: cross validation R squared = lnhwage Estimate Mean lnhwage Effect educatn Note: Effect estimates are averages of derivatives. Note: You may compute standard errors using vce(bootstrap) or reps(). Versus OLS bα = and bβ = Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 17 / 32
18 4. npregress command Get bootstrap standard errors. * npregress with bootstrap standard errors. npregress kernel lnhwage educatn, vce(bootstrap, seed(10101) reps(50)) (running npregress on estimation sample) Bootstrap replications (50) Bandwidth Mean Effect Mean educatn Local linear regression Number of obs = 177 Kernel : epanechnikov E(Kernel obs) = 177 Bandwidth: cross validation R squared = Observed Bootstrap Percentile lnhwage Estimate Std. Err. z P> z [95% Conf. nterval] Mean lnhwage Effect educatn Note: Effect estimates are averages of derivatives. Versus OLS se(bα) = and se(bβ) = A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 18 / 32
19 4. npregress command Predict at selected values of education. margins, at(educatn = (10(1)16)) vce(bootstrap, seed(10101) reps(50)) (running margins on estimation sample) Bootstrap replications (50) Adjusted predictions Number of obs = 177 Replications = 50 Expression : mean function, predict() 1._at : educatn = 10 2._at : educatn = 11 3._at : educatn = 12 4._at : educatn = 13 5._at : educatn = 14 6._at : educatn = 15 7._at : educatn = 16 Observed Bootstrap Percentile Margin Std. Err. z P> z [95% Conf. nterval] _at A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 19 / 32
20 4. npregress command marginsplot, legend(o ) scale(1.1) /// addplot(scatter lnhwage educatn if lnhwage<50000, msize(tiny)) Adjusted Predictions with 95% Cs Mean Function years of completed schooling 1992 A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 20 / 32
21 4. npregress command Now consider partial e ects at selected values of education * Partial e ects of changing hours margins, at(educatn = (10(1)16)) contrast(atcontrast(ar)) /// vce(bootstrap, seed(10101) reps(50)) Output includes Observed Bootstrap Contrast Std. Err. Percentile [95% Conf. nterval] _at (2 vs 1) (3 vs 2) (4 vs 3) (5 vs 4) (6 vs 5) (7 vs 6) A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 21 / 32
22 4. npregress command marginsplot, legend(o ) Contrasts of Mean Function Contrasts of Adjusted Predictions with 95% Cs years of completed schooling Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 22 / 32
23 5. Semiparametric estimation 5. Semiparametric estimation Nonparametric regression is problematic when more than one regressor in theory can do multivariate kernel regression in practice the local averages are over sparse cells called the curse of dimensionality Semiparametric methods place some structure on the problem parametric component for part of the model nonparametric component that is often one dimensional deally p N( β b β)! d N [0, V] despite the nonparametric component. Three leading examples partial linear single-index generalized additive model. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 23 / 32
24 5. Semiparametric estimation OLS estimates OLS estimates Consider log hourly wage regressed on years of education and annual hours worked. regress lnhwage educatn hours, vce(robust) Linear regression Number of obs = 177 F(2, 174) = Prob > F = R squared = Root MSE = Robust lnhwage Coef. Std. Err. t P> t [95% Conf. nterval] educatn hours _cons A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 24 / 32
25 5. Semiparametric estimation Partial linear model Partial linear model Model: E[y i jx i, z i ] = x 0 i β + λ(z i ) where λ() not speci ed. Robinson di erencing estimator kernel regress y on z and get residual y by kernel regress x on z and get residual x bx OLS regress y by on x bx. * Partial linear model Robinson differencing estimator. semipar lnhwage educatn, nonpar(hours) robust ci title("partial linear") Number of obs = 176 R squared = Adj R squared = Root MSE = lnhwage Coef. Std. Err. t P> t [95% Conf. nterval] educatn A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 25 / 32
26 5. Semiparametric estimation Partial linear model Plot of λ(z) against z where z is annual hours worked. Partial linear A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 26 / 32
27 5. Semiparametric estimation Single-index model Single-index model Model: E[y i jx i ] = g(xi 0 β) where g() not speci ed chimura semiparametric least squares β b and bg minimize N i=1 w(x i )fy i bg(x 0 i β)g 2 where w(x i )is a trimming function that drops outlying x values. Can only estimate β up to scale in this model Still useful as ratio of coe cients equals ratio of marginal e ects in a single-index models From next slide one more year of education has same e ect on log hourly wage as working 1,048 more hours versus OLS / = 785. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 27 / 32
28 5. Semiparametric estimation Single-index model. * Single index model chimura semiparametric least squares. sls lnhwage hours educatn, trim(1,99) initial: SSq(b) = alternative: SSq(b) = rescale: SSq(b) = SLS 0: SSq(b) = SLS 1: SSq(b) = SLS 2: SSq(b) = SLS 3: SSq(b) = SLS 4: SSq(b) = pilot bandwidth SLS 0: SSq(b) = (not concave) SLS 1: SSq(b) = SLS 2: SSq(b) = SLS 3: SSq(b) = SLS 4: SSq(b) = Number of obs = 177 root MSE = lnhwage Coef. Std. Err. z P> z [95% Conf. nterval] ndex educatn hours 1 (offset). Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 28 / 32
29 5. Semiparametric estimation Generalized additive model Generalized additive model Model: E [y i jx i ] = g 1 (x 1i ) + + g K (x Ki ) where g j () are unspeci ed. Estimate by back tting and here by smoothing spline for each g j (). * Generalized additive model. gam lnhwage educatn hours, df(3) 177 records merged. Generalized Additive Model with family gauss, link ident. Model df = No. of obs = 177 Deviance = Dispersion = lnhwage df Lin. Coef. Std. Err. z Gain P>Gain educatn hours _cons Total gain (nonlinearity chisquare) = (4.003 df), P = A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 29 / 32
30 5. Semiparametric estimation Generalized additive model Plot each g j () function looks like education linear or quadratic; hours linear Component & partial residuals for lnhwage GAM 3 df smooth for educatn, adjusted for covariates years of completed schooling 1992 Component & partial residuals for lnhwage GAM 3 df smooth for hours, adjusted for covariates annual work hours 1992 A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 30 / 32
31 6. Stata Commands 6. Stata commands Command kernel does kernel density estimate. Command lpoly does several nonparametric regressions kernel is default local linear is option degree(1) local polynomial of degree p is option degree(p) Command lowess does Lowess. Stata 15 command npregress does local constant and local linear for one or more regressors with bandwidth chosen by leave-on-out cross validation. For semiparametric use add-ons semipar, sls, gam gam requires MS Windows. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 31 / 32
32 6. Stata Commands 6. References A. Colin Cameron and Pravin K. Trivedi (2005), Microeconometrics: Methods and Applications (MMA), chapter 9, Cambridge Univ. Press. A. Colin Cameron and Pravin K. Trivedi (2009), Microeconometrics using Stata (MUS), chapter 2.6, Stata Press. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Nonparametrics Economics Norwegian School of Economics Aug 28 - Sep Advanced 2, 2017 Microeconometri 32 / 32
Day 3B Nonparametrics and Bootstrap
Day 3B Nonparametrics and Bootstrap c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based on A. Colin Cameron and Pravin K. Trivedi (2009,2010),
More information11. Bootstrap Methods
11. Bootstrap Methods c A. Colin Cameron & Pravin K. Trivedi 2006 These transparencies were prepared in 20043. They can be used as an adjunct to Chapter 11 of our subsequent book Microeconometrics: Methods
More informationDay 1A Ordinary Least Squares and GLS
Day 1A Ordinary Least Squares and GLS c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based on A. Colin Cameron and Pravin K. Trivedi (2009,2010),
More informationEconomics 326 Methods of Empirical Research in Economics. Lecture 14: Hypothesis testing in the multiple regression model, Part 2
Economics 326 Methods of Empirical Research in Economics Lecture 14: Hypothesis testing in the multiple regression model, Part 2 Vadim Marmer University of British Columbia May 5, 2010 Multiple restrictions
More informationDensity estimation Nonparametric conditional mean estimation Semiparametric conditional mean estimation. Nonparametrics. Gabriel Montes-Rojas
0 0 5 Motivation: Regression discontinuity (Angrist&Pischke) Outcome.5 1 1.5 A. Linear E[Y 0i X i] 0.2.4.6.8 1 X Outcome.5 1 1.5 B. Nonlinear E[Y 0i X i] i 0.2.4.6.8 1 X utcome.5 1 1.5 C. Nonlinearity
More informationESTIMATING AVERAGE TREATMENT EFFECTS: REGRESSION DISCONTINUITY DESIGNS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics
ESTIMATING AVERAGE TREATMENT EFFECTS: REGRESSION DISCONTINUITY DESIGNS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics July 2009 1. Introduction 2. The Sharp RD Design 3.
More informationNow what do I do with this function?
Now what do I do with this function? Enrique Pinzón StataCorp LP December 08, 2017 Sao Paulo (StataCorp LP) December 08, 2017 Sao Paulo 1 / 42 Initial thoughts Nonparametric regression and about effects/questions
More informationRecent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data
Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data July 2012 Bangkok, Thailand Cosimo Beverelli (World Trade Organization) 1 Content a) Classical regression model b)
More informationNonparametric Econometrics
Applied Microeconometrics with Stata Nonparametric Econometrics Spring Term 2011 1 / 37 Contents Introduction The histogram estimator The kernel density estimator Nonparametric regression estimators Semi-
More informationDay 2A Instrumental Variables, Two-stage Least Squares and Generalized Method of Moments
Day 2A nstrumental Variables, Two-stage Least Squares and Generalized Method of Moments c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based
More information8. Nonstandard standard error issues 8.1. The bias of robust standard errors
8.1. The bias of robust standard errors Bias Robust standard errors are now easily obtained using e.g. Stata option robust Robust standard errors are preferable to normal standard errors when residuals
More informationDay 4 Nonlinear methods
Day 4 Nonlinear methods c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based on A. Colin Cameron and Pravin K. Trivedi (2009, 2010), Microeconometrics
More informationIntroductory Econometrics. Lecture 13: Hypothesis testing in the multiple regression model, Part 1
Introductory Econometrics Lecture 13: Hypothesis testing in the multiple regression model, Part 1 Jun Ma School of Economics Renmin University of China October 19, 2016 The model I We consider the classical
More informationUnemployment Rate Example
Unemployment Rate Example Find unemployment rates for men and women in your age bracket Go to FRED Categories/Population/Current Population Survey/Unemployment Rate Release Tables/Selected unemployment
More informationNonparametric Methods
Nonparametric Methods Michael R. Roberts Department of Finance The Wharton School University of Pennsylvania July 28, 2009 Michael R. Roberts Nonparametric Methods 1/42 Overview Great for data analysis
More informationECONOMETRICS II (ECO 2401S) University of Toronto. Department of Economics. Spring 2013 Instructor: Victor Aguirregabiria
ECONOMETRICS II (ECO 2401S) University of Toronto. Department of Economics. Spring 2013 Instructor: Victor Aguirregabiria SOLUTION TO FINAL EXAM Friday, April 12, 2013. From 9:00-12:00 (3 hours) INSTRUCTIONS:
More informationDay 1B Count Data Regression: Part 2
Day 1B Count Data Regression: Part 2 A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Economics Norwegian School of Economics Advanced Microeconometrics Aug 28 - Sept 1, 2017. Colin Cameron
More informationSection Least Squares Regression
Section 2.3 - Least Squares Regression Statistics 104 Autumn 2004 Copyright c 2004 by Mark E. Irwin Regression Correlation gives us a strength of a linear relationship is, but it doesn t tell us what it
More informationECON Introductory Econometrics. Lecture 5: OLS with One Regressor: Hypothesis Tests
ECON4150 - Introductory Econometrics Lecture 5: OLS with One Regressor: Hypothesis Tests Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 5 Lecture outline 2 Testing Hypotheses about one
More informationECON 594: Lecture #6
ECON 594: Lecture #6 Thomas Lemieux Vancouver School of Economics, UBC May 2018 1 Limited dependent variables: introduction Up to now, we have been implicitly assuming that the dependent variable, y, was
More informationECO220Y Simple Regression: Testing the Slope
ECO220Y Simple Regression: Testing the Slope Readings: Chapter 18 (Sections 18.3-18.5) Winter 2012 Lecture 19 (Winter 2012) Simple Regression Lecture 19 1 / 32 Simple Regression Model y i = β 0 + β 1 x
More informationWarwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation
Warwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation Michele Aquaro University of Warwick This version: July 21, 2016 1 / 31 Reading material Textbook: Introductory
More informationSTAT 704 Sections IRLS and Bootstrap
STAT 704 Sections 11.4-11.5. IRLS and John Grego Department of Statistics, University of South Carolina Stat 704: Data Analysis I 1 / 14 LOWESS IRLS LOWESS LOWESS (LOcally WEighted Scatterplot Smoothing)
More informationЭконометрика, , 4 модуль Семинар Для Группы Э_Б2015_Э_3 Семинарист О.А.Демидова
Эконометрика, 2017-2018, 4 модуль Семинар 3 160418 Для Группы Э_Б2015_Э_3 Семинарист ОАДемидова * Stata program * copyright C 2010 by A Colin Cameron and Pravin K Trivedi * used for "Microeconometrics
More informationEconometrics. 9) Heteroscedasticity and autocorrelation
30C00200 Econometrics 9) Heteroscedasticity and autocorrelation Timo Kuosmanen Professor, Ph.D. http://nomepre.net/index.php/timokuosmanen Today s topics Heteroscedasticity Possible causes Testing for
More informationApplied Statistics and Econometrics
Applied Statistics and Econometrics Lecture 5 Saul Lach September 2017 Saul Lach () Applied Statistics and Econometrics September 2017 1 / 44 Outline of Lecture 5 Now that we know the sampling distribution
More informationLab 6 - Simple Regression
Lab 6 - Simple Regression Spring 2017 Contents 1 Thinking About Regression 2 2 Regression Output 3 3 Fitted Values 5 4 Residuals 6 5 Functional Forms 8 Updated from Stata tutorials provided by Prof. Cichello
More information1 Linear Regression Analysis The Mincer Wage Equation Data Econometric Model Estimation... 11
Econ 495 - Econometric Review 1 Contents 1 Linear Regression Analysis 4 1.1 The Mincer Wage Equation................. 4 1.2 Data............................. 6 1.3 Econometric Model.....................
More information1: a b c d e 2: a b c d e 3: a b c d e 4: a b c d e 5: a b c d e. 6: a b c d e 7: a b c d e 8: a b c d e 9: a b c d e 10: a b c d e
Economics 102: Analysis of Economic Data Cameron Spring 2015 Department of Economics, U.C.-Davis Final Exam (A) Saturday June 6 Compulsory. Closed book. Total of 56 points and worth 45% of course grade.
More informationEconomics 620, Lecture 19: Introduction to Nonparametric and Semiparametric Estimation
Economics 620, Lecture 19: Introduction to Nonparametric and Semiparametric Estimation Nicholas M. Kiefer Cornell University Professor N. M. Kiefer (Cornell University) Lecture 19: Nonparametric Analysis
More informationLecture 4: Multivariate Regression, Part 2
Lecture 4: Multivariate Regression, Part 2 Gauss-Markov Assumptions 1) Linear in Parameters: Y X X X i 0 1 1 2 2 k k 2) Random Sampling: we have a random sample from the population that follows the above
More informationMultivariate Regression: Part I
Topic 1 Multivariate Regression: Part I ARE/ECN 240 A Graduate Econometrics Professor: Òscar Jordà Outline of this topic Statement of the objective: we want to explain the behavior of one variable as a
More informationEconometrics Homework 1
Econometrics Homework Due Date: March, 24. by This problem set includes questions for Lecture -4 covered before midterm exam. Question Let z be a random column vector of size 3 : z = @ (a) Write out z
More informationRemedial Measures for Multiple Linear Regression Models
Remedial Measures for Multiple Linear Regression Models Yang Feng http://www.stat.columbia.edu/~yangfeng Yang Feng (Columbia University) Remedial Measures for Multiple Linear Regression Models 1 / 25 Outline
More informationQuestion 1a 1b 1c 1d 1e 2a 2b 2c 2d 2e 2f 3a 3b 3c 3d 3e 3f M ult: choice Points
Economics 102: Analysis of Economic Data Cameron Spring 2016 May 12 Department of Economics, U.C.-Davis Second Midterm Exam (Version A) Compulsory. Closed book. Total of 30 points and worth 22.5% of course
More informationEconometrics I KS. Module 2: Multivariate Linear Regression. Alexander Ahammer. This version: April 16, 2018
Econometrics I KS Module 2: Multivariate Linear Regression Alexander Ahammer Department of Economics Johannes Kepler University of Linz This version: April 16, 2018 Alexander Ahammer (JKU) Module 2: Multivariate
More informationMachine Learning for Microeconometrics
Machine Learning for Microeconometrics A. Colin Cameron Univ. of California- Davis Abstract: These slides attempt to explain machine learning to empirical economists familiar with regression methods. The
More informationIntroduction to Regression
Introduction to Regression p. 1/97 Introduction to Regression Chad Schafer cschafer@stat.cmu.edu Carnegie Mellon University Introduction to Regression p. 1/97 Acknowledgement Larry Wasserman, All of Nonparametric
More informationSTATISTICS 110/201 PRACTICE FINAL EXAM
STATISTICS 110/201 PRACTICE FINAL EXAM Questions 1 to 5: There is a downloadable Stata package that produces sequential sums of squares for regression. In other words, the SS is built up as each variable
More information41903: Introduction to Nonparametrics
41903: Notes 5 Introduction Nonparametrics fundamentally about fitting flexible models: want model that is flexible enough to accommodate important patterns but not so flexible it overspecializes to specific
More informationFunctional Form. So far considered models written in linear form. Y = b 0 + b 1 X + u (1) Implies a straight line relationship between y and X
Functional Form So far considered models written in linear form Y = b 0 + b 1 X + u (1) Implies a straight line relationship between y and X Functional Form So far considered models written in linear form
More informationSimultaneous Equations with Error Components. Mike Bronner Marko Ledic Anja Breitwieser
Simultaneous Equations with Error Components Mike Bronner Marko Ledic Anja Breitwieser PRESENTATION OUTLINE Part I: - Simultaneous equation models: overview - Empirical example Part II: - Hausman and Taylor
More informationApplied Statistics and Econometrics
Applied Statistics and Econometrics Lecture 6 Saul Lach September 2017 Saul Lach () Applied Statistics and Econometrics September 2017 1 / 53 Outline of Lecture 6 1 Omitted variable bias (SW 6.1) 2 Multiple
More informationLecture notes to Stock and Watson chapter 8
Lecture notes to Stock and Watson chapter 8 Nonlinear regression Tore Schweder September 29 TS () LN7 9/9 1 / 2 Example: TestScore Income relation, linear or nonlinear? TS () LN7 9/9 2 / 2 General problem
More informationNonlinear relationships Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised February 20, 2015
Nonlinear relationships Richard Williams, University of Notre Dame, https://www.nd.edu/~rwilliam/ Last revised February, 5 Sources: Berry & Feldman s Multiple Regression in Practice 985; Pindyck and Rubinfeld
More informationTime Series and Forecasting Lecture 4 NonLinear Time Series
Time Series and Forecasting Lecture 4 NonLinear Time Series Bruce E. Hansen Summer School in Economics and Econometrics University of Crete July 23-27, 2012 Bruce Hansen (University of Wisconsin) Foundations
More informationEconometrics I KS. Module 1: Bivariate Linear Regression. Alexander Ahammer. This version: March 12, 2018
Econometrics I KS Module 1: Bivariate Linear Regression Alexander Ahammer Department of Economics Johannes Kepler University of Linz This version: March 12, 2018 Alexander Ahammer (JKU) Module 1: Bivariate
More information1: a b c d e 2: a b c d e 3: a b c d e 4: a b c d e 5: a b c d e. 6: a b c d e 7: a b c d e 8: a b c d e 9: a b c d e 10: a b c d e
Economics 102: Analysis of Economic Data Cameron Spring 2016 Department of Economics, U.C.-Davis Final Exam (A) Tuesday June 7 Compulsory. Closed book. Total of 58 points and worth 45% of course grade.
More informationGeneral Linear Model (Chapter 4)
General Linear Model (Chapter 4) Outcome variable is considered continuous Simple linear regression Scatterplots OLS is BLUE under basic assumptions MSE estimates residual variance testing regression coefficients
More informationGraduate Econometrics Lecture 4: Heteroskedasticity
Graduate Econometrics Lecture 4: Heteroskedasticity Department of Economics University of Gothenburg November 30, 2014 1/43 and Autocorrelation Consequences for OLS Estimator Begin from the linear model
More informationStatistical Modelling in Stata 5: Linear Models
Statistical Modelling in Stata 5: Linear Models Mark Lunt Arthritis Research UK Epidemiology Unit University of Manchester 07/11/2017 Structure This Week What is a linear model? How good is my model? Does
More informationsociology 362 regression
sociology 36 regression Regression is a means of studying how the conditional distribution of a response variable (say, Y) varies for different values of one or more independent explanatory variables (say,
More informationConfidence intervals for kernel density estimation
Stata User Group - 9th UK meeting - 19/20 May 2003 Confidence intervals for kernel density estimation Carlo Fiorio c.fiorio@lse.ac.uk London School of Economics and STICERD Stata User Group - 9th UK meeting
More informationsociology 362 regression
sociology 36 regression Regression is a means of modeling how the conditional distribution of a response variable (say, Y) varies for different values of one or more independent explanatory variables (say,
More information4 Instrumental Variables Single endogenous variable One continuous instrument. 2
Econ 495 - Econometric Review 1 Contents 4 Instrumental Variables 2 4.1 Single endogenous variable One continuous instrument. 2 4.2 Single endogenous variable more than one continuous instrument..........................
More informationBusiness Statistics. Lecture 10: Course Review
Business Statistics Lecture 10: Course Review 1 Descriptive Statistics for Continuous Data Numerical Summaries Location: mean, median Spread or variability: variance, standard deviation, range, percentiles,
More informationRank Estimation of Partially Linear Index Models
Rank Estimation of Partially Linear Index Models Jason Abrevaya University of Texas at Austin Youngki Shin University of Western Ontario October 2008 Preliminary Do not distribute Abstract We consider
More informationEconometrics Midterm Examination Answers
Econometrics Midterm Examination Answers March 4, 204. Question (35 points) Answer the following short questions. (i) De ne what is an unbiased estimator. Show that X is an unbiased estimator for E(X i
More informationRegression #8: Loose Ends
Regression #8: Loose Ends Econ 671 Purdue University Justin L. Tobias (Purdue) Regression #8 1 / 30 In this lecture we investigate a variety of topics that you are probably familiar with, but need to touch
More informationAnswer all questions from part I. Answer two question from part II.a, and one question from part II.b.
B203: Quantitative Methods Answer all questions from part I. Answer two question from part II.a, and one question from part II.b. Part I: Compulsory Questions. Answer all questions. Each question carries
More informationECON3150/4150 Spring 2016
ECON3150/4150 Spring 2016 Lecture 4 - The linear regression model Siv-Elisabeth Skjelbred University of Oslo Last updated: January 26, 2016 1 / 49 Overview These lecture slides covers: The linear regression
More information4 Instrumental Variables Single endogenous variable One continuous instrument. 2
Econ 495 - Econometric Review 1 Contents 4 Instrumental Variables 2 4.1 Single endogenous variable One continuous instrument. 2 4.2 Single endogenous variable more than one continuous instrument..........................
More informationIntroduction to Regression
Introduction to Regression David E Jones (slides mostly by Chad M Schafer) June 1, 2016 1 / 102 Outline General Concepts of Regression, Bias-Variance Tradeoff Linear Regression Nonparametric Procedures
More informationProblem Set 10: Panel Data
Problem Set 10: Panel Data 1. Read in the data set, e11panel1.dta from the course website. This contains data on a sample or 1252 men and women who were asked about their hourly wage in two years, 2005
More informationAppendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator
Appendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator As described in the manuscript, the Dimick-Staiger (DS) estimator
More informationSoc 63993, Homework #7 Answer Key: Nonlinear effects/ Intro to path analysis
Soc 63993, Homework #7 Answer Key: Nonlinear effects/ Intro to path analysis Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised February 20, 2015 Problem 1. The files
More informationEmpirical Application of Simple Regression (Chapter 2)
Empirical Application of Simple Regression (Chapter 2) 1. The data file is House Data, which can be downloaded from my webpage. 2. Use stata menu File Import Excel Spreadsheet to read the data. Don t forget
More informationECON2228 Notes 2. Christopher F Baum. Boston College Economics. cfb (BC Econ) ECON2228 Notes / 47
ECON2228 Notes 2 Christopher F Baum Boston College Economics 2014 2015 cfb (BC Econ) ECON2228 Notes 2 2014 2015 1 / 47 Chapter 2: The simple regression model Most of this course will be concerned with
More informationIntroduction to Nonparametric and Semiparametric Estimation. Good when there are lots of data and very little prior information on functional form.
1 Introduction to Nonparametric and Semiparametric Estimation Good when there are lots of data and very little prior information on functional form. Examples: y = f(x) + " (nonparametric) y = z 0 + f(x)
More informationEconometrics II Censoring & Truncation. May 5, 2011
Econometrics II Censoring & Truncation Måns Söderbom May 5, 2011 1 Censored and Truncated Models Recall that a corner solution is an actual economic outcome, e.g. zero expenditure on health by a household
More informationTHE MULTIVARIATE LINEAR REGRESSION MODEL
THE MULTIVARIATE LINEAR REGRESSION MODEL Why multiple regression analysis? Model with more than 1 independent variable: y 0 1x1 2x2 u It allows : -Controlling for other factors, and get a ceteris paribus
More informationGMM Estimation in Stata
GMM Estimation in Stata Econometrics I Department of Economics Universidad Carlos III de Madrid Master in Industrial Economics and Markets 1 Outline Motivation 1 Motivation 2 3 4 2 Motivation 3 Stata and
More informationAcknowledgements. Outline. Marie Diener-West. ICTR Leadership / Team INTRODUCTION TO CLINICAL RESEARCH. Introduction to Linear Regression
INTRODUCTION TO CLINICAL RESEARCH Introduction to Linear Regression Karen Bandeen-Roche, Ph.D. July 17, 2012 Acknowledgements Marie Diener-West Rick Thompson ICTR Leadership / Team JHU Intro to Clinical
More informationThe Simple Linear Regression Model
The Simple Linear Regression Model Lesson 3 Ryan Safner 1 1 Department of Economics Hood College ECON 480 - Econometrics Fall 2017 Ryan Safner (Hood College) ECON 480 - Lesson 3 Fall 2017 1 / 77 Bivariate
More informationLab 07 Introduction to Econometrics
Lab 07 Introduction to Econometrics Learning outcomes for this lab: Introduce the different typologies of data and the econometric models that can be used Understand the rationale behind econometrics Understand
More informationProblem Set 1 ANSWERS
Economics 20 Prof. Patricia M. Anderson Problem Set 1 ANSWERS Part I. Multiple Choice Problems 1. If X and Z are two random variables, then E[X-Z] is d. E[X] E[Z] This is just a simple application of one
More informationProblem Set #5-Key Sonoma State University Dr. Cuellar Economics 317- Introduction to Econometrics
Problem Set #5-Key Sonoma State University Dr. Cuellar Economics 317- Introduction to Econometrics C1.1 Use the data set Wage1.dta to answer the following questions. Estimate regression equation wage =
More informationMultiple Choice Questions (circle one part) 1: a b c d e 2: a b c d e 3: a b c d e 4: a b c d e 5: a b c d e
Economics 102: Analysis of Economic Data Cameron Fall 2005 Department of Economics, U.C.-Davis Final Exam (A) Tuesday December 16 Compulsory. Closed book. Total of 56 points and worth 40% of course grade.
More informationIntroduction to Regression
Introduction to Regression Chad M. Schafer May 20, 2015 Outline General Concepts of Regression, Bias-Variance Tradeoff Linear Regression Nonparametric Procedures Cross Validation Local Polynomial Regression
More informationEcon 582 Nonparametric Regression
Econ 582 Nonparametric Regression Eric Zivot May 28, 2013 Nonparametric Regression Sofarwehaveonlyconsideredlinearregressionmodels = x 0 β + [ x ]=0 [ x = x] =x 0 β = [ x = x] [ x = x] x = β The assume
More informationSociology 740 John Fox. Lecture Notes. 1. Introduction. Copyright 2014 by John Fox. Introduction 1
Sociology 740 John Fox Lecture Notes 1. Introduction Copyright 2014 by John Fox Introduction 1 1. Goals I To introduce the notion of regression analysis as a description of how the average value of a response
More informationSplineLinear.doc 1 # 9 Last save: Saturday, 9. December 2006
SplineLinear.doc 1 # 9 Problem:... 2 Objective... 2 Reformulate... 2 Wording... 2 Simulating an example... 3 SPSS 13... 4 Substituting the indicator function... 4 SPSS-Syntax... 4 Remark... 4 Result...
More informationEssential of Simple regression
Essential of Simple regression We use simple regression when we are interested in the relationship between two variables (e.g., x is class size, and y is student s GPA). For simplicity we assume the relationship
More informationEmpirical Asset Pricing
Department of Mathematics and Statistics, University of Vaasa, Finland Texas A&M University, May June, 2013 As of May 24, 2013 Part III Stata Regression 1 Stata regression Regression Factor variables Postestimation:
More informationOutline. Linear OLS Models vs: Linear Marginal Models Linear Conditional Models. Random Intercepts Random Intercepts & Slopes
Lecture 2.1 Basic Linear LDA 1 Outline Linear OLS Models vs: Linear Marginal Models Linear Conditional Models Random Intercepts Random Intercepts & Slopes Cond l & Marginal Connections Empirical Bayes
More informationBinary Dependent Variables
Binary Dependent Variables In some cases the outcome of interest rather than one of the right hand side variables - is discrete rather than continuous Binary Dependent Variables In some cases the outcome
More informationNonlinear Regression Functions
Nonlinear Regression Functions (SW Chapter 8) Outline 1. Nonlinear regression functions general comments 2. Nonlinear functions of one variable 3. Nonlinear functions of two variables: interactions 4.
More information1 Warm-Up: 2 Adjusted R 2. Introductory Applied Econometrics EEP/IAS 118 Spring Sylvan Herskowitz Section #
Introductory Applied Econometrics EEP/IAS 118 Spring 2015 Sylvan Herskowitz Section #10 4-1-15 1 Warm-Up: Remember that exam you took before break? We had a question that said this A researcher wants to
More information12 - Nonparametric Density Estimation
ST 697 Fall 2017 1/49 12 - Nonparametric Density Estimation ST 697 Fall 2017 University of Alabama Density Review ST 697 Fall 2017 2/49 Continuous Random Variables ST 697 Fall 2017 3/49 1.0 0.8 F(x) 0.6
More informationIntroduction to Regression
Introduction to Regression Chad M. Schafer cschafer@stat.cmu.edu Carnegie Mellon University Introduction to Regression p. 1/100 Outline General Concepts of Regression, Bias-Variance Tradeoff Linear Regression
More information1 A Review of Correlation and Regression
1 A Review of Correlation and Regression SW, Chapter 12 Suppose we select n = 10 persons from the population of college seniors who plan to take the MCAT exam. Each takes the test, is coached, and then
More informationNonparametric Regression
Nonparametric Regression Econ 674 Purdue University April 8, 2009 Justin L. Tobias (Purdue) Nonparametric Regression April 8, 2009 1 / 31 Consider the univariate nonparametric regression model: where y
More informationProblem Set #3-Key. wage Coef. Std. Err. t P> t [95% Conf. Interval]
Problem Set #3-Key Sonoma State University Economics 317- Introduction to Econometrics Dr. Cuellar 1. Use the data set Wage1.dta to answer the following questions. a. For the regression model Wage i =
More informationRegression Discontinuity Design
Regression Discontinuity Design Marcelo Coca Perraillon University of Chicago May 13 & 18, 2015 1 / 51 Introduction Plan Overview of RDD Meaning and validity of RDD Several examples from the literature
More informationLecture#12. Instrumental variables regression Causal parameters III
Lecture#12 Instrumental variables regression Causal parameters III 1 Demand experiment, market data analysis & simultaneous causality 2 Simultaneous causality Your task is to estimate the demand function
More informationECONOMETRICS FIELD EXAM Michigan State University May 9, 2008
ECONOMETRICS FIELD EXAM Michigan State University May 9, 2008 Instructions: Answer all four (4) questions. Point totals for each question are given in parenthesis; there are 00 points possible. Within
More informationECON Introductory Econometrics. Lecture 13: Internal and external validity
ECON4150 - Introductory Econometrics Lecture 13: Internal and external validity Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 9 Lecture outline 2 Definitions of internal and external
More informationFöreläsning /31
1/31 Föreläsning 10 090420 Chapter 13 Econometric Modeling: Model Speci cation and Diagnostic testing 2/31 Types of speci cation errors Consider the following models: Y i = β 1 + β 2 X i + β 3 X 2 i +
More informationConsider Table 1 (Note connection to start-stop process).
Discrete-Time Data and Models Discretized duration data are still duration data! Consider Table 1 (Note connection to start-stop process). Table 1: Example of Discrete-Time Event History Data Case Event
More informationLecture 8: Functional Form
Lecture 8: Functional Form What we know now OLS - fitting a straight line y = b 0 + b 1 X through the data using the principle of choosing the straight line that minimises the sum of squared residuals
More information