[Topic 8-Random Parameters] 1/83 Topics in Microeconometrics William Greene Department of Economics Stern School of Business.

Slides:



Advertisements
Similar presentations
Topics in Microeconometrics William Greene Department of Economics Stern School of Business.
Advertisements

9. Heterogeneity: Mixed Models. RANDOM PARAMETER MODELS.
Part 11: Heterogeneity [ 1/36] Econometric Analysis of Panel Data William Greene Department of Economics Stern School of Business.
Econometric Analysis of Panel Data
Econometrics I Professor William Greene Stern School of Business
Discrete Choice Modeling
Discrete Choice Modeling William Greene Stern School of Business New York University.
Part 17: Nonlinear Regression 17-1/26 Econometrics I Professor William Greene Stern School of Business Department of Economics.
Part 12: Asymptotics for the Regression Model 12-1/39 Econometrics I Professor William Greene Stern School of Business Department of Economics.
12. Random Parameters Logit Models. Random Parameters Model Allow model parameters as well as constants to be random Allow multiple observations with.
[Part 1] 1/15 Discrete Choice Modeling Econometric Methodology Discrete Choice Modeling William Greene Stern School of Business New York University 0Introduction.
Part 24: Bayesian Estimation 24-1/35 Econometrics I Professor William Greene Stern School of Business Department of Economics.
Part 12: Random Parameters [ 1/46] Econometric Analysis of Panel Data William Greene Department of Economics Stern School of Business.
Discrete Choice Modeling William Greene Stern School of Business New York University Lab Sessions.
Part 7: Regression Extensions [ 1/59] Econometric Analysis of Panel Data William Greene Department of Economics Stern School of Business.
1/62: Topic 2.3 – Panel Data Binary Choice Models Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA.
Part 23: Simulation Based Estimation 23-1/26 Econometrics I Professor William Greene Stern School of Business Department of Economics.
8. Heterogeneity: Latent Class Models. Latent Classes A population contains a mixture of individuals of different types (classes) Common form of the.
Part 14: Generalized Regression 14-1/46 Econometrics I Professor William Greene Stern School of Business Department of Economics.
Discrete Choice Modeling William Greene Stern School of Business New York University Lab Sessions.
Econometric Methodology. The Sample and Measurement Population Measurement Theory Characteristics Behavior Patterns Choices.
Discrete Choice Modeling William Greene Stern School of Business New York University.
Discrete Choice Modeling William Greene Stern School of Business New York University.
Discrete Choice Modeling William Greene Stern School of Business New York University.
Empirical Methods for Microeconomic Applications William Greene Department of Economics Stern School of Business.
Discrete Choice Modeling William Greene Stern School of Business New York University.
Part 5: Random Effects [ 1/54] Econometric Analysis of Panel Data William Greene Department of Economics Stern School of Business.
Discrete Choice Modeling William Greene Stern School of Business New York University.
Microeconometric Modeling William Greene Stern School of Business New York University.
[Part 9] 1/79 Discrete Choice Modeling Modeling Heterogeneity Discrete Choice Modeling William Greene Stern School of Business New York University 0Introduction.
Empirical Methods for Microeconomic Applications University of Lugano, Switzerland May 27-31, 2013 William Greene Department of Economics Stern School.
Discrete Choice Modeling William Greene Stern School of Business New York University.
[Part 4] 1/43 Discrete Choice Modeling Bivariate & Multivariate Probit Discrete Choice Modeling William Greene Stern School of Business New York University.
Discrete Choice Modeling William Greene Stern School of Business New York University.
Discrete Choice Modeling William Greene Stern School of Business New York University.
1/30: Topic 4.1 – Nested Logit and Multinomial Probit Models Microeconometric Modeling William Greene Stern School of Business New York University New.
1/69: Topic Descriptive Statistics and Linear Regression Microeconometric Modeling William Greene Stern School of Business New York University New.
Discrete Choice Modeling William Greene Stern School of Business New York University.
[Topic 9-Latent Class Models] 1/66 9. Heterogeneity: Latent Class Models.
1/62: Topic 2.3 – Panel Data Binary Choice Models Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA.
1/68: Topic 4.2 – Latent Class Models Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William Greene.
Empirical Methods for Microeconomic Applications University of Lugano, Switzerland May 27-31, 2013 William Greene Department of Economics Stern School.
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 5] 1/43 Discrete Choice Modeling Ordered Choice Models Discrete Choice Modeling William Greene Stern School of Business New York University 0Introduction.
Discrete Choice Modeling William Greene Stern School of Business New York University.
How to use Limdep?. Three important windows 1.Project window (you can check e.g. the variable and matrix lists and how the variables are coded) 2. Editing.
Microeconometric Modeling
William Greene Stern School of Business New York University
Discrete Choice Modeling
Discrete Choice Modeling
Econometric Analysis of Panel Data
Discrete Choice Modeling
Microeconometric Modeling
Econometric Analysis of Panel Data
Microeconometric Modeling
Econometrics I Professor William Greene Stern School of Business
Econometric Analysis of Panel Data
Econometric Analysis of Panel Data
Econometrics Chengyuan Yin School of Mathematics.
Econometric Analysis of Panel Data
William Greene Stern School of Business New York University
Microeconometric Modeling
Econometrics I Professor William Greene Stern School of Business
Microeconometric Modeling
Chengyuan Yin School of Mathematics
Empirical Methods for Microeconomic Applications University of Lugano, Switzerland May 27-31, 2019 William Greene Department of Economics Stern School.
Microeconometric Modeling
Econometrics I Professor William Greene Stern School of Business
Presentation transcript:

[Topic 8-Random Parameters] 1/83 Topics in Microeconometrics William Greene Department of Economics Stern School of Business

[Topic 8-Random Parameters] 2/83 8. Random Parameters and Hierarchical Linear Models

[Topic 8-Random Parameters] 3/83

[Topic 8-Random Parameters] 4/83

[Topic 8-Random Parameters] 5/83 Heterogeneous Dynamic Model

[Topic 8-Random Parameters] 6/83 “Fixed Effects” Approach

[Topic 8-Random Parameters] 7/83 A Mixed/Fixed Approach

[Topic 8-Random Parameters] 8/83 A Mixed Fixed Model Estimator

[Topic 8-Random Parameters] 9/83 Baltagi and Griffin’s Gasoline Data World Gasoline Demand Data, 18 OECD Countries, 19 years Variables in the file are COUNTRY = name of country YEAR = year, LGASPCAR = log of consumption per car LINCOMEP = log of per capita income LRPMG = log of real price of gasoline LCARPCAP = log of per capita number of cars See Baltagi (2001, p. 24) for analysis of these data. The article on which the analysis is based is Baltagi, B. and Griffin, J., "Gasoline Demand in the OECD: An Application of Pooling and Testing Procedures," European Economic Review, 22, 1983, pp The data were downloaded from the website for Baltagi's text.

[Topic 8-Random Parameters] 10/83 Baltagi and Griffin’s Gasoline Market COUNTRY = name of country YEAR = year, LGASPCAR = log of consumption per cary LINCOMEP = log of per capita incomez LRPMG = log of real price of gasoline x1 LCARPCAP = log of per capita number of cars x2 y it =  1i +  2i z it +  3i x1 it +  4i x2 it +  it.

[Topic 8-Random Parameters] 11/83 FIXED EFFECTS

[Topic 8-Random Parameters] 12/83 Parameter Heterogeneity

[Topic 8-Random Parameters] 13/83 Parameter Heterogeneity

[Topic 8-Random Parameters] 14/83 Fixed Effects (Hildreth, Houck, Hsiao, Swamy)

[Topic 8-Random Parameters] 15/83 OLS and GLS Are Inconsistent

[Topic 8-Random Parameters] 16/83 Estimating the Fixed Effects Model

[Topic 8-Random Parameters] 17/83 Random Effects and Random Parameters

[Topic 8-Random Parameters] 18/83 Estimating the Random Parameters Model

[Topic 8-Random Parameters] 19/83 Estimating the Random Parameters Model by OLS

[Topic 8-Random Parameters] 20/83 Estimating the Random Parameters Model by GLS

[Topic 8-Random Parameters] 21/83 Estimating the RPM

[Topic 8-Random Parameters] 22/83 An Estimator for Γ

[Topic 8-Random Parameters] 23/83 A Positive Definite Estimator for Γ

[Topic 8-Random Parameters] 24/83 Estimating β i

[Topic 8-Random Parameters] 25/83 OLS and FGLS Estimates | Overall OLS results for pooled sample. | | Residuals Sum of squares = | | Standard error of e = | | Fit R-squared = | |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Constant LINCOMEP LRPMG LCARPCAP | Random Coefficients Model | | Residual standard deviation =.3498 | | R squared =.5976 | | Chi-squared for homogeneity test = | | Degrees of freedom = 68 | | Probability value for chi-squared= | |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | CONSTANT LINCOMEP LRPMG LCARPCAP

[Topic 8-Random Parameters] 26/83 Best Linear Unbiased Country Specific Estimates

[Topic 8-Random Parameters] 27/83 Estimated Price Elasticities

[Topic 8-Random Parameters] 28/83 Estimated Γ

[Topic 8-Random Parameters] 29/83 Two Step Estimation (Saxonhouse)

[Topic 8-Random Parameters] 30/83 A Hierarchical Model

[Topic 8-Random Parameters] 31/83 Analysis of Fannie Mae Fannie Mae The Funding Advantage The Pass Through Passmore, W., Sherlund, S., Burgess, G., “The Effect of Housing Government-Sponsored Enterprises on Mortgage Rates,” 2005, Real Estate Economics

[Topic 8-Random Parameters] 32/83 Two Step Analysis of Fannie-Mae

[Topic 8-Random Parameters] 33/83 Average of 370 First Step Regressions SymbolVariableMeanS.D.CoeffS.E. RMRate % JJumbo LTV175%-80% LTV281%-90% LTV3>90% NewNew Home Small< $100, FeesFees paid MtgCoMtg. Co R 2 = 0.77

[Topic 8-Random Parameters] 34/83 Second Step Uses 370 Estimates of  st

[Topic 8-Random Parameters] 35/83 Estimates of β 1

[Topic 8-Random Parameters] 36/83 RANDOM EFFECTS - CONTINUOUS

[Topic 8-Random Parameters] 37/83 Continuous Parameter Variation (The Random Parameters Model)

[Topic 8-Random Parameters] 38/83 OLS and GLS Are Consistent

[Topic 8-Random Parameters] 39/83 ML Estimation of the RPM

[Topic 8-Random Parameters] 40/83 RP Gasoline Market

[Topic 8-Random Parameters] 41/83 Parameter Covariance matrix

[Topic 8-Random Parameters] 42/83 RP vs. Gen1

[Topic 8-Random Parameters] 43/83 Modeling Parameter Heterogeneity

[Topic 8-Random Parameters] 44/83 Hierarchical Linear Model COUNTRY = name of country YEAR = year, LGASPCAR = log of consumption per cary LINCOMEP = log of per capita incomez LRPMG = log of real price of gasoline x1 LCARPCAP = log of per capita number of cars x2 y it =  1i +  2i x1 it +  3i x2 it +  it.  1i =  1 +  1 z i + u 1i  2i =  2 +  2 z i + u 2i  3i =  3 +  3 z i + u 3i

[Topic 8-Random Parameters] 45/83 Estimated HLM

[Topic 8-Random Parameters] 46/83 RP vs. HLM

[Topic 8-Random Parameters] 47/83 Hierarchical Bayesian Estimation

[Topic 8-Random Parameters] 48/83 Estimation of Hierarchical Bayes Models

[Topic 8-Random Parameters] 49/83 A Hierarchical Linear Model German Health Care Data Hsat = β 1 + β 2 AGE it + γ i EDUC it + β 4 MARRIED it + ε it γ i = α 1 + α 2 FEMALE i + u i Sample ; all $ Setpanel ; Group = id ; Pds = ti $ Regress ; For [ti = 7] ; Lhs = newhsat ; Rhs = one,age,educ,married ; RPM = female ; Fcn = educ(n) ; pts = 25 ; halton ; panel ; Parameters$ Sample ; 1 – 887 $ Create ; betaeduc = beta_i $ Dstat ; rhs = betaeduc $ Histogram ; Rhs = betaeduc $

[Topic 8-Random Parameters] 50/83 OLS Results OLS Starting values for random parameters model... Ordinary least squares regression LHS=NEWHSAT Mean = Standard deviation = Number of observs. = 6209 Model size Parameters = 4 Degrees of freedom = 6205 Residuals Sum of squares = Standard error of e = Fit R-squared = Adjusted R-squared = Model test F[ 3, 6205] (prob) = 142.0(.0000) | Standard Prob. Mean NEWHSAT| Coefficient Error z z>|Z| of X Constant| *** AGE| *** MARRIED|.29664*** EDUC|.14464***

[Topic 8-Random Parameters] 51/83 Maximum Simulated Likelihood Normal exit: 27 iterations. Status=0. F= Random Coefficients LinearRg Model Dependent variable NEWHSAT Log likelihood function Estimation based on N = 6209, K = 7 Unbalanced panel has 887 individuals LINEAR regression model Simulation based on 25 Halton draws | Standard Prob. Mean NEWHSAT| Coefficient Error z z>|Z| of X |Nonrandom parameters Constant| *** AGE| *** MARRIED|.23427*** |Means for random parameters EDUC|.16580*** |Scale parameters for dists. of random parameters EDUC| *** |Heterogeneity in the means of random parameters cEDU_FEM| *** |Variance parameter given is sigma Std.Dev.| ***

[Topic 8-Random Parameters] 52/83 Simulating Conditional Means for Individual Parameters Posterior estimates of E[parameters(i) | Data(i)]

[Topic 8-Random Parameters] 53/83 “Individual Coefficients” --> Sample ; $ --> create ; betaeduc = beta_i $ --> dstat ; rhs = betaeduc $ Descriptive Statistics All results based on nonmissing observations. ============================================================================== Variable Mean Std.Dev. Minimum Maximum Cases Missing ============================================================================== All observations in current sample BETAEDUC|

[Topic 8-Random Parameters] 54/83 A Hierarchical Linear Model A hedonic model of house values Beron, K., Murdoch, J., Thayer, M., “Hierarchical Linear Models with Application to Air Pollution in the South Coast Air Basin,” American Journal of Agricultural Economics, 81, 5, 1999.

[Topic 8-Random Parameters] 55/83 Three Level HLM

[Topic 8-Random Parameters] 56/83 Mixed Model Estimation WinBUGS: MCMC User specifies the model – constructs the Gibbs Sampler/Metropolis Hastings MLWin: Linear and some nonlinear – logit, Poisson, etc. Uses MCMC for MLE (noninformative priors) SAS: Proc Mixed. Classical Uses primarily a kind of GLS/GMM (method of moments algorithm for loglinear models) Stata: Classical Several loglinear models – GLAMM. Mixing done by quadrature. Maximum simulated likelihood for multinomial choice (Arne Hole, user provided) LIMDEP/NLOGIT Classical Mixing done by Monte Carlo integration – maximum simulated likelihood Numerous linear, nonlinear, loglinear models Ken Train’s Gauss Code Monte Carlo integration Mixed Logit (mixed multinomial logit) model only (but free!) Biogeme Multinomial choice models Many experimental models (developer’s hobby) Programs differ on the models fitted, the algorithms, the paradigm, and the extensions provided to the simplest RPM,  i =  +w i.

[Topic 8-Random Parameters] 57/83 GEN 2.1 – RANDOM EFFECTS - DISCRETE

[Topic 8-Random Parameters] 58/83 Heterogeneous Production Model

[Topic 8-Random Parameters] 59/83 Parameter Heterogeneity Fixed and Random Effects Models Latent common time invariant “effects” Heterogeneity in level parameter – constant term – in the model General Parameter Heterogeneity in Models Discrete: There is more than one time of individual in the population – parameters differ across types. Produces a Latent Class Model Continuous; Parameters vary randomly across individuals: Produces a Random Parameters Model or a Mixed Model. (Synonyms)

[Topic 8-Random Parameters] 60/83 Parameter Heterogeneity

[Topic 8-Random Parameters] 61/83 Discrete Parameter Variation

[Topic 8-Random Parameters] 62/83 Example: Mixture of Normals

[Topic 8-Random Parameters] 63/83 An Extended Latent Class Model

[Topic 8-Random Parameters] 64/83 Log Likelihood for an LC Model

[Topic 8-Random Parameters] 65/83 Unmixing a Mixed Sample N[1,1] and N[5,1] Sample ; 1 – 1000$ Calc ; Ran(123457)$ Create; lc1=rnn(1,1) ; lc2=rnn(5,1)$ Create; class=rnu(0,1)$ Create; if(class<.3)ylc=lc1 ; (else)ylc=lc2$ Kernel; rhs=ylc $ Regress ; lhs=ylc;rhs=one;lcm;pts=2;pds=1$

[Topic 8-Random Parameters] 66/83 Mixture of Normals | Latent Class / Panel LinearRg Model | | Dependent variable YLC | | Number of observations 1000 | | Log likelihood function | | Info. Criterion: AIC = | | LINEAR regression model | | Model fit with 2 latent classes. | |Variable| Coefficient | Standard Error |b/St.Er.|P[|Z|>z]| Mean of X| Model parameters for latent class 1 | |Constant| *** | |Sigma | *** | Model parameters for latent class 2 | |Constant| *** | |Sigma |.95746*** | Estimated prior probabilities for class membership | |Class1Pr|.70003*** | |Class2Pr|.29997*** | | Note: ***, **, * = Significance at 1%, 5%, 10% level. |

[Topic 8-Random Parameters] 67/83 Estimating Which Class

[Topic 8-Random Parameters] 68/83 Posterior for Normal Mixture

[Topic 8-Random Parameters] 69/83 Estimated Posterior Probabilities

[Topic 8-Random Parameters] 70/83 More Difficult When the Populations are Close Together

[Topic 8-Random Parameters] 71/83 The Technique Still Works Latent Class / Panel LinearRg Model Dependent variable YLC Sample is 1 pds and 1000 individuals LINEAR regression model Model fit with 2 latent classes Variable| Coefficient Standard Error b/St.Er. P[|Z|>z] Mean of X |Model parameters for latent class 1 Constant| *** Sigma| *** |Model parameters for latent class 2 Constant|.90156*** Sigma|.86951*** |Estimated prior probabilities for class membership Class1Pr|.73447*** Class2Pr|.26553***

[Topic 8-Random Parameters] 72/83 Estimating E[β i |X i,y i, β 1 …, β Q ]

[Topic 8-Random Parameters] 73/83 How Many Classes?

[Topic 8-Random Parameters] 74/83 Latent Class Regression

[Topic 8-Random Parameters] 75/83 Baltagi and Griffin’s Gasoline Data World Gasoline Demand Data, 18 OECD Countries, 19 years Variables in the file are COUNTRY = name of country YEAR = year, LGASPCAR = log of consumption per car LINCOMEP = log of per capita income LRPMG = log of real price of gasoline LCARPCAP = log of per capita number of cars See Baltagi (2001, p. 24) for analysis of these data. The article on which the analysis is based is Baltagi, B. and Griffin, J., "Gasoline Demand in the OECD: An Application of Pooling and Testing Procedures," European Economic Review, 22, 1983, pp The data were downloaded from the website for Baltagi's text.

[Topic 8-Random Parameters] 76/83 3 Class Linear Gasoline Model

[Topic 8-Random Parameters] 77/83 Estimated Parameters LCM vs. Gen1 RPM

[Topic 8-Random Parameters] 78/83 An Extended Latent Class Model

[Topic 8-Random Parameters] 79/83 LC Poisson Regression for Doctor Visits

[Topic 8-Random Parameters] 80/83 Heckman and Singer’s RE Model Random Effects Model Random Constants with Discrete Distribution

[Topic 8-Random Parameters] 81/83 3 Class Heckman-Singer Form

[Topic 8-Random Parameters] 82/83 The EM Algorithm

[Topic 8-Random Parameters] 83/83 Implementing EM for LC Models