1 / 27

Discrete Choice Modeling

William Greene Stern School of Business New York University. Discrete Choice Modeling. Lab Sessions. Lab 4. Ordered Choice and Count Data Models. Data Set. Data for this session are healthcare.lpj Refer to healthcare.lim for full list of the variables.

hoai
Télécharger la présentation

Discrete Choice Modeling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. William Greene Stern School of Business New York University Discrete Choice Modeling Lab Sessions

  2. Lab 4 Ordered Choice and Count Data Models

  3. Data Set Data for this session are healthcare.lpj Refer to healthcare.lim for full list of the variables. This is an unbalanced panel. The group counter is already in the data set. Use ;PDS=_Groupti for panel models

  4. Binary Dependent Variables DOCTOR = visited the doctor at least once HOSPITAL = went to the hospital at least once. PUBLIC = has public health insurance (1=YES) ADDON = additional health insurance.(1=Yes) ADDON is extremely unbalanced.

  5. Dependent Variables: Ordered HSAT = ordered reported health satisfaction, coded 0,1,…,10. Use with ORDERED or ORDERED ; Logit Request marginal effects with ; Marginal as usual.

  6. Ordered Choice Models Ordered ; Lhs = dependent variable ; Rhs = One, … independent variables $ Remember to include the constant term For ordered logit in stead of ordered probit, use Ordered ; Logit ; Lhs = dependent variable ; Rhs = One, … independent variables $ To get marginal effects, use ; Margin as usual. There are fixed and random effects estimators for this model: ; FEM ; PDS = _Groupti ; Random ; PDS = _Groupti

  7. Sample Selection in Ordered Choice

  8. Sample Selection Ordered Probit PROBIT ; Lhs = … ; Rhs = … ; HOLD $ ORDERED ; Lhs = … ; Rhs = … ; Selection $ This is a maximum likelihood estimator, not a least squares estimator. There is no ‘lambda’ variable. The various parameters are present in the likelihood function.

  9. Zero Inflated Ordered Probit

  10. Zero Inflated Ordered Probit Model Zero inflated ordered probit model with correlation: A probit model for the zero cell (E.g., You can use DOCTOR for a model.) Create ; y1 = y > 0 $ Probit ; … ; HOLD $ Ordered probit with excess zeros Orde ; Lhs … ; Rhs … ; ZIOP$ Correlation between w (in probit) and ε in ordered probit model ; CORRELATION is optional. Rho=0 is the default.

  11. Hierarchical Ordered Probit Hierarchical ordered probit. Ordered probit in which threshold parameters depend on variables. Two forms: HO1: μ(i,j) = exp[θ(j) + δ’z(i)]. HO2, different δ vector for each j. Use ORDERED ; … ; HO1 = list of variables or ORDERED ; … ; HO2 = list of variables. Can combine with SELECTION models and zero inflation models. This is also the Pudney and Shields generalized ordered probit from Journal of Applied Econometrics, August 2000, with the modification of using exp(…) and internally, a way to make sure that the thresholds are ordered..

  12. Dependent Variables: Count DOCVIS = count of visits to the doctor HOSPVIS = count of visits to the hospital. There are outliers. It helps to use truncated or censored samples (1) Truncated Data SAMPLE ; All $ REJECT ; DocVis > 10 $ before using or REJECT ; HospVis > 10 $ before using. Then, if using a panel data estimator, use REGRESS ; Lhs = One ; Rhs = One ; Str = ID ; Panel $ to create the _GROUPTI count variable (2) Censored Data SAMPLE ; All $ CREATE ; DocVis10 = Min(10,DocVis) ; Hosp10 = Min(10,HospVis) $

  13. Models for Count Data • Basic models Poisson and negative binomial POISSON ; Lhs = y ; Rhs = One,… $ NEGBIN ; Lhs = y ; Rhs = One,… $ • Many extensions • Various heterogeneity forms • Panel data • Random parameters and latent class • Zero inflation • Sample selection • Censoring and truncation • Numerous others… (some, far from all, shown below)

  14. Robust Covariance Matrix “Robust” sandwich estimator is appropriate for the Poisson and other loglinear models POISSON ; … ; ROBUST $

  15. “Offset” Variables Poisson (and NB) mean is a rate per unit of time. • In the sample, all observations should be observed (exposed) for the same length of time. • Else, the appropriate model is as shown below.

  16. Exposure Variable

  17. Sample Selection

  18. Estimating a Selection Model ? Selection Equation Probit ; Lhs = … ; Rhs = … ; Hold $ ? Main Regression Equation Poisson ; Lhs = … ; Rhs = … ; Selection $

  19. NegBin with Heterogeneity in Alpha In the negative binomial model, the overdispersion parameter is α, with the model assumption λ = exp(β’x) E[y|x] = λ Var[y|x] = λ[1+ α λ] We allow α to be heterogeneous: α = exp(δ’z) Use ; Hfn = … variables in z

  20. Censoring and Truncation Censoring limit C • Right (upper): Values larger than C are set to Ci. The largest value in the sample is C. Use ;LIMIT=C;MAXIMUM • Left (lower): Values less than C are set equal to C. The smallest value in the sample is C. Use ;LIMIT=C Truncation limit C • Right (upper): Values greater than or equal to C have been discarded. The largest value in the sample is C-1. Use ;LIMIT=C;TRUNCATION;UPPER • Left (lower): Values less than or equal to C have been discarded. The smallest value in the sample is C+1. Use ;LIMIT=C;TRUNCATION

  21. Zero Inflation Two regime, latent class model • Prob[Regime 1 => y=0] = q • Prob[y = j|Regime 2] = Poisson or NegBin, λ=exp(β’x) Reduced form: • Prob[y=0] = q + (1-q)P(0) • Prob[y=j > 0] = (1-q)P(j) Regime Models: • q = Probit or Logit • Structures: • ZIP: Probit or Logit F(γ’z) z can be any set of variables • ZIP-tau: Probit or Logit F(τ β’x) – same β’x as above

  22. ZIP and ZIP-tau Models ;ZIP Logit, ZIP-tau ;ZIP = Normal: Probit ZIP-tau ;ZIP [=Normal] ; Rh2 = variables in z Alternative Models • Default is Poisson • ;MODEL = NegBin • ;MODEL = Gamma

  23. Hurdle Model Two Part Model: • Prob[y=0] = Logit or Probit using β’x from the count model or γ’z as specified with ;RH2=list • Prob[y=j|j>0] = Truncated Poisson or NegBin Two part decision: Drug or alcohol use, for example POISSON ; … ; Hurdle $ POISSON ; … ; Hurdle ; Rh2 = List $

  24. Poisson and NB with Normal Heterogeneity

  25. Fixed and Random Effects Poisson or NegBin ;PDS=setting Fixed Effects • Default is a conditional esitmator • ;FEM uses the unconditional estimator • The two are algebraically identical but use different algorithms Random Effects • Use ; RANDOM • Can be fit as a random parameters model with just a random constant

  26. Random Parameters Poisson • ; LHS = dependent variable • ; RHS = independent variable(s) • ; PDS = setting (may be ;PDS=1) • ; RPM ; PTS = number of Points • ; Halton (for smarter integration method) • ; Correlated if desired to fit correlated parameters model • ; FCN = variable(n) , variable(n), … to indicate which parameters are random

  27. Latent Class Poisson (or NEGBIN) • ; LHS = dependent variable • ; RHS = independent variable(s) • ; LCM for a latent class model ; LCM = variables if probabilities are heterogeneous • ; PDS = setting (may be ;PDS=1) • ; PTS = number of latent classes

More Related