Скачать презентацию Discrete Choice Modeling William Greene Stern School of Скачать презентацию Discrete Choice Modeling William Greene Stern School of

c5d85081f0fd5af260913630c1de418c.ppt

  • Количество слайдов: 54

Discrete Choice Modeling William Greene Stern School of Business New York University Discrete Choice Modeling William Greene Stern School of Business New York University

Part 2 Estimation of Binary Choice Models Part 2 Estimation of Binary Choice Models

Agenda A Basic Model for Binary Choice p Specification p Maximum Likelihood Estimation p Agenda A Basic Model for Binary Choice p Specification p Maximum Likelihood Estimation p Estimating Partial Effects p Measuring Goodness of Fit p Predicting the Outcome Variable p

A Random Utility Approach p Underlying Preference Scale, U*(x 1 …) p Revelation of A Random Utility Approach p Underlying Preference Scale, U*(x 1 …) p Revelation of Preferences: n U*(x 1 …) < 0 ===> Choice “ 0” n U*(x 1 …) > 0 ===> Choice “ 1”

Simple Binary Choice: Insurance Simple Binary Choice: Insurance

Censored Health Satisfaction Scale 0 = Not Healthy 1 = Healthy Censored Health Satisfaction Scale 0 = Not Healthy 1 = Healthy

Count Transformed to Indicator Count Transformed to Indicator

Redefined Multinomial Choice Fly Ground Redefined Multinomial Choice Fly Ground

A Model for Binary Choice p Yes or No decision (Buy/Not buy, Do/Not Do) A Model for Binary Choice p Yes or No decision (Buy/Not buy, Do/Not Do) p Example, choose to visit physician or not p Model: Net utility of visit at least once Uvisit = + 1 Age + 2 Income + Sex + Choose to visit if net utility is positive Net utility = Uvisit – Unot visit p Data: X y = [1, age, income, sex] = 1 if choose visit, Uvisit > 0, 0 if not.

Choosing Between the Two Alternatives Modeling the Binary Choice Uvisit = + 1 Age Choosing Between the Two Alternatives Modeling the Binary Choice Uvisit = + 1 Age + 2 Income + 1 Sex + Chooses to visit: Uvisit > 0 + 1 Age + 2 Income + 1 Sex + > 0 > -[ + 1 Age + 2 Income + 1 Sex ]

Probability Model for Choice Between Two Alternatives > -[ + 1 Age + 2 Probability Model for Choice Between Two Alternatives > -[ + 1 Age + 2 Income + 3 Sex ]

What Can Be Learned from the Data? (A Sample of Consumers, i = 1, What Can Be Learned from the Data? (A Sample of Consumers, i = 1, …, N) • Are the characteristics “relevant? ” • Predicting behavior - Individual – E. g. , will a person buy the add-on insurance? - Aggregate – E. g. , what proportion of the population will buy the add-on insurance? • Analyze changes in behavior when attributes change – E. g. , how will changes in education change the proportion who buy the insurance?

Application: Health Care Usage German Health Care Usage Data, 7, 293 Individuals, Varying Numbers 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 altogether 27, 326 observations. The number of observations ranges from 1 to 7. (Frequencies are: 1=1525, 2=2158, 3=825, 4=926, 5=1051, 6=1000, 7=987). (Downloaded from the JAE Archive) 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 = 0 ADDON = insured by add-on insurance = 1; otherswise = 0 HHNINC = household nominal monthly net income in German marks / 10000. (4 observations with income=0 were dropped) HHKIDS = children under age 16 in the household = 1; otherwise = 0 EDUC = years of schooling AGE = age in years FEMALE = 1 for female headed household, 0 for male EDUC = years of education

Application 27, 326 Observations – n n 1 to 7 years, panel 7, 293 Application 27, 326 Observations – n n 1 to 7 years, panel 7, 293 households observed We use the 1994 year 3, 337 household observations Descriptive Statistics ============================= Variable Mean Std. Dev. Minimum Maximum ----+------------------------DOCTOR|. 657980. 474456. 000000 1. 00000 AGE| 42. 6266 11. 5860 25. 0000 64. 0000 HHNINC|. 444764. 216586. 340000 E-01 3. 00000 FEMALE|. 463429. 498735. 000000 1. 00000

Binary Choice Data Binary Choice Data

An Econometric Model p Choose to visit iff Uvisit > 0 n Uvisit = An Econometric Model p Choose to visit iff Uvisit > 0 n Uvisit = + 1 Age + 2 Income + 3 Sex + n p Uvisit > 0 > -( + 1 Age + 2 Income + 3 Sex) Probability model: For any person observed by the analyst, Prob(visit) = Prob[ > -( + 1 Age + 2 Income + 3 Sex) p Note the relationship between the unobserved and the outcome

 + 1 Age + 2 Income + 3 Sex + 1 Age + 2 Income + 3 Sex

Modeling Approaches p Nonparametric – “relationship” n n p Semiparametric – “index function” n Modeling Approaches p Nonparametric – “relationship” n n p Semiparametric – “index function” n n n p Minimal Assumptions Minimal Conclusions Stronger assumptions Robust to model misspecification (heteroscedasticity) Still weak conclusions Parametric – “Probability function and index” n n n Strongest assumptions – complete specification Strongest conclusions Possibly less robust. (Not necessarily)

Nonparametric Regressions P(Visit)=f(Age) P(Visit)=f(Income) Nonparametric Regressions P(Visit)=f(Age) P(Visit)=f(Income)

Semiparametric p Maximum Score (MSCORE): Find b’x so that sign(b’x) * sign(y) is maximized. Semiparametric p Maximum Score (MSCORE): Find b’x so that sign(b’x) * sign(y) is maximized. p Klein and Spady: Find b to maximize a semiparametric likelihood of G(b’x)

Klein and Spady Semiparametric Note necessary normalizations. Coefficients are not very meaningful. Prob(yi = Klein and Spady Semiparametric Note necessary normalizations. Coefficients are not very meaningful. Prob(yi = 1 | xi ) = G(β x) G is estimated by kernel methods

Fully Parametric Index Function: U* = β’x + ε p Observation Mechanism: y = Fully Parametric Index Function: U* = β’x + ε p Observation Mechanism: y = 1[U* > 0] p Distribution: ε ~ f(ε); Normal, Logistic, … p p Maximum Likelihood Estimation: Max(β) log. L = Σi log Prob(Yi = yi|xi)

Parametric: Logit Model Parametric: Logit Model

Parametric Model Estimation p How to estimate , 1, 2, 3? n It’s not Parametric Model Estimation p How to estimate , 1, 2, 3? n It’s not regression The technique of maximum likelihood n Prob[y=1] = n Prob[ > -( + 1 Age + 2 Income + 3 Sex)] Prob[y=0] = 1 - Prob[y=1] p Requires a model for the probability

Completing the Model: F( ) p The distribution n p Normal: PROBIT, natural for Completing the Model: F( ) p The distribution n p Normal: PROBIT, natural for behavior Logistic: LOGIT, allows “thicker tails” Gompertz: EXTREME VALUE, asymmetric, underlies the basic logit model for multiple choice Does it matter? n n Yes, large difference in estimates Not much, quantities of interest are more stable.

Estimated Binary Choice Models LOGIT Variable Constant Age Income Sex Estimate PROBIT EXTREME Estimate Estimated Binary Choice Models LOGIT Variable Constant Age Income Sex Estimate PROBIT EXTREME Estimate VALUE t-ratio Estimate t-ratio -0. 42085 -2. 662 -0. 25179 -2. 600 0. 00960 0. 078 0. 02365 7. 205 0. 01445 7. 257 0. 01878 7. 129 -0. 44198 -2. 610 -0. 27128 -2. 635 -0. 32343 -2. 536 0. 63825 8. 453 0. 38685 8. 472 0. 52280 8. 407 Log-L -2097. 48 -2097. 35 -2098. 17 Log-L(0) -2169. 27

Effect on Predicted Probability of an Increase in Age + 1 (Age+1) + 2 Effect on Predicted Probability of an Increase in Age + 1 (Age+1) + 2 (Income) + 3 Sex ( 1 is positive)

Marginal Effects in Probability Models p p Prob[Outcome] = some F( + 1 Income…) Marginal Effects in Probability Models p p Prob[Outcome] = some F( + 1 Income…) “Partial effect” = F( + 1 Income…) / ”x” (derivative) n n Partial effects are derivatives Result varies with model p p p n Logit: F( + 1 Income…) / x Probit: F( + 1 Income…)/ x Extreme Value: F( + 1 Income…)/ x Scaling usually erases model differences = Prob * (1 -Prob) * = Normal density * = Prob * (-log Prob) *

Marginal Effects for Binary Choice Marginal Effects for Binary Choice

The Delta Method The Delta Method

Estimated Partial Effects Estimated Partial Effects

Krinsky and Robb Estimate β by Maximum Likelihood with b Estimate asymptotic covariance matrix Krinsky and Robb Estimate β by Maximum Likelihood with b Estimate asymptotic covariance matrix with V Draw R observations b(r) from the normal population N[b, V] b(r) = b + C*v(r), v(r) drawn from N[0, I] C = Cholesky matrix, V = CC’ Compute partial effects d(r) using b(r) Compute the sample variance of d(r), r=1, …, R Use the sample standard deviations of the R observations to estimate the sampling standard errors for the partial effects.

Krinsky and Robb Delta Method Krinsky and Robb Delta Method

Marginal Effect for a Dummy Variable Prob[yi = 1|xi, di] = F( ’xi+ di) Marginal Effect for a Dummy Variable Prob[yi = 1|xi, di] = F( ’xi+ di) = conditional mean p Marginal effect of d Prob[yi = 1|xi, di=1]Prob[yi = 1|xi, di=0] p p Probit:

Marginal Effect – Dummy Variable Note: 0. 14114 reported by WALD instead of 0. Marginal Effect – Dummy Variable Note: 0. 14114 reported by WALD instead of 0. 13958 above is based on the simple derivative formula evaluated at the data means rather than the first difference evaluated at the means.

Computing Effects p Compute at the data means? n n p Average the individual Computing Effects p Compute at the data means? n n p Average the individual effects n n p Simple Inference is well defined More appropriate? Asymptotic standard errors. Is testing about marginal effects meaningful? n n f(b’x) must be > 0; b is highly significant How could f(b’x)*b equal zero?

Average Partial Effects Average Partial Effects

Average Partial Effects ======================= Variable Mean Std. Dev. S. E. Mean ======================= ----+------------------ME_AGE|. 00511838. Average Partial Effects ======================= Variable Mean Std. Dev. S. E. Mean ======================= ----+------------------ME_AGE|. 00511838. 000611470. 0000106 ME_INCOM| -. 0960923. 0114797. 0001987 ME_FEMAL|. 137915. 0109264. 000189 Std. Error (. 0007250) (. 03754) (. 01689) Neither the empirical standard deviations nor the standard errors of the means for the APEs are close to the estimates from the delta method. The standard errors for the APEs are computed incorrectly by not accounting for the correlation across observations

Nonlinear Effect P = F(age, age 2, income, female) -----------------------------------Binomial Probit Model Dependent variable Nonlinear Effect P = F(age, age 2, income, female) -----------------------------------Binomial Probit Model Dependent variable DOCTOR Log likelihood function -2086. 94545 Restricted log likelihood -2169. 26982 Chi squared [ 4 d. f. ] 164. 64874 Significance level. 00000 ----+------------------------------Variable| Coefficient Standard Error b/St. Er. P[|Z|>z] Mean of X ----+------------------------------|Index function for probability Constant| 1. 30811***. 35673 3. 667. 0002 AGE| -. 06487***. 01757 -3. 693. 0002 42. 6266 AGESQ|. 00091***. 00020 4. 540. 0000 1951. 22 INCOME| -. 17362*. 10537 -1. 648. 0994. 44476 FEMALE|. 39666***. 04583 8. 655. 0000. 46343 ----+------------------------------Note: ***, * = Significance at 1%, 5%, 10% level. -----------------------------------

Nonlinear Effects Nonlinear Effects

Partial Effects? -----------------------------------Partial derivatives of E[y] = F[*] with respect to the vector of Partial Effects? -----------------------------------Partial derivatives of E[y] = F[*] with respect to the vector of characteristics They are computed at the means of the Xs Observations used for means are All Obs. ----+------------------------------Variable| Coefficient Standard Error b/St. Er. P[|Z|>z] Elasticity ----+------------------------------|Index function for probability AGE| -. 02363***. 00639 -3. 696. 0002 -1. 51422 AGESQ|. 00033***. 729872 D-04 4. 545. 0000. 97316 INCOME| -. 06324*. 03837 -1. 648. 0993 -. 04228 |Marginal effect for dummy variable is P|1 - P|0. FEMALE|. 14282***. 01620 8. 819. 0000. 09950 ----+------------------------------- Separate partial effects for Age and Age 2 make no sense. They are not varying “partially. ”

Partial Effect for Nonlinear Terms Partial Effect for Nonlinear Terms

Confidence Limits for Partial Effects Confidence Limits for Partial Effects

Interaction Effects Interaction Effects

Partial Effects? The software does not know that Age_Inc = Age*Income. -----------------------------------Partial derivatives of Partial Effects? The software does not know that Age_Inc = Age*Income. -----------------------------------Partial derivatives of E[y] = F[*] with respect to the vector of characteristics They are computed at the means of the Xs Observations used for means are All Obs. ----+------------------------------Variable| Coefficient Standard Error b/St. Er. P[|Z|>z] Elasticity ----+------------------------------|Index function for probability Constant| -. 18002**. 07421 -2. 426. 0153 AGE|. 00732***. 00168 4. 365. 0000. 46983 INCOME|. 11681. 16362. 714. 4753. 07825 AGE_INC| -. 00497. 00367 -1. 355. 1753 -. 14250 |Marginal effect for dummy variable is P|1 - P|0. FEMALE|. 13902***. 01619 8. 586. 0000. 09703 ----+-------------------------------

Model for Visit Doctor Model for Visit Doctor

Simple Partial Effects Simple Partial Effects

Direct Effect of Age Direct Effect of Age

Income Effect Income Effect

Income Effect on Health for Different Ages Income Effect on Health for Different Ages

Testing for No Interaction Effect Plot has fitted Prob(Doctor=1) on horizontal axis and t Testing for No Interaction Effect Plot has fitted Prob(Doctor=1) on horizontal axis and t statistic for H 0: Interaction effect = 0 on the vertical axis. Ai, C and E. Norton, “Interaction Terms in Logit and Probit Models, ” Economics Letters, 80, 2003, pp. 123 -129.

Interaction Effect in Model 0 Interaction Effect in Model 0

Gender Effects Gender Effects

Interaction Effects Interaction Effects