Download presentation
Presentation is loading. Please wait.
1
Microeconometric Modeling
William Greene Stern School of Business New York University New York NY USA 2.1 Binary Choice Models
2
Concepts Models Random Utility Maximum Likelihood Parametric Model
Partial Effect Average Partial Effect Odds Ratio Linear Probability Model Cluster Correction Pseudo R squared Likelihood Ratio, Wald, LM Decomposition of Effect Exclusion Restrictions Incoherent Model Nonparametric Regression Klein and Spady Model Probit Logit Bivariate Probit Recursive Bivariate Probit Multivariate Probit Sample Selection Panel Probit
3
Central Proposition A Utility Based Approach
Observed outcomes partially reveal underlying preferences There exists an underlying preference scale defined over alternatives, U*(choices) Revelation of preferences between two choices labeled 0 and 1 reveals the ranking of the underlying utility U*(choice 1) > U*(choice 0) Choose 1 U*(choice 1) < U*(choice 0) Choose 0 Net utility = U = U*(choice 1) - U*(choice 0). U > 0 => choice 1
4
Binary Outcome: Visit Doctor In the 1984 year of the GSOEP, 1611 of individuals visited the doctor at least once.
5
A Random Utility Model for the Binary Choice
Yes or No decision | Visit or not visit the doctor Model: Net utility of visit at least once Net utility depends on observables and unobservables Udoctor = Net utility = U*visit – U*not visit Udoctor = + 1Age + 2Income + 3Sex + Choose to visit at least once if net utility is positive Observed Data: X = Age, Income, Sex y = 1 if choose visit, Udoctor > 0, 0 if not. Random Utility
6
Modeling the Binary Choice Between the Two Alternatives
Net Utility Udoctor = U*visit – U*not visit Udoctor = + 1 Age + 2 Income + 3 Sex + Chooses to visit: Udoctor > 0 + 1 Age + 2 Income + 3 Sex + > 0 Choosing to visit is a random outcome because of > -( + 1 Age + 2 Income + 3 Sex)
7
Probability Model for Choice Between Two Alternatives People with the same (Age,Income,Sex) will make different choices between is random. We can model the probability that the random event “visits the doctor”will occur. Probability is governed by , the random part of the utility function. Event DOCTOR=1 occurs if > -( + 1Age + 2Income + 3Sex) We model the probability of this event.
8
An Application 27,326 Observations in GSOEP Sample 1 to 7 years, panel
7,293 households observed We use the 1994 year; 3,337 household observations
9
Binary Choice Data (all years)
10
An Econometric Model Choose to visit iff Udoctor > 0
Udoctor = + 1 Age + 2 Income + 3 Sex + Udoctor > 0 > -( + 1 Age + 2 Income + 3 Sex) < + 1 Age + 2 Income + 3 Sex) Probability model: For any person observed by the analyst, Prob(doctor=1) = Prob( < + 1 Age + 2 Income + 3 Sex) Note the relationship between the unobserved and the observed outcome DOCTOR.
11
Index = +1Age + 2 Income + 3 Sex Probability = a function of the Index. P(Doctor = 1) = f(Index)
Internally consistent probabilities: (1) (Coherence) < Probability < 1 (2) (Monotonicity) Probability increases with Index.
12
Econometric Issues Data may reveal information about coefficients I.e., effect of observed variables on utilities May reveal information about probabilities I.e., probabilities under certain assumptions Data on choices made do not reveal information about utility itself The data contain no information about the scale of utilities or utility differences. Variance of is not estimable so it is normalized at 1 or some other fixed (known) constant.
13
Modeling Approaches Nonparametric Regressions
P(Doctor=1)=f(Income) P(Doctor=1)=f(Age) Essentially, at each value of Income or Age, examine the proportion of individuals who visit the doctor.
14
Klein and Spady Semiparametric Model No specific distribution assumed
Prob(yi = 1 | xi ) = G(’x) G is estimated by kernel methods Note necessary normalizations. Coefficients are relative to FEMALE.
15
A Fully Parametric Model
Index Function: U = β’x + ε Observation Mechanism: y = 1[U > 0] Distribution: ε ~ f(ε); Normal, Logistic, … Maximum Likelihood Estimation: Max(β) logL = Σi log Prob(Yi = yi|xi) We will focus on parametric models We examine the linear probability “model” in passing.
16
A Parametric Logit Model
We examine the model components.
17
Parametric Model Estimation
How to estimate , 1, 2, 3? The technique of maximum likelihood Prob[doctor=1] = Prob[ > -( + 1 Age + 2 Income + 3 Sex)] Prob[doctor=0] = 1 – Prob[doctor=1] Requires a model for the probability
18
Completing the Model: F()
The distribution Normal: PROBIT, natural for behavior Logistic: LOGIT, allows “thicker tails” Gompertz: EXTREME VALUE, asymmetric Others… Does it matter? Yes, large difference in estimates Not much, quantities of interest are more stable.
19
Estimated Binary Choice Models for Three Distributions
Log-L(0) = log likelihood for a model that has only a constant term. Ignore the t ratios for now.
20
Effect on Predicted Probability of an Increase in Age
+ 1 (Age+1) + 2 (Income) + 3 Sex (1 is positive)
21
Partial Effects in Probability Models
Prob[Outcome] = some F(+1Income…) “Partial effect” = F(+1Income…) / ”x” (derivative) Partial effects are derivatives Result varies with model Logit: F(+1Income…) /x = Prob * (1-Prob) Probit: F(+1Income…)/x = Normal density Extreme Value: F(+1Income…)/x = Prob * (-log Prob) Scaling usually erases model differences
23
Estimated Partial Effects for Three Models (Standard errors to be considered later)
24
Partial Effect for a Dummy Variable Computed Using Means of Other Variables
Prob[yi = 1|xi,di] = F(’xi+di) where d is a dummy variable such as Sex in our doctor model. For the probit model, Prob[yi = 1|xi,di] = (x+d), = the normal CDF. Partial effect of d Prob[yi = 1|xi, di=1] Prob[yi = 1|xi, di=0] =
25
Partial Effect – Dummy Variable
26
Computing Partial Effects
Compute at the data means (PEA) Simple Inference is well defined. Not realistic for some variables, such as Sex Average the individual effects (APE) More appropriate Asymptotic standard errors are slightly more complicated.
27
Partial Effects
28
Average Partial Effects Partial Effects at Data Means
The two approaches often give similar answers, though sometimes the results differ substantially. Average Partial Effects Partial Effects at Data Means
29
APE vs. Partial Effects at the Mean
33
Odds Ratios This calculation is not meaningful if the model is not a binary logit model
34
Odds Ratio Exp() = multiplicative change in the odds ratio when z changes by 1 unit. dOR(x,z)/dx = OR(x,z)*, not exp() The “odds ratio” is not a partial effect – it is not a derivative. It is only meaningful when the odds ratio is itself of interest and the change of the variable by a whole unit is meaningful. “Odds ratios” might be interesting for dummy variables
35
The Linear Probability “Model”
36
The Dependent Variable equals zero for 98. 9% of the observations
The Dependent Variable equals zero for 98.9% of the observations. In the sample of 163,474 observations, the LHS variable equals 1 about 1,500 times.
37
2SLS for a binary dependent variable.
38
Average Partial Effects
OLS approximates the partial effects, “directly,” without bothering with coefficients. MLE Average Partial Effects OLS Coefficients
39
Modeling a Binary Outcome
Did firm i produce a product or process innovation in year t ? yit : 1=Yes/0=No Observed N=1270 firms for T=5 years, Observed covariates: xit = Industry, competitive pressures, size, productivity, etc. How to model? Binary outcome Correlation across time Heterogeneity across firms
40
Application
41
Probit and LPM
42
How Well Does the Model Fit the Data?
There is no R squared for a probability model. Least squares for linear models is computed to maximize R2 There are no residuals or sums of squares in a binary choice model The model is not computed to optimize the fit of the model to the data How can we measure the “fit” of the model to the data? “Fit measures” computed from the log likelihood Pseudo R squared = 1 – logL/logL0 Also called the “likelihood ratio index” Direct assessment of the effectiveness of the model at predicting the outcome
43
Pseudo R2 = Likelihood Ratio Index
44
The Likelihood Ratio Index
Bounded by 0 and a number < 1 Rises when the model is expanded Specific values between 0 and 1 have no meaning Can be strikingly low even in a great model Should not be used to compare models Use logL Use information criteria to compare nonnested models Can be negative if the model is not a discrete choice model. For linear regression, logL=-N/2(1+log2π+log(e’e/N)]; Positive if e’e/N < 44
45
Fit Measures Based on LogL
Binary Logit Model for Binary Choice Dependent variable DOCTOR Log likelihood function Full model LogL Restricted log likelihood Constant term only LogL0 Chi squared [ 5 d.f.] Significance level McFadden Pseudo R-squared – LogL/logL0 Estimation based on N = , K = 6 Information Criteria: Normalization=1/N Normalized Unnormalized AIC LogL + 2K Fin.Smpl.AIC LogL + 2K + 2K(K+1)/(N-K-1) Bayes IC LogL + KlnN Hannan Quinn LogL + 2Kln(lnN) Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Mean of X |Characteristics in numerator of Prob[Y = 1] Constant| *** AGE| *** AGESQ| *** INCOME| AGE_INC| FEMALE| ***
46
Fit Measures Based on Predictions
Computation Use the model to compute predicted probabilities P = F(a + b1Age + b2Income + b3Female+…) Use a rule to compute predicted y = 0 or 1 Predict y=1 if P is “large” enough Generally use 0.5 for “large” (more likely than not) Fit measure compares predictions to actuals Count successes and failures
47
Cramer Fit Measure +----------------------------------------+
| Fit Measures Based on Model Predictions| | Efron = | | Ben Akiva and Lerman = | | Veall and Zimmerman = | | Cramer = |
48
Hypothesis Tests We consider “nested” models and parametric tests
Test statistics based on the usual 3 strategies Wald statistics: Use the unrestricted model Likelihood ratio statistics: Based on comparing the two models Lagrange multiplier: Based on the restricted model. Test statistics require the log likelihood and/or the first and second derivatives of logL
49
Computing test statistics requires the log likelihood and/or standard errors based on the Hessian of LogL
50
Robust Covariance Matrix (Robust to the model specification
Robust Covariance Matrix (Robust to the model specification? Latent heterogeneity? Correlation across observations? Not always clear)
51
Robust Covariance Matrix for Logit Model Doesn’t change much
Robust Covariance Matrix for Logit Model Doesn’t change much. The model is well specified. | Standard Prob % Confidence DOCTOR| Coefficient Error z |z|>Z* Interval Conventional Standard Errors Constant| *** AGE| *** AGE^2.0| *** INCOME| |Interaction AGE*INCOME _ntrct02| FEMALE| *** Robust Standard Errors Constant| *** AGE| *** AGE^2.0| *** INCOME| _ntrct02| FEMALE| ***
52
Base Model for Hypothesis Tests
Binary Logit Model for Binary Choice Dependent variable DOCTOR Log likelihood function Restricted log likelihood Chi squared [ 5 d.f.] Significance level McFadden Pseudo R-squared Estimation based on N = , K = 6 Information Criteria: Normalization=1/N Normalized Unnormalized AIC Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Mean of X |Characteristics in numerator of Prob[Y = 1] Constant| *** AGE| *** AGESQ| *** INCOME| AGE_INC| FEMALE| *** H0: Age is not a significant determinant of Prob(Doctor = 1) H0: β2 = β3 = β5 = 0
53
Likelihood Ratio Test Null hypothesis restricts the parameter vector
Alternative relaxes the restriction Test statistic: Chi-squared = 2 (LogL|Unrestricted model – LogL|Restrictions) > 0 Degrees of freedom = number of restrictions
54
Chi squared[3] = 2[-2085.92452 - (-2124.06568)] = 77.46456
LR Test of H0: β2 = β3 = β5 = 0 UNRESTRICTED MODEL Binary Logit Model for Binary Choice Dependent variable DOCTOR Log likelihood function Restricted log likelihood Chi squared [ 5 d.f.] Significance level McFadden Pseudo R-squared Estimation based on N = , K = 6 Information Criteria: Normalization=1/N Normalized Unnormalized AIC RESTRICTED MODEL Binary Logit Model for Binary Choice Dependent variable DOCTOR Log likelihood function Restricted log likelihood Chi squared [ 2 d.f.] Significance level McFadden Pseudo R-squared Estimation based on N = , K = 3 Information Criteria: Normalization=1/N Normalized Unnormalized AIC Chi squared[3] = 2[ ( )] =
55
Wald Test of H0: β2 = β3 = β5 = 0 Unrestricted parameter vector is estimated Discrepancy: q= Rb – m is computed (or r(b,m) if nonlinear) Variance of discrepancy is estimated: Var[q] = R V R’ Wald Statistic is q’[Var(q)]-1q = q’[RVR’]-1q
56
Wald Test Chi squared[3] =
57
Multivariate Binary Choice Models
Bivariate Probit Models Analysis of bivariate choices Marginal effects Prediction No bivariate logit – there is no reasonable bivariate counterpart Simultaneous Equations and Recursive Models A Sample Selection Bivariate Probit Model The Multivariate Probit Model Specification Simulation based estimation Inference Partial effects and analysis The ‘panel probit model’
58
Application: Health Care Usage
German Health Care Usage Data, 7,293 Individuals, Varying Numbers of Periods Variables in the file are Data downloaded from Journal of Applied Econometrics Archive. This is an unbalanced panel with 7,293 individuals. They can be used for regression, count models, binary choice, ordered choice, and bivariate binary choice. This is a large data set. There are altogether 27,326 observations. The number of observations ranges from 1 to 7. (Frequencies are: 1=1525, 2=1079, 3=825, 4=926, 5=1051, 6=1000, 7=887). Note, the variable NUMOBS below tells how many observations there are for each person. This variable is repeated in each row of the data for the person. DOCTOR = 1(Number of doctor visits > 0) HOSPITAL = 1(Number of hospital visits > 0) HSAT = health satisfaction, coded 0 (low) - 10 (high) DOCVIS = number of doctor visits in last three months HOSPVIS = number of hospital visits in last calendar year PUBLIC = insured in public health insurance = 1; otherwise = ADDON = insured by add-on insurance = 1; otherswise = 0 HHNINC = household nominal monthly net income in German marks / (4 observations with income=0 were dropped) HHKIDS = children under age 16 in the household = 1; otherwise = EDUC = years of schooling AGE = age in years MARRIED = marital status EDUC = years of education
59
The Bivariate Probit Model
60
ML Estimation of the Bivariate Probit Model
61
Application to Health Care Data
x1=one,age,female,educ,married,working x2=one,age,female,hhninc,hhkids BivariateProbit ; lhs=doctor,hospital ; rh1=x1 ; rh2=x2;marginal effects $
62
Parameter Estimates FIML Estimates of Bivariate Probit Model Dependent variable DOCTOR HOSPITAL Log likelihood function Estimation based on N = , K = 12 Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Mean of X |Index equation for DOCTOR Constant| *** AGE| *** FEMALE| *** EDUC| *** MARRIED| WORKING| *** |Index equation for HOSPITAL Constant| *** AGE| *** FEMALE| *** HHNINC| HHKIDS| |Disturbance correlation RHO(1,2)| ***
63
Marginal Effects What are the marginal effects Possible margins?
Effect of what on what? Two equation model, what is the conditional mean? Possible margins? Derivatives of joint probability = Φ2(β1’xi1, β2’xi2,ρ) Partials of E[yij|xij] =Φ(βj’xij) (Univariate probability) Partials of E[yi1|xi1,xi2,yi2=1] = P(yi1,yi2=1)/Prob[yi2=1] Note marginal effects involve both sets of regressors. If there are common variables, there are two effects in the derivative that are added. (See Appendix for formulations.)
64
Marginal Effects: Decomposition
65
Direct Effects Derivatives of E[y1|x1,x2,y2=1] wrt x1
| Partial derivatives of E[y1|y2=1] with | | respect to the vector of characteristics. | | They are computed at the means of the Xs. | | Effect shown is total of 4 parts above. | | Estimate of E[y1|y2=1] = | | Observations used for means are All Obs. | | These are the direct marginal effects. | |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| AGE FEMALE EDUC MARRIED WORKING HHNINC (Fixed Parameter) HHKIDS (Fixed Parameter)
66
Indirect Effects Derivatives of E[y1|x1,x2,y2=1] wrt x2
| Partial derivatives of E[y1|y2=1] with | | respect to the vector of characteristics. | | They are computed at the means of the Xs. | | Effect shown is total of 4 parts above. | | Estimate of E[y1|y2=1] = | | Observations used for means are All Obs. | | These are the indirect marginal effects. | |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| AGE D FEMALE EDUC (Fixed Parameter) MARRIED (Fixed Parameter) WORKING (Fixed Parameter) HHNINC HHKIDS
67
Partial Effects: Total Effects Sum of Two Derivative Vectors
| Partial derivatives of E[y1|y2=1] with | | respect to the vector of characteristics. | | They are computed at the means of the Xs. | | Effect shown is total of 4 parts above. | | Estimate of E[y1|y2=1] = | | Observations used for means are All Obs. | | Total effects reported = direct+indirect. | |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| AGE FEMALE EDUC MARRIED WORKING HHNINC HHKIDS
68
Partial Effects: Dummy Variables Using Differences of Probabilities
| Analysis of dummy variables in the model. The effects are | | computed using E[y1|y2=1,d=1] - E[y1|y2=1,d=0] where d is | | the variable. Variances use the delta method. The effect | | accounts for all appearances of the variable in the model.| |Variable Effect Standard error t ratio FEMALE MARRIED WORKING HHKIDS
69
Average Partial Effects
70
Model Simulation
71
Model Simulation
72
A Simultaneous Equations Model
73
Fully Simultaneous “Model”
FIML Estimates of Bivariate Probit Model Dependent variable DOCHOS Log likelihood function Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Mean of X |Index equation for DOCTOR Constant| *** AGE| *** FEMALE| *** EDUC| MARRIED| WORKING| HOSPITAL| *** |Index equation for HOSPITAL Constant| *** AGE| *** FEMALE| *** HHNINC| HHKIDS| DOCTOR| *** |Disturbance correlation RHO(1,2)| *** ********
74
A Recursive Simultaneous Equations Model
Bivariate ; Lhs = y1,y2 ; Rh1=…,y2 ; Rh2 = … $
77
Causal Inference?
78
ATE and ATET for the RBP model
84
A Sample Selection Model
85
Sample Selection Model: Estimation
86
Application: Credit Scoring
American Express: 1992 N = 13,444 Applications Observed application data Observed acceptance/rejection of application N1 = 10,499 Cardholders Observed demographics and economic data Observed default or not in first 12 months Full Sample is in AmEx.lpj; description shows when imported.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.