Presentation is loading. Please wait.

Presentation is loading. Please wait.

Part 19: MLE Applications 19-1/31 Econometrics I Professor William Greene Stern School of Business Department of Economics.

Similar presentations


Presentation on theme: "Part 19: MLE Applications 19-1/31 Econometrics I Professor William Greene Stern School of Business Department of Economics."— Presentation transcript:

1 Part 19: MLE Applications 19-1/31 Econometrics I Professor William Greene Stern School of Business Department of Economics

2 Part 19: MLE Applications 19-2/31 Econometrics I Part 19 –MLE Applications and a Two Step Estimator

3 Part 19: MLE Applications 19-3/31 Model for a Binary Dependent Variable  Binary outcome. Event occurs or doesn’t (e.g., the democrat wins, the person enters the labor force,… Model the probability of the event. P(x)=Prob(y=1|x) Probability responds to independent variables  Requirements 0 < Probability < 1 P(x) should be monotonic in x – it’s a CDF

4 Part 19: MLE Applications 19-4/31 Two Standard Models  Based on the normal distribution: Prob[y=1|x] =  (β’x) = CDF of normal distribution The “probit” model  Based on the logistic distribution Prob[y=1|x] = exp(β’x)/[1+ exp(β’x)] The “logit” model  Log likelihood P(y|x) = (1-F) (1-y) F y where F = the cdf LogL = Σ i (1-y i )log(1-F i ) + y i logF i = Σ i F[(2y i -1)β’x] since F(-t)=1-F(t) for both.

5 Part 19: MLE Applications 19-5/31 Coefficients in the Binary Choice Models E[y|x] = 0*(1-F i ) + 1*F i = P(y=1|x) = F(β’x) The coefficients are not the slopes, as usual in a nonlinear model ∂E[y|x]/∂x= f(β’x)β These will look similar for probit and logit

6 Part 19: MLE Applications 19-6/31 Application: Female Labor Supply 1975 Survey Data: Mroz (Econometrica) 753 Observations Descriptive Statistics Variable Mean Std.Dev. Minimum Maximum Cases Missing ============================================================================== All observations in current sample LFP | WHRS | KL6 | K618 | WA | WE | WW | RPWG | HHRS | HA | HE | HW | FAMINC | KIDS |

7 Part 19: MLE Applications 19-7/ Binomial Probit Model Dependent variable LFP Log likelihood function (Probit) Log likelihood function (Logit) Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Mean of X |Index function for probability Constant| WA| WE|.13881*** HHRS| ** D HA| HE| *** FAMINC|.00997** KIDS| *** Binary Logit Model for Binary Choice |Characteristics in numerator of Prob[Y = 1] Constant| WA| WE|.22584*** HHRS| ** HA| HE| *** FAMINC|.01727** KIDS| *** Estimated Choice Models for Labor Force Participation

8 Part 19: MLE Applications 19-8/31 Partial Effects Partial derivatives of probabilities with respect to the vector of characteristics. They are computed at the means of the Xs. Observations used are All Obs Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Elasticity |PROBIT: Index function for probability WA| WE|.05445*** HHRS| D-04** D HA| HE| *** FAMINC|.00391** |Marginal effect for dummy variable is P|1 - P|0. KIDS| *** Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Elasticity |LOGIT: Marginal effect for variable in probability WA| WE|.05521*** HHRS| D-04** D HA| HE| *** FAMINC|.00422** |Marginal effect for dummy variable is P|1 - P|0. KIDS| ***

9 Part 19: MLE Applications 19-9/31 I have a question. The question is as follows. We have a probit model. We used LM tests to test for the hetercodeaticiy in this model and found that there is heterocedasticity in this model... How do we proceed now? What do we do to get rid of heterescedasticiy? Testing for heteroscedasticity in a probit model and then getting rid of heteroscedasticit in this model is not a common procedure. In fact I do not remember seen an applied (or theoretical also) works which tests for heteroscedasticiy and then uses a method to get rid of it??? See Econometric Analysis, 7 th ed. pages

10 Part 19: MLE Applications 19-10/31 Exponential Regression Model

11 Part 19: MLE Applications 19-11/31 Variance of the First Derivative

12 Part 19: MLE Applications 19-12/31 Hessian

13 Part 19: MLE Applications 19-13/31 Variance Estimators

14 Part 19: MLE Applications 19-14/31 Income Data

15 Part 19: MLE Applications 19-15/31 Exponential Regression --> logl ; lhs=hhninc ; rhs = x ; model=exp $ Normal exit: 11 iterations. Status=0. F= Exponential (Loglinear) Regression Model Dependent variable HHNINC Log likelihood function Restricted log likelihood Chi squared [ 5 d.f.] Significance level McFadden Pseudo R-squared Estimation based on N = 27322, K = Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Mean of X |Parameters in conditional mean function Constant| *** AGE|.00205*** EDUC| *** MARRIED| *** HHKIDS|.06512*** FEMALE| Note: ***, **, * = Significance at 1%, 5%, 10% level

16 Part 19: MLE Applications 19-16/31 Variance Estimators histogram;rhs=hhninc$ reject ; hhninc=0$ namelist ; X = one, age,educ,married,hhkids,female $ loglinear ; lhs=hhninc ; rhs = x ; model=exp $ create ; thetai = exp(b'x) $ create ; gi = (hhninc/thetai - 1) ; gi2 = gi^2 $$ create ; hi = (hhninc/thetai) $ matrix ; Expected = ; Stat(b,Expected,X)$ matrix ; Actual = ; Stat(b,Actual,X) $ matrix ; BHHH = ; Stat(b,BHHH,X) $ matrix ; Robust = Actual * X'[gi2]X * Actual ; Stat(b,Robust,X) $

17 Part 19: MLE Applications 19-17/31 Estimates Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] > matrix ; Expected = ; Stat(b,Expected,X)$ Constant| *** AGE|.00205*** EDUC| *** MARRIED| *** HHKIDS|.06512*** FEMALE| > matrix ; Actual = ; Stat(b,Actual,X) $ Constant| *** AGE| EDUC| *** MARRIED| *** HHKIDS|.06512* FEMALE| > matrix ; BHHH = ; Stat(b,BHHH,X) $ Constant| *** AGE|.00205*** EDUC| *** MARRIED| *** HHKIDS|.06512*** FEMALE| > matrix ; Robust = Actual * X'[gi2]X * Actual $ Constant| *** AGE| EDUC| *** MARRIED| * HHKIDS| FEMALE|

18 Part 19: MLE Applications 19-18/31 GARCH Models: A Model for Time Series with Latent Heteroscedasticity Bollerslev/Ghysel, 1974

19 Part 19: MLE Applications 19-19/31 ARCH Model

20 Part 19: MLE Applications 19-20/31 GARCH Model

21 Part 19: MLE Applications 19-21/31 Estimated GARCH Model GARCH MODEL Dependent variable Y Log likelihood function Restricted log likelihood Chi squared [ 2 d.f.] Significance level McFadden Pseudo R-squared Estimation based on N = 1974, K = 4 GARCH Model, P = 1, Q = 1 Wald statistic for GARCH = Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Mean of X |Regression parameters Constant| |Unconditional Variance Alpha(0)|.01076*** |Lagged Variance Terms Delta(1)|.80597*** |Lagged Squared Disturbance Terms Alpha(1)|.15313*** |Equilibrium variance, a0/[1-D(1)-A(1)] EquilVar|

22 Part 19: MLE Applications 19-22/31 2 Step Estimation (Murphy-Topel) Setting, fitting a model which contains parameter estimates from another model. Typical application, inserting a prediction from one model into another. A. Procedures: How it's done. B. Asymptotic results: 1. Consistency 2. Getting an appropriate estimator of the asymptotic covariance matrix The Murphy - Topel result Application: Equation 1: Number of children Equation 2: Labor force participation

23 Part 19: MLE Applications 19-23/31 Setting  Two equation model: Model for y 1 = f(y 1 | x 1, θ 1 ) Model for y 2 = f(y 2 | x 2, θ 2, x 1, θ 1 ) (Note, not ‘simultaneous’ or even ‘recursive.’)  Procedure: Estimate θ 1 by ML, with covariance matrix (1/n)V 1 Estimate θ 2 by ML treating θ 1 as if it were known. Correct the estimated asymptotic covariance matrix, (1/n)V 2 for the estimator of θ 2

24 Part 19: MLE Applications 19-24/31 Murphy and Topel (1984,2002) Results Both MLEs are consistent

25 Part 19: MLE Applications 19-25/31 M&T Computations

26 Part 19: MLE Applications 19-26/31 Example Equation 1: Number of Kids – Poisson Regression p(y i1 |x i1, β)=exp(-λ i )λ i yi1 /y i1 ! λ i = exp(x i1 ’β) g i1 = x i1 (y i1 – λ i ) V 1 = [(1/n)Σ(-λ i )x i1 x i1 ’] -1

27 Part 19: MLE Applications 19-27/31 Example - Continued Equation 2: Labor Force Participation – Logit p(y i2 |x i2,δ,α,x i1,β)=exp(d i2 )/[1+exp(d i2 )]=P i2 d i2 = (2y i2 -1)[δx i2 + αλ i ] λ i = exp(βx i1 ) Let z i2 = (x i2, λ i ), θ 2 = (δ, α) d i2 = (2y i2 -1)[θ 2 z i2 ] g i2 = (y i2 -P i2 )z i2 V 2 = [(1/n)Σ{-P i2 (1-P i2 )}z i2 z i2 ’] -1

28 Part 19: MLE Applications 19-28/31 Murphy and Topel Correction

29 Part 19: MLE Applications 19-29/31 Two Step Estimation of LFP Model ? Data transformations. Number of kids, scale income variables Create ; Kids = kl6 + k618 ; income = faminc/10000 ; Wifeinc = ww*whrs/1000 $ ? Equation 1, number of kids. Standard Poisson fertility model. ? Fit equation, collect parameters BETA and covariance matrix V1 ? Then compute fitted values and derivatives Namelist ; X1 = one,wa,we,income,wifeinc$ Poisson ; Lhs = kids ; Rhs = X1 $ Matrix ; Beta = b ; V1 = N*VARB $ Create ; Lambda = Exp(X1'Beta); gi1 = Kids - Lambda $ ? Set up logit labor force participation model ? Compute probit model and collect results. Delta=Coefficients on X2 ? Alpha = coefficient on fitted number of kids. Namelist ; X2 = one,wa,we,ha,he,income ; Z2 = X2,Lambda $ Logit ; Lhs = lfp ; Rhs = Z2 $ Calc ; alpha = b(kreg) ; K2 = Col(X2) $ Matrix ; delta=b(1:K2) ; Theta2 = b ; V2 = N*VARB $ ? Poisson derivative of with respect to beta is (kidsi - lambda)´X1 Create ; di = delta'X2 + alpha*Lambda ; pi2= exp(di)/(1+exp(di)) ; gi2 = LFP - Pi2 ? These are the terms that are used to compute R and C. ; ci = gi2*gi2*alpha*lambda ; ri = gi2*gi1$ MATRIX ; C = 1/n*Z2'[ci]X1 ; R = 1/n*Z2'[ri]X1 ; A = C*V1*C' - R*V1*C' - C*V1*R' ; V2S = V2+V2*A*V2 ; V2s = 1/N*V2S $ ? Compute matrix products and report results Matrix ; Stat(Theta2,V2s,Z2)$

30 Part 19: MLE Applications 19-30/31 Estimated Equation 1: E[Kids] | Poisson Regression | | Dependent variable KIDS | | Number of observations 753 | | Log likelihood function | |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| Constant WA WE INCOME WIFEINC

31 Part 19: MLE Applications 19-31/31 Two Step Estimator | Multinomial Logit Model | | Dependent variable LFP | | Number of observations 753 | | Log likelihood function | | Number of parameters 7 | |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| Characteristics in numerator of Prob[Y = 1] Constant WA WE HA HE INCOME LAMBDA With Corrected Covariance Matrix |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Constant WA WE HA HE INCOME LAMBDA


Download ppt "Part 19: MLE Applications 19-1/31 Econometrics I Professor William Greene Stern School of Business Department of Economics."

Similar presentations


Ads by Google