Day 4 Nonlinear methods
|
|
- Cody McDowell
- 6 years ago
- Views:
Transcription
1 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 using Stata (MUS), Stata Press. and A. Colin Cameron and Pravin K. Trivedi (2005), Microeconometrics: Methods and Applications (MMA), C.U.P. March 21-25, 2011 c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program in March Economics 21-25,. Based 2011 on A. 1 Colin / 52 C
2 1. ntroduction 1. ntroduction Consider nonlinear estimator, one for which there is no explicit solution for bθ. example we work with is Poisson MLE Topics include interpreting coe cients general estimation theory key nonlinear estimators: MLE and NLS calculating marginal e ects statistical inference computational methods c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program in March Economics 21-25,. Based 2011 on A. 2 Colin / 52 C
3 1. ntroduction Overview 1 ntroduction 2 Poisson Regression 3 Data example 4 Marginal e ects 5 Estimation theory 6 Maximum likelihood estimator 7 Nonlinear least squares estimator 8 Statistical inference 9 Gradient methods 10 Appendix: Theory for Extremum Estimator 11 Appendix: Theory for Poisson MLE c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program in March Economics 21-25,. Based 2011 on A. 3 Colin / 52 C
4 2. Poisson Regression Model 2. Poisson Regression Model Poisson regression is a leading example of a nonlinear model. Consider count data with y = 0, 1, 2,... OLS has problem that E[y i jx i ] = xi 0 β < 0 is possible And OLS is ine cient (based on homoskedasticity, normality). So what do we do? Starting point from statistics is Poisson: Poisson density (or more precisely probability mass function): Pr[Y = yjµ] = e µ µ y /y! where µ = E[y] > 0, V[y] = µ, y! = y (y 1) 1. For regression the mean µ > 0 varies with regressors x Conditional mean for Poisson regression model: where x i and β are K 1 vectors. µ i = E[y i jx i ] = exp(x 0 i β), µ i > 0 c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program in March Economics 21-25,. Based 2011 on A. 4 Colin / 52 C
5 2. Poisson Regression Maximum Likelihood Maximum likelihood Likelihood principle Likelihood principle says choose that value of β which makes the probability of observing our data (y, X) as high as possible. Joint density f (yjx, β) gives probability of observing y given β (and X). Likelihood L(βjy, X) = f (yjx, β) reinterprets as probability of β given y (and X). Maximize the likelihood, or equivalently the log-likelihood. n general f (y i jx i, β) is conditional (on x i ) density for one observation. f (yjx, β) = f (y 1 jx 1, θ) f (y N jx N, θ) = N i =1 f (y i jx i, β) is joint conditional density for N independent observations. L(βjy, X) = N i =1 f (y i jx i, β) is the likelihood function. ln L(βjy, X) = ln( N i =1 f (y i jx i, β)) = N i =1 ln f (y i jx i, β) is the log-likelihood function. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program in March Economics 21-25,. Based 2011 on A. 5 Colin / 52 C
6 2. Poisson Regression MLE for Poisson MLE for Poisson Conditional density for one observation is e µ µ y /y! with µ = e x0 β f (y i jx i, β) = exp( exp(xi 0 β)) exp(xi 0 β) y i /y i! ln f (y i jx i, β) = exp(xi 0 β) + y i xi 0 β ln(y i!) Log-likelihood for N independent observations: ln L(β) = N i=1 ln f (y i jx i, β) = N i=1 f exp(x0 i β) + y i x 0 i β ln(y i!)g. Di erentiate w.r.t. β: ln L(β) β = N i=1 f exp(x0 i β)x i + y i x i g = N i=1 (y i exp(x 0 i β))x i ML rst-order conditions N i=1 (y i exp(x 0 i β))x i = 0. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program in March Economics 21-25,. Based 2011 on A. 6 Colin / 52 C
7 2. Poisson Regression The Complications The Complications We cannot solve the nonlinear rst-order conditions in β. How do we compute β? b F Use an iterative gradient method such as Newton-Raphson. How do we do asymptotic theory for b β? F Linearize the nonlinear rst-order conditions. The conditional mean E[yjx] is nonlinear in x and β. How do we interpret β? F Use the marginal e ect E[y jx]/ x = exp(x 0 β)β. F This varies with the evaluation point x. Similar complications hold for all nonlinear models. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program in March Economics 21-25,. Based 2011 on A. 7 Colin / 52 C
8 3. Data Example Poisson for Doctor visits 3. Data Example: Poisson for doctor visits Data from MUS chapter 10. Use Poisson regression as dependent variable docvis is a count.. use mus10data.dta, clear. quietly keep if year02==1. describe docvis private chronic female income storage display value variable name type format label variable label docvis int %8.0g number of doctor visits private byte %8.0g = 1 if private insurance chronic byte %8.0g = 1 if a chronic condition female byte %8.0g = 1 if female income float %9.0g ncome in $ / summarize docvis private chronic female income Variable Obs Mean Std. Dev. Min Max docvis private chronic female income c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program in March Economics 21-25,. Based 2011 on A. 8 Colin / 52 C
9 3. Data Example Poisson for Doctor visits. histogram docvis if docvis < 40, width(1) Density number of doctor visits c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program in March Economics 21-25,. Based 2011 on A. 9 Colin / 52 C
10 3. Data Example Poisson MLE Poisson MLE: default standard errors (do not use) Converges quickly (2 iterations) and coe cients highly statistically signi cant.. poisson docvis private chronic female income teration 0: log likelihood = teration 1: log likelihood = teration 2: log likelihood = Poisson regression Number of obs = 4412 LR chi2(4) = Prob > chi2 = Log likelihood = Pseudo R2 = docvis Coef. Std. Err. z P> z [95% Conf. nterval] private chronic female income _cons c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 10 Colin / 52 C
11 3. Data Example Robust standard errors Poisson MLE: robust standard errors (use these) Same coe cient estimates, di erent s.e. s, still highly statistically signi cant.. poisson docvis private chronic female income, vce(robust) teration 0: log pseudolikelihood = teration 1: log pseudolikelihood = teration 2: log pseudolikelihood = Poisson regression Number of obs = 4412 Wald chi2(4) = Prob > chi2 = Log pseudolikelihood = Pseudo R2 = Robust docvis Coef. Std. Err. z P> z [95% Conf. nterval] private chronic female income _cons c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 11 Colin / 52 C
12 3. Data Example Robust standard errors For Poisson the default standard errors can be much too small. Reason: Algebra reveals that the default s.e. s are based on Poisson assumption that V[y] = µ and instead for these data V[y] >> µ.. * Comparison of standard errors. quietly poisson docvis private chronic female income. estimates store DEFAULT. quietly poisson docvis private chronic female income, vce(robust). estimates store ROBUST. estimates table DEFAULT ROBUST, b(%9.4f) se(%9.3f) stats(n r2 F) Variable DEFAULT ROBUST private chronic female income _cons N r2 F legend: b/se c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 12 Colin / 52 C
13 4. Marginal e ects 4. Marginal e ects nterpret coe cients using ME j = E[y jx] x j, the marginal e ect on the conditional mean of a one unit change in the j th regressor. For Poisson ME j = E[y jx] x j = exp(x0 β) x j = exp(x 0 β)β j. 1. For Poisson the sign of β j equals the sign of ME j Reason: exp(x 0 β) > For Poisson if β j is twice β k then ME j is twice ME k Reason: ME j MEk = exp(x0 β)β j exp(x 0 β)β k = β j β. k This is the case for any single-index model with E[yjx] = g(x 0 β). 3. ME j di ers with the point of evaluation x 4. For Poisson: β j is a semi-elasticity since ME j /E[yjx] = β j. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 13 Colin / 52 C
14 4. Marginal e ects AME, MEM and MER AME, MEM and MER: Three estimates of ME 1. AME: Average marginal e ect = 1 N N i=1me j. Stata 11: margins, dydx(*) or Stata 10 add-on margeff. 2. MEM: Marginal e ect at mean = ME at x = x. Stata 11: margins, dydx(*) atmean or Stata 10 mfx. 3. MER: Marginal e ect at a representative value = ME at x = x. Stata 11: margins, dydx(*) at() or Stata 10 mfx. For Poisson these are (1) 1 N N i =1 exp(x0 i b β); (2) exp(x 0 b β); (3) exp(x 0b β). Preceding method uses derivatives. For discrete regressors use nite di erence method F ME = E[y jd = 1, x] E[y jd = 0, x] c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 14 Colin / 52 C
15 4. Marginal e ects Data Example Average Marginal e ect (AME) Large e ects: e.g. Doctor visits 90% higher for female Here AME is 10%-40% higher than MEM. * Marginal effects AME and MEM. margins, dydx(*) Warning: cannot perform check for estimable functions. Average marginal effects Number of obs = 4412 Model VCE : Robust Expression : Predicted number of events, predict() dy/dx w.r.t. : private chronic female income Delta-method dy/dx Std. Err. z P> z [95% Conf. nterval] private chronic female income c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 15 Colin / 52 C
16 4. Marginal e ects Data Example Marginal e ect at mean (MEM) Here AME was about 10%-40% higher than MEM. * Marginal effects AME. margins, dydx(*) atmean Warning: cannot perform check for estimable functions. Conditional marginal effects Number of obs = 4412 Model VCE : Robust Expression : Predicted number of events, predict() dy/dx w.r.t. : private chronic female income at : private = (mean) chronic = (mean) female = (mean) income = (mean) Delta-method dy/dx Std. Err. z P> z [95% Conf. nterval] private chronic female income c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 16 Colin / 52 C
17 4. Marginal e ects Data Example Finite di erence method used to compute AME Use pre x i. to declare regressors as indicator variables Compared to calculus AME: F lower for private, higher for chronic, similar for female.. * Marginal effects using finite difference for binary regressors. quietly poisson docvis i.private i.chronic i.female income, vce(robust). margins, dydx(*) Average marginal effects Number of obs = 4412 Model VCE : Robust Expression : Predicted number of events, predict() dy/dx w.r.t. : 1.private 1.chronic 1.female income Delta-method dy/dx Std. Err. z P> z [95% Conf. nterval] 1.private chronic female income Note: dy/dx for factor levels is the discrete change from the base level. More generally pre xes i. and c. create factor variables to get marginal e ects with interactions. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 17 Colin / 52 C
18 5. Estimation Theory m-estimator 5. Estimation Theory: m-estimator An m-estimator bθ of the q 1 parameter vector θ maximizes Q N (θ) = 1 N N i=1 q(y i, x i, θ). Q N (θ) is the average or sum of N scalar sub-functions q i (). MLE: q(y i, x i, θ) = ln f (y i jx i, θ). OLS: q(y i, x i, β) = 1 2 (y i xi 0 β)2. NLS: q(y i, x i, β) = 1 2 (y i g(x i, β)) 2 for speci ed g(x i, β). Consider the local maximum of Q N (θ) that solves the estimating equation 1 q(y i, x i, θ) N N i=1 θ = 0. b θ c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 18 Colin / 52 C
19 5. Estimation Theory Consistency Consistency nformally bθ! p θ 0 if the sample condition 1 N N i=1 holds in the population: ] = 0. θ0 E[ q(y i,x i,θ) θ q(y i,x i,θ) θ = 0 b θ Here θ 0 is the true value in the data generating process (d.g.p.). Formal condition: bθ! p θ 0 if plim Q N (θ) is maximized at θ = θ 0. For Poisson with 1 N N i=1(y i exp(xi 0β))x i = 0 we require E[(y i exp(xi 0 β 0 ))x i ] = 0, which is the case if E[y i jx i ] = exp(xi 0 β 0 ). Poisson MLE consistent if the conditional mean is correctly speci ed. For other models correct mean may be insu cient for consistency. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 19 Colin / 52 C
20 5. Estimation Theory Asymptotic normality Asymptotic normality De ne the following: gradient term: g i (θ) = q i (θ)/ θ. Hessian term: H i (θ) = 2 q i (θ)/ θ θ 0 = g i (θ)/ θ 0 Asymptotic normality: bθ a N [θ 0, V[bθ]], The variance-covariance matrix of the estimator (VCE) is V[bθ] = (E [ i H i (θ)]) 1 E i j g i (θ)g j (θ) 0 E i H i (θ) 0 1 f data are independent over i we use the robust sandwich estimate V[bθ] = 1 i H i (bθ) i g i (bθ)g i (bθ) 0 i H i (bθ) 0 1 c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 20 Colin / 52 C
21 5. Estimation Theory Limit normal derivation Limit normal derivation The rst-order conditions are 1 N N i=1 g i (bθ) = 0. An exact- rst order Taylor series expansion yields 1 N i g i (bθ) = 1 N i g i (θ 0 ) + 1 N i g i (θ) θ 0 θ + ( bθ θ 0 ) = 1 N i g i (θ 0 ) + 1 N i H i (θ + )(bθ θ 0 ). Set this to zero ( rst-order conditions) and solve (bθ θ 0 ) = 1 N i H i (θ + ) 1 1 N i g i (θ 0 ) Linearized so like ( β b 1 β 0 ) = 1N i x i x 1N i i x i u i. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 21 Colin / 52 C
22 5. Estimation Theory Limit normal derivation We have p N( bθ θ 0 ) = 1 1 N i H i (θ + 1 ) p N i g i (θ 0 ) by a LLN and a CLT, where d! A0 1 N [0, B 0 ] d! N [0, A0 1 B 0A0 1] A 0 = plim 1 N i H i (θ 0 ) = lim E[ 1 N i H i (θ 0 )] B 0 = plim 1 N i j g i (θ 0 )g j (θ 0 ) 0 = lim E[ 1 N i j g i (θ 0 )g j (θ 0 ) 0 ] c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 22 Colin / 52 C
23 5. Estimation Theory Di erent Estimates of the VCE Di erent Estimates of the VCE Need to get estimate bv[bθ] of V[bθ] V[bθ] = (E [ i H i (θ)]) 1 E i j g i (θ)g j (θ) 0 (E [ i H i (θ) 0 ]) 1 Leading estimates Robust for independent: 1 bv rob [bθ] = i bh 1 N i N q i bg i bg 0 i i bh i Cluster-robust: 1 1 bv clus [bθ] = c bh C cc C 1 c bg c bg c 0 c bh cc Default for MLE: 1 bv def [bθ] = i E[H i (θ)]j b θ Clusters rewrite f.o.c. as C c=1 g c (bθ) = 0 for the c th of C clusters, where g c (θ) = i :i2c g i (θ). c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 23 Colin / 52 C
24 5. Estimation Theory Poisson Example Poisson Example For Poisson example N i=1 g i (β) = N i=1(y i exp(x 0 i β))x i N i=1 H i (β) = N i=1 exp(x 0 i β)x i x 0 i Three standard estimates are bv rob [ β] b = i e x0 bβ 1 i x i xi 0 i (y i e x0 bβ i ) 2 x i x 0 i i e x0 bβ i x i xi 0 bv clu [ β] b = i e x0 bβ 1 i x i xi 0 C c C 1 c bg c bg c 0 i e x0 bβ i x i xi 0 bv def [ β] b = i e x0 bβ 1 i x i xi bv clu [ b β] used bg c = i :i 2c (y i e x0 i bβ )x i. bv def [ b β] relies on E[(y i e x0 i β ) 2 ] = e x0 i β (so imposes V[yjx] = E[yjx]). c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 24 Colin / 52 C
25 6. Maximum likelihood estimator Properties 6. Maximum Likelihood Estimator (MLE) Special case of the preceding m-estimator theory. With N independent observations bθ ML maximizes the log-likelihood function: ln L(θ) = ln N i=1 f (y i jx i, θ) = N i=1 ln f (y i jx i, θ). The following properties hold provided essentially that 1. the true density is f (y i jx i, θ 0 ); and 2. the range of y does not depend on θ (regularity conditions) The MLE is consistent: bθ ML p! θ0. The MLE is asymptotically normal: bθ ML V[bθ ML ] = h 1 N i=1 E ln fi ln f i θ θ = ibθ 0 a N [θ, V[ bθ ML ]] with h N i=1 E 2 1 ln f i θ θ. ibθ 0 c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 25 Colin / 52 C
26 6. Maximum likelihood estimator Terminology ML Terminology Score: ln L(θ)/ θ. For correctly speci ed model E[ ln L(θ)/ θ] = 0. h i h i ln L(θ) nformation matrix: V θ = ln L(θ) ln L(θ) E θ θ 0. nformation matrix equality: h i h i ln L(θ) ln L(θ) E θ = θ 0 E 2 ln L(θ) θ θ 0 Holds if density correctly speci ed The asymptotic variance of the MLE is minus the inverse of the information matrix. The MLE is fully e cient as its variance matrix is the Cramer-Rao lower bound. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 26 Colin / 52 C
27 6. Maximum likelihood estimator Quasi-MLE Quasi-MLE: Misspeci ed density What if f (y i jx i, θ) is misspeci ed? The MLE is then called the quasi-mle or pseudo-mle The quasi-mle is inconsistent in general. p bθ QML! θ that maximizes plim N 1 ln L(θ). n general θ 6= θ 0, though there are some notable exceptions. θ = θ 0 if the speci ed density is in the linear exponential family (Poisson, binomial, one-parameter gamma, normal) and E[y jx] is correctly speci ed. The quasi-mle is still asymptotically normal with bθ QML a N [θ, V[bθ QML ]]. Given independence over i, robust standard errors are based on h i bv[bθ QML ] = i E 2 ln f i b 1 h i θ θ 0 i E ln fi ln f i b 1 θ θ θ 0 θ h i i E 2 ln f i b 1 θ θ. 0 θ c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 27 Colin / 52 C
28 7. Nonlinear least squares De nition 7. Nonlinear Least Squares: De nition Nonlinear regression model: y i = g(x i, β) + u i, where the function g() is speci ed. Exponential mean example: g(x i, β) = exp(x 0 i β). Nonlinear least squares (NLS) estimator b β NLS minimizes the sum of squared residuals S N (β) = N i=1 (y i g(x i, β)) 2. There is no explicit solution for b β NLS in general. So compute using iterative gradient methods. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 28 Colin / 52 C
29 7. Nonlinear least squares Properties Nonlinear Least Squares: Properties Assume that E[y i jx i ] = g(x i, β) so conditional mean correct. NLS is consistent and asymptotically normal with a bβ NLS N [β, V[ βnls b ]]. Given independence over i robust estimate of VCE is bv[ b β] = N i=1 g i g β i bβ N i=1 bu 2 i g i β 1 bβ β 0 g i bβ bβ β 0 N i=1 g i g β i bβ β 0 bβ 1 where bu i = (y i g(x i, b β)) is the NLS residual. Exactly the same as OLS except g i / βj bβ replaces x i! c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 29 Colin / 52 C
30 7. Nonlinear least squares Data Example NLS regression for the model y = exp(x 0 β) + u.. * Nonlinear least-squares regression (command nl). generate one = 1. nl (docvis = exp({xb: private chronic female income one})), vce(robust) nolog (obs = 4412) Nonlinear regression Number of obs = 4412 R-squared = Adj R-squared = Root MSE = Res. dev. = Robust docvis Coef. Std. Err. t P> t [95% Conf. nterval] /xb_private /xb_chronic /xb_female /xb_income /xb_one NLS slope coe s are: 0.71, 1.06, 0.43, Poisson slope coe s: 0.79, 1.09, 0.49, NLS robust standard errors are: 0.109, 0.056, 0.069, Poisson robust standard errors: 0.109, 0.056, 0.058, c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 30 Colin / 52 C
31 8. Statistical inference Wald test 8. Statistical inference: Wald test Wald test of linear restrictions on θ: same method as for OLS. Wald test of h nonlinear restrictions: H 0 : h(θ) = 0 against H a : h(θ) 6= 0. Base test on does h(bθ) ' 0? By Taylor series with R = h(θ)/ θ 0 The Wald test statistics are h(bθ) ' h(θ) + br(bθ θ) = br(bθ θ) under H 0 : h(θ) = 0 a N [0, brv[bθ]br 0 ] W = h(bθ) 0 [brbv[bθ]br 0 ] 1 h(bθ) a χ 2 (h) under H 0 F = (W/h) a F (h, N q) under H 0. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 31 Colin / 52 C
32 8. Statistical inference Con dence interval (delta method) Con dence interval (delta method) Consider scalar γ = g(θ) for speci ed function g(). A 95% con dence interval for γ is then bγ 1.96 sbγ 2. where sbγ 2 = γ b θ 0 bv[bθ] γ θ θ. b θ Derivation: g(bθ) ' g(θ) + g 0 (bθ)(bθ θ) bγ ' γ + γ b ( bθ θ) θ 0 θ Var[bγ] = γ b Var[ bθ] γ θ 0 θ θ b θ called the delta method as derivative taken. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 32 Colin / 52 C
33 8. Statistical inference Data example Data example Wald test of H 0 : β 2 /β 2 = 1 against H a : β 2 /β 2 = 1. 95% con dence interval for γ = β 2 /β * Wald test of nonlinear hypothesis. quietly poisson docvis private chronic female income, vce(robust). testnl _b[female]/_b[private]=1 (1) _b[female]/_b[private] = 1 chi2(1) = Prob > chi2 = * Delta method confidence interval. nlcom _b[female]/_b[private] - 1 _nl_1: _b[female]/_b[private] - 1 docvis Coef. Std. Err. z P> z [95% Conf. nterval] _nl_ Reject H 0 as p = ; 95% conf. interval is ( 0.59, 0.18). c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 33 Colin / 52 C
34 8. Statistical inference Likelihood-based tests Likelihood-based tests Test H 0 : h(θ 0 ) = 0 which imposes h restrictions. Three tests Wald, likelihood ratio, and Lagrange multiplier (or score) test are asymptotically equivalent under H 0 (all χ 2 (h)) asymptotically equivalent under local alternatives h(θ 0 ) = c/ p N. Wald most often used as can robustify. De ne L(θ) is the likelihood function. bθ u = unrestricted MLE that maximizes ln L(θ). eθ r = restricted MLE that maximizes ln L(θ) λ 0 h(θ). (where λ is vector of Lagrangian multipliers.) c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 34 Colin / 52 C
35 8. Statistical inference Likelihood-based tests 1 Wald test: Does h(bθ u ) ' 0? W = h(bθ u ) 0 [brv[ b β]br 0 ] 1 h(bθ u ). 2 Likelihood Ratio Test: Does ln L(eθ r ) ' ln L(bθ u )? LR = 2[ln L(eθ r ) ln L(bθ u )]. 3 Score test: Does ln L(θ)/ θ ' 0 when evaluated at θ = eθ r? [L(θ) is for unrestricted model so ln L(θ)/ θ = 0 at θ = bθ u ]. Score = LM = ln L e θ 0 (N ea 1 ) ln L θ θ r 4 LM test: does Lagrange multiplier λ e r ' 0? Equals 3. as maximizing ln L(θ) λ 0 h(θ) w.r.t. θ implies λ e r. e θ r ln L θ e θ r = h(θ)0 θ Score vector is a full rank matrix multiple of the Lagrange multipliers. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 35 Colin / 52 C e θ r
36 9. Gradient methods De nition 11. Gradient methods Consider estimator bθ that is a local maximum, solving g(bθ) = 0, where g(θ) = Q (θ) θ. terative gradient methods update the s th round estimate bθ s by a matrix weighted average of the gradient bθ s+1 = bθ s + A s g(bθ s ), s = 1,..., S. motivation: change bθ in direction with greatest impact on Q(bθ) i.e. where the gradient is largest, though need to scale the gradient. the weighting matrix A s is a q q matrix that depends on bθ s Newton-Raphson is leading example with A s = H(θ) = g (θ) θ 0 1 = 2 Q (θ) θ θ 0 1 is the Hessian matrix for the optimization problem. H(bθ s ) 1, where c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 36 Colin / 52 C
37 9. Gradient methods Newton-Raphson Newton-Raphson Motivate NR: second-order Taylor series expansion around bθ s Q(θ) = Q(bθ s ) + g(bθ s ) 0 (θ bθ s ) (θ bθ s ) 0 H(bθ s )(θ bθ s ) + R, where R is a remainder that we now ignore. Maximize the approximation Q (θ) w.r.t. respect to θ. Q (θ) θ = g(bθ s ) + H(bθ s )(θ bθ s ) = 0. Solving yields the Newton-Raphson iteration (θ bθ s ) = H(bθ s ) 1 g(bθ s ). This increases Q(θ) if H(bθ s ) is negative de nite (and we ignore R) This works especially well if Q(θ) is globally concave. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 37 Colin / 52 C
38 9. Gradient methods Stopping criteria Gradient methods: Stopping criteria Stop iterations when (1) small change in the coe cient vector (tolerance) (2) small change in the objective function (ltolerance) (3) small gradient relative to the Hessian (nrtolerance) (4) small gradient relative to the coe cients (gtolerance) (5) maximum number of iterations reached (i.e. NOT CONVERGED) Stata default values for these criteria can be changed See help maximize. Stata built-in commands use (1), (2) and (5) only. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 38 Colin / 52 C
39 9. Gradient methods Poisson Example Poisson Example For the Poisson MLE Q(β) = 1 N N i=1f exp(x 0 i β) + y i x 0 i β ln y i!g g(β) = 1 N N i=1(y i exp(x 0 i β))x i H(β) = 1 N N i=1 exp(x 0 i β)x i x 0 i. The Newton-Raphson iterations are bβ s+1 = β b h s + 1 N N i=1 exp(xi 0 β b i 1 s )x i xi 0 1 N N i=1(y i exp(xi 0 β b s ))x i. H(β) = X 0 DX where X is N k regressors and D = Diag[exp(xi 0 β)] is an N N diagonal matrix with positive entries. So H(β) is negative de nite for all β and objective function is globally concave. NR will work very well here unless regressors are highly multicollinear. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 39 Colin / 52 C
40 9. Gradient methods Application Application Apply Newton-Raphson to Poisson MLE using Mata.. * Newton-Raphson in Mata for Poisson MLE. * Set up data and local macros for dependent variable and regressors. generate cons = 1. local y docvis. local xlist private chronic female income cons. * Mata commands for Poisson MLE NR iterations. mata: mata (type end to exit) : st_view(y=.,., "`y'") // read in stata data to y and X : st_view(x=.,., tokens("`xlist'")) : b = J(cols(X),1,0) // compute starting values : n = rows(x) : iter = 1 // initialize number of iterations : cha = 1 // initialize stopping criterion c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 40 Colin / 52 C
41 9. Gradient methods Application : do { > mu = exp(x*b) > grad = X'(y-mu) // k x 1 gradient vector > hes = cross(x, mu, X) // negative of the k x k Hessian matrix > bold = b > b = bold + cholinv(hes)*grad > cha = (bold-b)'(bold-b)/(bold'bold) > iter = iter + 1 > } while (cha > 1e-16) // end of iteration loops : mu = exp(x*b) : hes = cross(x, mu, X) : vgrad = cross(x, (y-mu):^2, X) : vb = cholinv(hes)*vgrad*cholinv(hes)*n/(n-cols(x)) : iter // num iterations 13 : cha // stopping criterion e-24 : st_matrix("b",b') // pass results from Mata to Stata : st_matrix("v",vb) // pass results from Mata to Stata : end c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 41 Colin / 52 C
42 9. Gradient methods Application Mata computes b β in b and bv[ b β] in V. Use Stata command ereturn to nicely display results.. * Present results, nicely formatted using Stata command ereturn. matrix colnames b = `xlist'. matrix colnames V = `xlist'. matrix rownames V = `xlist'. ereturn post b V. ereturn display Coef. Std. Err. z P> z [95% Conf. nterval] private chronic female income cons Results are the same as from Stata command poisson. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 42 Colin / 52 C
43 10. Appendix: Theory for Extremum estimator De nition 10. Appendix: Theory for extremum estimator More general framework than m-estimators. Additionally includes generalized method of moments (GMM). Extremum estimator bθ maximizes Q N (θ) = Q N (y, X, θ). For a global maximum, so bθ = arg max θ2θ Q N (θ). Usually a local maximum, solving Q N (θ) θ = 0. b θ Leading examples: MLE, NLS, and GMM. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 43 Colin / 52 C
44 10. Appendix: Theory for Extremum estimator Consistency Consistency f Q N (θ) p! Q 0 (θ) (where Q 0 (θ) is nonstochastic) then the local maximum p! to each other So bθ p! θ 0 where θ 0 is the local maximum of Q 0 (θ). c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 44 Colin / 52 C
45 10. Appendix: Theory for Extremum estimator Consistency Consistency of Local Maximum (Amemiya (1985, Theorem 4.1.2)). Make the assumptions: (i) The parameter space Θ is an open subset of R q ; (ii) Q N (θ) is a measurable function of the data for all θ 2 Θ, and Q N (θ)/ θ exists and is continuous in an open neighborhood of θ 0 ; (iii) The objective function Q N (θ) converges uniformly in probability to Q 0 (θ) in an open neighborhood of θ 0, and Q 0 (θ) attains a unique local maximum at θ 0. Then one of the solutions to Q N (θ)/ θ = 0 is consistent for θ 0. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 45 Colin / 52 C
46 10. Appendix: Theory for Extremum estimator Limit normal distribution Limit normal distribution Based on exact rst-order Taylor series (mean-value theorem). For f () di erentiable there is always x + between x and x 0 such that f (x) = f (x 0 ) + f 0 (x + )(x x 0 ). Extend to f() a vector function of the vector θ f(bθ) = f(θ 0 ) + f(θ) θ 0 (bθ θ 0 ), θ + Here f(θ) = Q N (θ)/ θ is already a rst derivative. Then Q N (θ) = Q N (θ) θ θ + 2 Q N (θ) θ0 θ θ 0 (bθ θ 0 ). θ + b θ Set the right-hand side to 0 and solve for p N( bθ θ 0 ) p N(bθ θ 0 ) = 2 Q N (θ) θ θ 0 θ + 1 p Q N (θ) N θ. θ0 c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 46 Colin / 52 C
47 10. Appendix: Theory for Extremum estimator Limit normal distribution Asymptotic Normality of Local Maximum (Amemiya (1985, Theorem 4.1.3)). n addition to preceding assumptions for consistency assume: (i) 2 Q N (θ)/ θ θ 0 exists and is continuous in an open convex neighborhood of θ 0 ; (ii) 2 Q N (θ)/ θ θ 0 θ + converges in prob. to nite nonsingular matrix A 0 = plim 2 Q N (θ)/ θ θ 0 θ0 for any sequence θ + such that θ + p! θ 0 ; (iii) p d N Q N (θ)/ θj θ0! N [0, B0 ], where B 0 = plim hn Q N (θ)/ θ Q N (θ)/ θ 0 i θ0. Then p N( bθ θ 0 ) d! N [0, A 1 0 B 0A 1 0 ] where bθ is the consistent solution to Q N (θ)/ θ = 0. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 47 Colin / 52 C
48 11. Appendix: Theory for Poisson MLE Consistency 11. Appendix: Theory for Poisson MLE The Poisson quasi-mle maximizes Q N (β) = N 1 i n o e x0 i β + y i xi 0 β ln y i! Then n o Q 0 (β) = plimn 1 i e x0 i β + y i xi 0 β ln y i! n h = lim N 1 i E e x0 βi o i + E[y i xi 0 β] E [ln y i!] by LLN n h = lim N 1 i E e x0 βi h i o i + E e x0 i β 0 x 0 i β E [ln y i!]. The key step is plim N 1 i y i x 0 i β = lim N 1 i E y i xi 0 β by LLN h i = lim N 1 i E e x0 i β 0 x 0 i β if E[y i jx i ] = exp(xi 0 β 0 ). c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 48 Colin / 52 C
49 11. Appendix: Theory for Poisson MLE Consistency Poisson Consistency Then Q 0 (β) = lim N 1 i n h E e x0 βi h i i + E e x0 i β 0 x 0 i β o E [ln y i!] so (noting that E[ln y i!] depends on β 0 and not β) Q 0 (β) β i i = lim N 1 i E he x0 i β x i + lim N 1 i E he x0 i β 0 xi = 0 at β = β 0. So b β is consistent for β as Q N (β)! p Q 0 (β) and Q 0 (β) is maximized at β = β 0. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 49 Colin / 52 C
50 11. Appendix: Theory for Poisson MLE Consistency A simpler heuristic proof is that β b is consistent for β if " # Q N (β) E = N 1 β i (y i exp(xi 0 β 0 ))x i β0 = 0. This is the case if the d.g.p. such that E[y i jx i ] = exp(x 0 i β 0 ) i.e. that the conditional mean is correctly speci ed this result holds more generally if the speci ed density is in linear exponential family. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 50 Colin / 52 C
51 11. Appendix: Theory for Poisson MLE Limit normal distribution Poisson MLE: Limit normal distribution For Poisson p N( b β β0 ) = = First term by a LLN N 1 i 1 p N 1 i H i (β ) + N i g i (β 0 ) 1 N 1 i e x0 i β+ x i xi 0 N 1/2 i (y i e x0 i β 0 )x e x0 i β+ x i x 0 i p! A 0 = lim i E[e x0 i β 0 xi x 0 i ] Second term by a CLT and with independence over i N 1/2 i (y i exp(xi 0 β 0 ))x i h i p! N 0, B 0 = lim N 1 i E[E[(y i e x0 i β 0 ) 2 jx i ]x i xi 0 ] Combining p N( b β β0 ) d! N [0, A 1 0 B 0A 1 0 ]. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 51 Colin / 52 C
52 11. Appendix: Theory for Poisson MLE Limit normal distribution Note that if y i is Poisson distributed then E[(y i exp(x 0 i β 0 )) 2 jx i ] = V[y i jx i ] = E[y i jx i ] = exp(x 0 i β 0 ) so B 0 = A 0 and p N( β b β0 )! d N [0, A0 1]. c A. Colin Cameron Univ. of Calif.- Davis (Frontiers BGPE in Course: Econometrics Nonlinear Bavarian methods Graduate Program inmarch Economics 21-25, Based on A. 52 Colin / 52 C
Day 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 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 informationDay 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 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 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 informationDay 1A Count Data Regression: Part 1
Day 1A Count Data Regression: Part 1 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 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 informationGreene, Econometric Analysis (6th ed, 2008)
EC771: Econometrics, Spring 2010 Greene, Econometric Analysis (6th ed, 2008) Chapter 17: Maximum Likelihood Estimation The preferred estimator in a wide variety of econometric settings is that derived
More informationDay 4A Nonparametrics
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, 2017. Colin Cameron Univ. of Calif.
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 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 informationIntroduction to Estimation Methods for Time Series models Lecture 2
Introduction to Estimation Methods for Time Series models Lecture 2 Fulvio Corsi SNS Pisa Fulvio Corsi Introduction to Estimation () Methods for Time Series models Lecture 2 SNS Pisa 1 / 21 Estimators:
More informationNonlinear Econometric Analysis (ECO 722) : Homework 2 Answers. (1 θ) if y i = 0. which can be written in an analytically more convenient way as
Nonlinear Econometric Analysis (ECO 722) : Homework 2 Answers 1. Consider a binary random variable y i that describes a Bernoulli trial in which the probability of observing y i = 1 in any draw is given
More informationChapter 1. GMM: Basic Concepts
Chapter 1. GMM: Basic Concepts Contents 1 Motivating Examples 1 1.1 Instrumental variable estimator....................... 1 1.2 Estimating parameters in monetary policy rules.............. 2 1.3 Estimating
More informationMarginal Effects for Continuous Variables Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised January 20, 2018
Marginal Effects for Continuous Variables Richard Williams, University of Notre Dame, https://www3.nd.edu/~rwilliam/ Last revised January 20, 2018 References: Long 1997, Long and Freese 2003 & 2006 & 2014,
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 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 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 informationExtensions to the Basic Framework II
Topic 7 Extensions to the Basic Framework II ARE/ECN 240 A Graduate Econometrics Professor: Òscar Jordà Outline of this topic Nonlinear regression Limited Dependent Variable regression Applications of
More informationECON 5350 Class Notes Nonlinear Regression Models
ECON 5350 Class Notes Nonlinear Regression Models 1 Introduction In this section, we examine regression models that are nonlinear in the parameters and give a brief overview of methods to estimate such
More informationThe outline for Unit 3
The outline for Unit 3 Unit 1. Introduction: The regression model. Unit 2. Estimation principles. Unit 3: Hypothesis testing principles. 3.1 Wald test. 3.2 Lagrange Multiplier. 3.3 Likelihood Ratio Test.
More informationExercises Chapter 4 Statistical Hypothesis Testing
Exercises Chapter 4 Statistical Hypothesis Testing Advanced Econometrics - HEC Lausanne Christophe Hurlin University of Orléans December 5, 013 Christophe Hurlin (University of Orléans) Advanced Econometrics
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 informationi (x i x) 2 1 N i x i(y i y) Var(x) = P (x 1 x) Var(x)
ECO 6375 Prof Millimet Problem Set #2: Answer Key Stata problem 2 Q 3 Q (a) The sample average of the individual-specific marginal effects is 0039 for educw and -0054 for white Thus, on average, an extra
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 informationDiscrete Dependent Variable Models
Discrete Dependent Variable Models James J. Heckman University of Chicago This draft, April 10, 2006 Here s the general approach of this lecture: Economic model Decision rule (e.g. utility maximization)
More informationMaximum Likelihood Tests and Quasi-Maximum-Likelihood
Maximum Likelihood Tests and Quasi-Maximum-Likelihood Wendelin Schnedler Department of Economics University of Heidelberg 10. Dezember 2007 Wendelin Schnedler (AWI) Maximum Likelihood Tests and Quasi-Maximum-Likelihood10.
More informationPoisson Regression. Ryan Godwin. ECON University of Manitoba
Poisson Regression Ryan Godwin ECON 7010 - University of Manitoba Abstract. These lecture notes introduce Maximum Likelihood Estimation (MLE) of a Poisson regression model. 1 Motivating the Poisson Regression
More informationMC3: Econometric Theory and Methods. Course Notes 4
University College London Department of Economics M.Sc. in Economics MC3: Econometric Theory and Methods Course Notes 4 Notes on maximum likelihood methods Andrew Chesher 25/0/2005 Course Notes 4, Andrew
More informationMaximum Likelihood (ML) Estimation
Econometrics 2 Fall 2004 Maximum Likelihood (ML) Estimation Heino Bohn Nielsen 1of32 Outline of the Lecture (1) Introduction. (2) ML estimation defined. (3) ExampleI:Binomialtrials. (4) Example II: Linear
More informationoptions description set confidence level; default is level(95) maximum number of iterations post estimation results
Title nlcom Nonlinear combinations of estimators Syntax Nonlinear combination of estimators one expression nlcom [ name: ] exp [, options ] Nonlinear combinations of estimators more than one expression
More informationPractical Econometrics. for. Finance and Economics. (Econometrics 2)
Practical Econometrics for Finance and Economics (Econometrics 2) Seppo Pynnönen and Bernd Pape Department of Mathematics and Statistics, University of Vaasa 1. Introduction 1.1 Econometrics Econometrics
More informationCRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M.
CRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M. Wooldridge Michigan State University 1. Introduction 2. Linear
More informationModels, Testing, and Correction of Heteroskedasticity. James L. Powell Department of Economics University of California, Berkeley
Models, Testing, and Correction of Heteroskedasticity James L. Powell Department of Economics University of California, Berkeley Aitken s GLS and Weighted LS The Generalized Classical Regression Model
More informationGeneralized method of moments estimation in Stata 11
Generalized method of moments estimation in Stata 11 David M. Drukker StataCorp Stata Conference Washington, DC 2009 1 / 27 Outline 1 A quick introduction to GMM 2 gmm examples Ordinary least squares Two-stage
More information2. We care about proportion for categorical variable, but average for numerical one.
Probit Model 1. We apply Probit model to Bank data. The dependent variable is deny, a dummy variable equaling one if a mortgage application is denied, and equaling zero if accepted. The key regressor is
More information1 Outline. Introduction: Econometricians assume data is from a simple random survey. This is never the case.
24. Strati cation c A. Colin Cameron & Pravin K. Trivedi 2006 These transparencies were prepared in 2002. They can be used as an adjunct to Chapter 24 (sections 24.2-24.4 only) of our subsequent book Microeconometrics:
More informationChapter 1: A Brief Review of Maximum Likelihood, GMM, and Numerical Tools. Joan Llull. Microeconometrics IDEA PhD Program
Chapter 1: A Brief Review of Maximum Likelihood, GMM, and Numerical Tools Joan Llull Microeconometrics IDEA PhD Program Maximum Likelihood Chapter 1. A Brief Review of Maximum Likelihood, GMM, and Numerical
More informationpoint estimates, standard errors, testing, and inference for nonlinear combinations
Title xtreg postestimation Postestimation tools for xtreg Description The following postestimation commands are of special interest after xtreg: command description xttest0 Breusch and Pagan LM test for
More informationParameter Estimation
Parameter Estimation Consider a sample of observations on a random variable Y. his generates random variables: (y 1, y 2,, y ). A random sample is a sample (y 1, y 2,, y ) where the random variables y
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 informationChapter 11. Regression with a Binary Dependent Variable
Chapter 11 Regression with a Binary Dependent Variable 2 Regression with a Binary Dependent Variable (SW Chapter 11) So far the dependent variable (Y) has been continuous: district-wide average test score
More informationGMM-based inference in the AR(1) panel data model for parameter values where local identi cation fails
GMM-based inference in the AR() panel data model for parameter values where local identi cation fails Edith Madsen entre for Applied Microeconometrics (AM) Department of Economics, University of openhagen,
More informationMax. Likelihood Estimation. Outline. Econometrics II. Ricardo Mora. Notes. Notes
Maximum Likelihood Estimation Econometrics II Department of Economics Universidad Carlos III de Madrid Máster Universitario en Desarrollo y Crecimiento Económico Outline 1 3 4 General Approaches to Parameter
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 informationLECTURE 10: NEYMAN-PEARSON LEMMA AND ASYMPTOTIC TESTING. The last equality is provided so this can look like a more familiar parametric test.
Economics 52 Econometrics Professor N.M. Kiefer LECTURE 1: NEYMAN-PEARSON LEMMA AND ASYMPTOTIC TESTING NEYMAN-PEARSON LEMMA: Lesson: Good tests are based on the likelihood ratio. The proof is easy in the
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 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 informationECONOMETRICS II (ECO 2401S) University of Toronto. Department of Economics. Winter 2014 Instructor: Victor Aguirregabiria
ECONOMETRICS II (ECO 2401S) University of Toronto. Department of Economics. Winter 2014 Instructor: Victor guirregabiria SOLUTION TO FINL EXM Monday, pril 14, 2014. From 9:00am-12:00pm (3 hours) INSTRUCTIONS:
More informationP n. This is called the law of large numbers but it comes in two forms: Strong and Weak.
Large Sample Theory Large Sample Theory is a name given to the search for approximations to the behaviour of statistical procedures which are derived by computing limits as the sample size, n, tends to
More informationGraduate Econometrics I: Maximum Likelihood I
Graduate Econometrics I: Maximum Likelihood I Yves Dominicy Université libre de Bruxelles Solvay Brussels School of Economics and Management ECARES Yves Dominicy Graduate Econometrics I: Maximum Likelihood
More informationTesting Linear Restrictions: cont.
Testing Linear Restrictions: cont. The F-statistic is closely connected with the R of the regression. In fact, if we are testing q linear restriction, can write the F-stastic as F = (R u R r)=q ( R u)=(n
More informationGeneralized Linear Models. Kurt Hornik
Generalized Linear Models Kurt Hornik Motivation Assuming normality, the linear model y = Xβ + e has y = β + ε, ε N(0, σ 2 ) such that y N(μ, σ 2 ), E(y ) = μ = β. Various generalizations, including general
More informationEconomics 620, Lecture 18: Nonlinear Models
Economics 620, Lecture 18: Nonlinear Models Nicholas M. Kiefer Cornell University Professor N. M. Kiefer (Cornell University) Lecture 18: Nonlinear Models 1 / 18 The basic point is that smooth nonlinear
More informationWe begin by thinking about population relationships.
Conditional Expectation Function (CEF) We begin by thinking about population relationships. CEF Decomposition Theorem: Given some outcome Y i and some covariates X i there is always a decomposition where
More informationEconomics 620, Lecture 9: Asymptotics III: Maximum Likelihood Estimation
Economics 620, Lecture 9: Asymptotics III: Maximum Likelihood Estimation Nicholas M. Kiefer Cornell University Professor N. M. Kiefer (Cornell University) Lecture 9: Asymptotics III(MLE) 1 / 20 Jensen
More informationPanel Data. March 2, () Applied Economoetrics: Topic 6 March 2, / 43
Panel Data March 2, 212 () Applied Economoetrics: Topic March 2, 212 1 / 43 Overview Many economic applications involve panel data. Panel data has both cross-sectional and time series aspects. Regression
More informationECON Introductory Econometrics. Lecture 6: OLS with Multiple Regressors
ECON4150 - Introductory Econometrics Lecture 6: OLS with Multiple Regressors Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 6 Lecture outline 2 Violation of first Least Squares assumption
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 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 informationGeneralized linear models
Generalized linear models Christopher F Baum ECON 8823: Applied Econometrics Boston College, Spring 2016 Christopher F Baum (BC / DIW) Generalized linear models Boston College, Spring 2016 1 / 1 Introduction
More informationδ -method and M-estimation
Econ 2110, fall 2016, Part IVb Asymptotic Theory: δ -method and M-estimation Maximilian Kasy Department of Economics, Harvard University 1 / 40 Example Suppose we estimate the average effect of class size
More informationJeffrey M. Wooldridge Michigan State University
Fractional Response Models with Endogenous Explanatory Variables and Heterogeneity Jeffrey M. Wooldridge Michigan State University 1. Introduction 2. Fractional Probit with Heteroskedasticity 3. Fractional
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 information8. Hypothesis Testing
FE661 - Statistical Methods for Financial Engineering 8. Hypothesis Testing Jitkomut Songsiri introduction Wald test likelihood-based tests significance test for linear regression 8-1 Introduction elements
More informationIntroduction: structural econometrics. Jean-Marc Robin
Introduction: structural econometrics Jean-Marc Robin Abstract 1. Descriptive vs structural models 2. Correlation is not causality a. Simultaneity b. Heterogeneity c. Selectivity Descriptive models Consider
More informationControl Function and Related Methods: Nonlinear Models
Control Function and Related Methods: Nonlinear Models Jeff Wooldridge Michigan State University Programme Evaluation for Policy Analysis Institute for Fiscal Studies June 2012 1. General Approach 2. Nonlinear
More informationEstimating the Fractional Response Model with an Endogenous Count Variable
Estimating the Fractional Response Model with an Endogenous Count Variable Estimating FRM with CEEV Hoa Bao Nguyen Minh Cong Nguyen Michigan State Universtiy American University July 2009 Nguyen and Nguyen
More informationTesting and Model Selection
Testing and Model Selection This is another digression on general statistics: see PE App C.8.4. The EViews output for least squares, probit and logit includes some statistics relevant to testing hypotheses
More informationEstimation of Dynamic Regression Models
University of Pavia 2007 Estimation of Dynamic Regression Models Eduardo Rossi University of Pavia Factorization of the density DGP: D t (x t χ t 1, d t ; Ψ) x t represent all the variables in the economy.
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 informationLeast Squares Estimation-Finite-Sample Properties
Least Squares Estimation-Finite-Sample Properties Ping Yu School of Economics and Finance The University of Hong Kong Ping Yu (HKU) Finite-Sample 1 / 29 Terminology and Assumptions 1 Terminology and Assumptions
More informationECON Introductory Econometrics. Lecture 7: OLS with Multiple Regressors Hypotheses tests
ECON4150 - Introductory Econometrics Lecture 7: OLS with Multiple Regressors Hypotheses tests Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 7 Lecture outline 2 Hypothesis test for single
More informationAnalogy Principle. Asymptotic Theory Part II. James J. Heckman University of Chicago. Econ 312 This draft, April 5, 2006
Analogy Principle Asymptotic Theory Part II James J. Heckman University of Chicago Econ 312 This draft, April 5, 2006 Consider four methods: 1. Maximum Likelihood Estimation (MLE) 2. (Nonlinear) Least
More informationECON Introductory Econometrics. Lecture 11: Binary dependent variables
ECON4150 - Introductory Econometrics Lecture 11: Binary dependent variables Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 11 Lecture Outline 2 The linear probability model Nonlinear probability
More informationTopic 5: Non-Linear Relationships and Non-Linear Least Squares
Topic 5: Non-Linear Relationships and Non-Linear Least Squares Non-linear Relationships Many relationships between variables are non-linear. (Examples) OLS may not work (recall A.1). It may be biased and
More information(θ θ ), θ θ = 2 L(θ ) θ θ θ θ θ (θ )= H θθ (θ ) 1 d θ (θ )
Setting RHS to be zero, 0= (θ )+ 2 L(θ ) (θ θ ), θ θ = 2 L(θ ) 1 (θ )= H θθ (θ ) 1 d θ (θ ) O =0 θ 1 θ 3 θ 2 θ Figure 1: The Newton-Raphson Algorithm where H is the Hessian matrix, d θ is the derivative
More informationRegression with a Single Regressor: Hypothesis Tests and Confidence Intervals
Regression with a Single Regressor: Hypothesis Tests and Confidence Intervals (SW Chapter 5) Outline. The standard error of ˆ. Hypothesis tests concerning β 3. Confidence intervals for β 4. Regression
More informationIntroduction Large Sample Testing Composite Hypotheses. Hypothesis Testing. Daniel Schmierer Econ 312. March 30, 2007
Hypothesis Testing Daniel Schmierer Econ 312 March 30, 2007 Basics Parameter of interest: θ Θ Structure of the test: H 0 : θ Θ 0 H 1 : θ Θ 1 for some sets Θ 0, Θ 1 Θ where Θ 0 Θ 1 = (often Θ 1 = Θ Θ 0
More informationEconomics 671: Applied Econometrics Department of Economics, Finance and Legal Studies University of Alabama
Problem Set #1 (Random Data Generation) 1. Generate =500random numbers from both the uniform 1 ( [0 1], uniformbetween zero and one) and exponential exp ( ) (set =2and let [0 1]) distributions. Plot the
More informationfhetprob: A fast QMLE Stata routine for fractional probit models with multiplicative heteroskedasticity
fhetprob: A fast QMLE Stata routine for fractional probit models with multiplicative heteroskedasticity Richard Bluhm May 26, 2013 Introduction Stata can easily estimate a binary response probit models
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 informationA Very Brief Summary of Statistical Inference, and Examples
A Very Brief Summary of Statistical Inference, and Examples Trinity Term 2009 Prof. Gesine Reinert Our standard situation is that we have data x = x 1, x 2,..., x n, which we view as realisations of random
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 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 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 informationFor iid Y i the stronger conclusion holds; for our heuristics ignore differences between these notions.
Large Sample Theory Study approximate behaviour of ˆθ by studying the function U. Notice U is sum of independent random variables. Theorem: If Y 1, Y 2,... are iid with mean µ then Yi n µ Called law of
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 information4.8 Instrumental Variables
4.8. INSTRUMENTAL VARIABLES 35 4.8 Instrumental Variables A major complication that is emphasized in microeconometrics is the possibility of inconsistent parameter estimation due to endogenous regressors.
More informationDynamic Panels. Chapter Introduction Autoregressive Model
Chapter 11 Dynamic Panels This chapter covers the econometrics methods to estimate dynamic panel data models, and presents examples in Stata to illustrate the use of these procedures. The topics in this
More informationPOLI 8501 Introduction to Maximum Likelihood Estimation
POLI 8501 Introduction to Maximum Likelihood Estimation Maximum Likelihood Intuition Consider a model that looks like this: Y i N(µ, σ 2 ) So: E(Y ) = µ V ar(y ) = σ 2 Suppose you have some data on Y,
More informationLinear models. Linear models are computationally convenient and remain widely used in. applied econometric research
Linear models Linear models are computationally convenient and remain widely used in applied econometric research Our main focus in these lectures will be on single equation linear models of the form y
More informationh=1 exp (X : J h=1 Even the direction of the e ect is not determined by jk. A simpler interpretation of j is given by the odds-ratio
Multivariate Response Models The response variable is unordered and takes more than two values. The term unordered refers to the fact that response 3 is not more favored than response 2. One choice from
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 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 information1. The Multivariate Classical Linear Regression Model
Business School, Brunel University MSc. EC550/5509 Modelling Financial Decisions and Markets/Introduction to Quantitative Methods Prof. Menelaos Karanasos (Room SS69, Tel. 08956584) Lecture Notes 5. The
More informationECON 4160, Autumn term Lecture 1
ECON 4160, Autumn term 2017. Lecture 1 a) Maximum Likelihood based inference. b) The bivariate normal model Ragnar Nymoen University of Oslo 24 August 2017 1 / 54 Principles of inference I Ordinary least
More informationOLS, MLE and related topics. Primer.
OLS, MLE and related topics. Primer. Katarzyna Bech Week 1 () Week 1 1 / 88 Classical Linear Regression Model (CLRM) The model: y = X β + ɛ, and the assumptions: A1 The true model is y = X β + ɛ. A2 E
More informationBootstrap-Based Improvements for Inference with Clustered Errors
Bootstrap-Based Improvements for Inference with Clustered Errors Colin Cameron, Jonah Gelbach, Doug Miller U.C. - Davis, U. Maryland, U.C. - Davis May, 2008 May, 2008 1 / 41 1. Introduction OLS regression
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 information