Day 1B Count Data Regression: Part 2

Size: px
Start display at page:

Download "Day 1B Count Data Regression: Part 2"

Transcription

1 Day 1B Count Data Regression: Part 2 A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Economics Norwegian School of Economics Advanced Microeconometrics Aug 28 - Sept 1, Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School of Economics Aug 28 - Sept Advanced 1, 2017Microeconomet 1 / 47

2 1. ntroduction 1. ntroduction Count data models are for dependent variable y = 0, 1, 2,... Previously considered basic cross-section Poisson, negative binomial, GLM s Richer models: hurdle, zero-in ated,.. Now consider mixture models endogenous regressors panel data. Many of these methods generalize to other nonlinear models. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School of Economics Aug 28 - Sept Advanced 1, 2017Microeconomet 2 / 47

3 1. ntroduction Outline 1 ntroduction 2 Finite Mixture Models 3 Endogenous Regressors 4 Short panel count regression A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School of Economics Aug 28 - Sept Advanced 1, 2017Microeconomet 3 / 47

4 2. Finite mixtures model Finite mixtures model 2. Finite mixtures model Density is weighted sum of two (or more) densities Permits exible models e.g. bimodal from Poissons. For an m-component model f (yjx, θ, π) = m j=1 π jf j (yjx, θ j ), 0 π j 1, m j=1 π j = 1. For a 2-component model f (yjx, θ 1, θ 2, π) = πf 1 (yjx, θ 1 ) + (1 π)f 2 (yjx, θ 2 ) MLE maximizes ln L(θ) = N i=1 ln(πf 1(yjx, θ 1 ) + (1 π)f 2 (yjx, θ 2 )). Can restrict some parameters to be the same. e.g. only intercept di ers EM algorithm often used rather than Newton-Raphson. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School of Economics Aug 28 - Sept Advanced 1, 2017Microeconomet 4 / 47

5 2. Finite mixtures model Finite mixtures model Determining the number of components is a nonstandard inference problem as testing at boundary of parameter space. Simple approach is to use BC or CAC. Or do appropriate bootstrap for the likelihood ratio test. An alternative to MLE is minimum Hellinger distance estimation. " # d(θ) = (p k=0 k ) 1/2 1 1/2 2 N N i=1 f (y i = kjx i, θ, π) where p k equals fraction of observations with y i = k. attraction is that it is less in uenced by outlying observations estimate using an iterative method (HELMX) A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School of Economics Aug 28 - Sept Advanced 1, 2017Microeconomet 5 / 47

6 2. Finite mixtures model Latent class model Latent class model Finite mixture model can be interpreted as a latent class model. There are two types of people (given observables x) e.g. sick type and healthy type there is a probability of being drawn from either type. Similar to unobserved heterogeneity in duration data models. Stata version 15 command fmm 2, vce(robust): poisson docvis $xlist Before version 15 there was user-written command fmm A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School of Economics Aug 28 - Sept Advanced 1, 2017Microeconomet 6 / 47

7 2. Finite mixtures model Latent class model Finite mixture model Number of obs = 3,677 Log pseudolikelihood = Class (base outcome) Robust Coef. Std. Err. z P> z [95% Conf. nterval] 2.Class _cons Class : 1 Response : docvis Model : poisson Robust Coef. Std. Err. z P> z [95% Conf. nterval] docvis private medicaid age age educyr actlim totchr _cons Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School of Economics Aug 28 - Sept Advanced 1, 2017Microeconomet 7 / 47

8 2. Finite mixtures model Latent class model Class : 2 Response : docvis Model : poisson Robust Coef. Std. Err. z P> z [95% Conf. nterval] docvis private medicaid age age educyr actlim totchr _cons Log-likelihood comparison across models: Poisson ; 2-component Poisson ; 2-component NB ; 2-component NB Last is almost exactly same as hurdle NB and ZNB (-10493).. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School of Economics Aug 28 - Sept Advanced 1, 2017Microeconomet 8 / 47

9 2. Finite mixtures model Latent class model Component 1 occurs with probability 0.65 and is low use. Component 2 occurs with probability 0.35 and is high use.. * Obtain latent class probabilities. estat lcprob Latent class marginal probabilities Number of obs = 3,677 Delta method Margin Std. Err. [95% Conf. nterval] Class * Obtain predicted mean for each individual by component. predict yfit* (option mu assumed). summarize yfit1 yfit2 Variable Obs Mean Std. Dev. Min Max yfit1 3, yfit2 3, A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School of Economics Aug 28 - Sept Advanced 1, 2017Microeconomet 9 / 47

10 2. Finite mixtures model Latent class model Density Predicted mean (# doctor visits in class 1.Class) Density Predicted mean (# doctor visits in class 2.Class). Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 10 / 47

11 3. Endogenous regressors Linear models 3. Endogenous regressor: linear model Begin with review of the linear regression model: y i = x 0 i β + u i. f regressors are correlated with error then OLS is inconsistent. Reason: OLS b β = (X 0 X) 1 X 0 y = β + (X 0 X) 1 X 0 u so plim b β = β + (plim N 1 X 0 X) 1 plim N 1 X 0 u 6= β if plim N 1 X 0 u 6= 0. Solution: Assume the existence of an instrument z where changes in z are associated with changes in x but changes in z do not led to change in y (aside from indirectly via x) z! x! y " % u Leads to instrumental variables (V) estimator and two-stage least squares (2SLS) estimator. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 11 / 47

12 3. Endogenous regressors Linear models Formally key assumption is: E[u i jz i ] = 0 Just-identi ed case (# instruments = # endogenous) bβ V = (Z 0 X) 1 Z 0 y. Over-identi ed case (# instruments > # endogenous) bβ 2SLS = [X 0 Z(Z 0 Z) 1 Z 0 X] 1 X 0 Z(Z 0 Z) 1 Z 0 y. Example: log-earnings (y) regressed on years of school (x) ability is an omitted regressor so part of error (u) and clearly correlated with x instrument z is correlated with years of school but not directly with earnings example of z may be distance from school or college. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 12 / 47

13 3. Endogenous regressors Linear models Several nterpretations of Linear V/2SLS 1. Method of Moments E[u i jz i ] = 0 ) E[z i u i ] = 0 ) E[z i (y i xi 0 β)] = 0. V solves corresponding sample moment condition N i =1 z i (y i xi 0 β) = 0 And if overidenti ed do generalized method of moments (GMM). 2. Control Function add predicted residual to control for endogeneity. OLS with additional regressor the residual from rst-stage OLS regression of y 2 on all exogenous regressors. 3. Two-Stage Least Squares OLS with endogenous regressor y 2 replaced by its predicted value by 2 from rst-stage OLS regression of y 2 on all exogenous regressors. Only methods 1 and 3 extend to nonlinear models such as Poisson. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 13 / 47

14 3. Endogenous regressors Nonlinear GMM Poisson endogenous method 1: nonlinear GMM Problem is E[(y i exp(x 0 i β))jx i ] 6= 0. Assume existence of instruments z i such that E[(y i exp(x 0 i β))jz i ] = 0 ) E[z i (y i exp(x 0 i β))] = 0 Just-identi ed case: b β MM solves n i=1 (y i exp(x 0 i β))z i = 0. Over-identi ed case b β GMM minimizes n i=1 (y i exp(x 0 i β))z i 0 W n i=1 (y i exp(x 0 i β))z i usually W = (Z 0 Z) 1 (called nonlinear 2SLS). A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 14 / 47

15 3. Endogenous regressors Nonlinear GMM Literature exists on weighting matrix W and whether to use di erent moment condition such as (yi exp(xi 0 E β) exp(xi 0β) z i = 0 Mullahy (1997), Windmeijer and Santos Silva (1997), Windmeijer (2008). We use the simpler n i=1(y i exp(x 0 i β))z i = 0. The following output was obtained using own code written using Mata A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 15 / 47

16 3. Endogenous regressors Nonlinear GMM NL2SLS: Example with private (private insurance) endogenous nstruments are income and ssiratio (soc sec income / total income) Estimate by nonlinear 2SLS:. ereturn display Coef. Std. Err. z P> z [95% Conf. nterval] private medicaid age age educyr actlim totchr cons private was (0.036) and is now (0.340) standard errors much larger with V Also medicaid changes a lot. Others change little. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 16 / 47

17 3. Endogenous regressors Control function approach Poisson endogenous method 2: control function Add error in Poisson model (allows for overdispersion and endogeneity) Structural eqn: y 1i Poisson[µ i = exp(β 1 y 2i + z1i 0 β 2 + u 1i )] Reduced-form eqn: y 2i = γ 1 z 2i + z1i 0 γ 2 + v 2i Error model: u 1i = αv 2i + ε i Then µ i jy 2i, z 1i, v 2i, ε i = exp(β 1 y 2i + z 0 1i β 2 + αv 2i + ε i ) = exp(ε i ) exp(β 1 y 2i + z 0 1i β 2 + αv 2i ) µ i jy 2i, z 1i, v 2i = E[exp(ε i )] exp(β 1 y 2i + z 0 1i β 2 + αv 2i ) = exp(β 1 y 2i + z 0 1i β 2 + αv 2i ) where if ε i is i.i.d. then E[exp(ε i )] is a constant that is absorbed in β 2. Control function approach 1. OLS of y 2 on z 2 and z 1 gives residual bv 2i = y 2i bγ 1 z 1i z2i 0 bγ Poisson of y 1i on y 2i, z 1i and bv 2i gives V estimate. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 17 / 47

18 3. Endogenous regressors Control function approach Control function approach for same example. First-stage: OLS for reduced form. global xlist2 medicaid age age2 educyr actlim totchr. regress private $xlist2 income ssiratio, vce(robust) Linear regression Number of obs = 3677 F( 8, 3668) = Prob > F = R squared = Root MSE = Robust private Coef. Std. Err. t P> t [95% Conf. nterval] medicaid age age educyr actlim totchr income ssiratio _cons A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 18 / 47

19 3. Endogenous regressors Control function approach Second stage: Poisson with rst-stage predicted residual as regressor. predict lpuhat, residual.. * Second stage Poisson with robust SEs. poisson docvis private $xlist2 lpuhat, vce(robust) nolog Poisson regression Number of obs = 3677 Wald chi2(8) = Prob > chi2 = Log pseudolikelihood = Pseudo R2 = Robust docvis Coef. Std. Err. z P> z [95% Conf. nterval] private medicaid age age educyr actlim totchr lpuhat _cons private is (0.245) compared to (0.340) for NL2SLS A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 19 / 47

20 Here little change in standard errors. A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Economics Norwegian School of Economics Advanced Microeconomet Count Regression: Part 2 Aug 28 - Sept 1, / Endogenous regressors Control function approach Should bootstrap to get correct s.e. s (lpuhat is a generated regressor). * Program and bootstrap for Poisson two step estimator. program endogtwostep, eclass 1. version tempname b 3. capture drop lpuhat2 4. regress private $xlist2 income ssiratio 5. predict lpuhat2, residual 6. poisson docvis private $xlist2 lpuhat2 7. matrix `b' = e(b) 8. ereturn post `b' 9. end. bootstrap _b, reps(400) seed(10101) nodots nowarn: endogtwostep Bootstrap results Number of obs = 3,677 Replications = 400 Observed Bootstrap Normal based Coef. Std. Err. z P> z [95% Conf. nterval] private medicaid age age educyr actlim totchr lpuhat _cons

21 3. Endogenous regressors Structural approach Poisson endogenous method 3: structural approach Example with binary endogenous regressor y 2i is Outcome eqn: y 1i Poisson[µ i = exp(β 1 y 2i + z1i 0 β 2 + δ 1u i )] Participation eqn: Pr[y 2i = 1] = Λ(z2i 0 β 2 + λ 1u i ) Error model: u i N [0, 1] Estimate using Stata 15 command gsem global xlist2 medicaid age age2 educyr actlim totchr gsem (docvis <- private $xlist2 L, poisson) /// (private <- $xlist2 income ssiratio L, logit), var(l@1) Can also extend the two-part (hurdle) model to incorporate selection This allows for correlation due to unobservables between process for y = 0 or not and process for positives. Terza (1998). A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 21 / 47

22 4. Panel data Overview 4. Panel data: linear model review Focus is on model with individual-speci c e ect y it = xit 0 β + α i + ε it, i = 1,..., N, t = 1,..., T. So di erent people have di erent unobserved intercept α i. Goal is to consistently estimate slope parameters β. Focus on short panel with N! and T small. f α i is a random e ect then pooled OLS with cluster-robust s.e. s is okay random e ects GLS/MLE may be more e cient f α i is a xed e ect, so Cov[α i, x it ] 6= 0 pooled OLS and random e ects GLS/MLE are inconsistent need xed e ects: regress (y it ȳ i ) on (x it x i ) or rst di erences: regress y it on x it. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 22 / 47

23 4. Panel data Overview Panel data: poisson model review These results carry over qualitatively to Poisson panel regression. The Poisson individual e ects model speci es conditional mean E[y it jx it, β, α i ] = exp(δ i + xit 0 β) = α i exp(xit 0 β) The e ect is multiplicative rather than additive. f α i is a random e ect then pooled Poisson with cluster-robust s.e. s is okay random e ects Poisson GLS/MLE may be more e cient f α i is a xed e ect, so Cov[α i, x it ] 6= 0 pooled Poisson and random e ects Poisson are inconsistent need xed e ects explained below or quasi rst di erences A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 23 / 47

24 4. Panel data Data example: Doctor visits (RAND) Data example: Doctor visits (RAND) Data from RAND health insurance experiment. y is number of doctor visits.. use mus18data.dta, clear. describe mdu lcoins ndisease female age lfam child id year storage display value variable name type format label variable label mdu float %9.0g number face to fact md visits lcoins float %9.0g log(coinsurance+1) ndisease float %9.0g count of chronic diseases ba female float %9.0g female age float %9.0g age that year lfam float %9.0g log of family size child float %9.0g child id float %9.0g person id, leading digit is sit year float %9.0g study year A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 24 / 47

25 4. Panel data Data example: Doctor visits (RAND) Dependent variable mdu is very overdispersed: bv[y] = ' 7 ȳ.. summarize mdu lcoins ndisease female age lfam child id year Variable Obs Mean Std. Dev. Min Max mdu lcoins ndisease female age lfam child id year A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 25 / 47

26 4. Panel data Data example: Doctor visits (RAND) Declare as panel data xtset id year Panel is unbalanced. Most are in for 3 years or 5 years.. xtdescribe id: , ,..., n = 5908 year: 1, 2,..., 5 T = 5 Delta(year) = 1 unit Span(year) = 5 periods (id*year uniquely identifies each observation) Distribution of T_i: min 5% 25% 50% 75% 95% max A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 26 / 47

27 4. Panel data Data example: Doctor visits (RAND) Time series plots for the rst 20 individuals. Much serial correlation. quietly xtline mdu if _n<=85, overlay legend(off) number face to fact md visits study year A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 27 / 47

28 4. Panel data Data example: Doctor visits (RAND) For mdu both within and between variation are important.. * Panel summary of dependent variable. xtsum mdu Variable Mean Std. Dev. Min Max Observations mdu overall N = between n = 5908 within T bar = Only time-varying regressors are age, lfam and child and these have mainly between variation this will make within or xed estimator very imprecise. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 28 / 47

29 4. Panel data Panel count estimators: Summary Panel Poisson Consider four panel Poisson estimators Pooled Poisson with cluster-robust errors Population-averaged Poisson (GEE) Poisson random e ects (gamma and normal) Poisson xed e ects Can additionally apply most of these to negative binomial. And can extend FE to dynamic panel Poisson where y i,t 1 is a regressor. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 29 / 47

30 4. Panel data Pooled Poisson Panel Poisson method 1: pooled Poisson Specify y it jx it, β Poisson[exp(xit 0 β)] Pooled Poisson of y it on intercept and x it gives consistent β. But get cluster-robust standard errors where cluster on the individual. These control for both overdispersion and correlation over t for given i. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 30 / 47

31 4. Panel data Pooled Poisson Pooled Poisson with cluster-robust standard errors. * Pooled Poisson estimator with cluster robust standard errors. poisson mdu lcoins ndisease female age lfam child, vce(cluster id) teration 0: log pseudolikelihood = teration 1: log pseudolikelihood = teration 2: log pseudolikelihood = Poisson regression Number of obs = Wald chi2(6) = Prob > chi2 = Log pseudolikelihood = Pseudo R2 = (Std. Err. adjusted for 5908 clusters in id) Robust mdu Coef. Std. Err. z P> z [95% Conf. nterval] lcoins ndisease female age lfam child _cons By comparison, the default (non cluster-robust) s.e. s are 1/4 as large. ) The default (non cluster-robust) t-statistics are 4 times as large!! A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 31 / 47

32 4. Panel data Population-averaged Poisson (PA or GEE) Panel Poisson method 2: population-averaged This method the standard method in statistics. Again assume there is no xed e ects problem. But want more e cient estimator than pooled Poisson. Assume that for the i th observation moments are like for GLM Poisson E[y it jx it ] = exp(x 0 it β) V[y it jx it ] = φ exp(x 0 it β). Assume constant correlation between y it and y is Cov[y it, y is jx it, x is ] = ρ. Estimate by the generalized estimating equations (GEE) estimator or population-averaged estimator (PA) of Liang and Zeger (1986). This is essentially nonlinear feasible GLS Get a cluster-robust estimate of the variance matrix that is correct even if Cov[y it, y is jx it, x is ] 6= ρ. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 32 / 47

33 4. Panel data Population-averaged Poisson (PA or GEE) Population-averaged Poisson with unstructured correlation xtpoisson mdu lcoins ndisease female age lfam child, /// pa corr(unstr) vce(robust) GEE population averaged model Number of obs = Group and time vars: id year Number of groups = 5908 Link: log Obs per group: min = 1 Family: Poisson avg = 3.4 Correlation: unstructured max = 5 Wald chi2(6) = Scale parameter: 1 Prob > chi2 = (Std. Err. adjusted for clustering on id) Semi robust mdu Coef. Std. Err. z P> z [95% Conf. nterval] lcoins ndisease female age lfam child _cons Generally s.e. s are within 10% of pooled Poisson cluster-robust s.e. s. The default (non cluster-robust) t-statistics are times larger, because do not control for overdispersion. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 33 / 47

34 4. Panel data Population-averaged Poisson (PA or GEE) The correlations Cor[y it, y is jx i ] for PA (unstructured) are not equal. But they are not declining as fast as AR(1).. matrix list e(r) symmetric e(r)[5,5] c1 c2 c3 c4 c5 r1 1 r r r r A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 34 / 47

35 4. Panel data Poisson random e ects Panel Poisson method 3: random e ects This method is used more in econometrics. No FE but want more e cient estimator than pooled Poisson. Poisson random e ects model is y it jx it, β, α i Poiss[α i exp(xit 0 β)] Poiss[exp(ln α i + xit 0 β)] where α i is unobserved but is not correlated with x it. RE estimator 1: Assume α i is Gamma[1, η] distributed closed-form solution exists (negative binomial) E[y it jx it, β] = exp(xit 0 β) RE estimator 2: Assume ln α i is N [0, σ 2 ε ] distributed closed-form solution does not exist (one-dimensional integral) can extend to slope coe cients (higher-dimensional integral) E[y it jx it, β] 6= exp(xit 0 β)!!! Now di erent conditional mean. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 35 / 47

36 4. Panel data Poisson random e ects Poisson random e ects (gamma) with panel bootstrap se s xtpoisson mdu lcoins ndisease female age lfam child, re vce(cluster id) Random effects Poisson regression Number of obs = 20,186 Group variable: id Number of groups = 5,908 Random effects u_i ~ Gamma Obs per group: min = 1 avg = 3.4 max = 5 Wald chi2(6) = Prob > chi2 = Log pseudolikelihood = (Std. Err. adjusted for 5,908 clusters in id) Robust Std. Err. z P> z [95% Conf. nterval] mdu Coef. lcoins ndisease female age lfam child _cons /lnalpha alpha of alpha=0: chibar2(01) = 3.9e+04 Prob >= chibar2 = LR test The default (non cluster-robust) t-statistics are 2.5 times larger because default do not control for overdispersion. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 36 / 47

37 4. Panel data Poisson xed e ects Panel Poisson method 4: xed e ects Poisson xed e ects model is y it jx it, β, α i Poiss[α i exp(x 0 it β)] Poiss[exp(ln α i + x 0 it β)] where α i is unobserved and is possibly correlated with x it. n theory need to estimate β and α 1,..., α N. potential incidental parameters problem N + K parameters and NT observations with N!. but no problem as can eliminate α i. Eliminate α i by quasi-di erencing as follows E[y it jx i1,..., x it, α i ] = α i λ it λ it = exp(x 0 it β) ) E[ȳ i jx i1,..., x it, α i ] = α i λ i λ i = T 1 t λ it ) E y it (λ it / λ i )ȳ i jxi1,..., x it = 0 The rst line assumes regressors x it are strictly exogenous. This is stronger than weakly exogenous. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 37 / 47

38 4. Panel data Poisson xed e ects The nal result implies E x it y it λ it λ i ȳ i = 0. Poisson xed e ects estimator solves the corresponding sample moment conditions N i=1 T t=1 x λ it it y it ȳ i = 0, where λ it = exp(xit λ 0 β). i Get cluster-robust standard errors Bootstrap xtpoisson, re or use add-on xtpqml. Consistency requires E[y it jx i1,..., x it, α i ] = α i exp(xit 0 β). A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 38 / 47

39 4. Panel data Poisson xed e ects Poisson xed e ects with panel bootstrap se s xtpoisson mdu lcoins ndisease female age lfam child, fe vce(robust) Conditional fixed effects Poisson regression Number of obs = 17,791 Group variable: id Number of groups = 4,977 Obs per group: min = 2 avg = 3.6 max = 5 Wald chi2(3) = 4.58 Log pseudolikelihood = Prob > chi2 = (Std. Err. adjusted for clustering on id) Robust mdu Coef. Std. Err. z P> z [95% Conf. nterval] age lfam child The default (non cluster-robust) t-statistics are 2 times larger. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 39 / 47

40 4. Panel data Poisson xed e ects Remarkably the Poisson FE estimator for β can also be obtained in the following ways under fully parametric assumption that y it jx it, β, α i Poiss[α i exp(x 0 it β)] 1. Obtain the MLE of β and α 1,..., α N. 2. Obtain the conditional MLE based on the conditional density f (y i1,..., y it jȳ i, x i1,..., x it, β, α i ) = T t=1 f (y it jx it, β, α i ) f (ȳ i jx i1,..., x it, β, α i ) But should then use cluster-robust standard errors and not default ML se s. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 40 / 47

41 4. Panel data Poisson xed e ects Strength of xed e ects versus random e ects Allows α i to be correlated with x it. So consistent estimates if regressors are correlated with the error provided regressors are correlated only with the time-invariant component of the error An alternative to V to get causal estimates. Limitations: Coe cients of time-invariant regressors are not identi ed For identi ed regressors standard errors can be much larger Marginal e ect in a nonlinear model depend on α i and α i is unknown. ME j = E[y it ]/ x it,j = α i exp(x 0 it β)β j A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 41 / 47

42 4. Panel data Estimator comparison Panel Poisson: estimator comparison Compare following estimators pooled Poisson with cluster-robust s.e. s pooled population averaged Poisson with unstructured correlations and cluster-robust s.e. s random e ects Poisson with gamma random e ect and cluster-robust s.e. s random e ects Poisson with normal random e ect and default s.e. s xed e ects Poisson and cluster-robust s.e. s Find that similar results for all but FE note that these data are not good to illustrate FE as regressors have little within variation. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 42 / 47

43 4. Panel data Estimator comparison * Comparison of Poisson panel estimators * using panel-robust standard errors global xlist lcoins ndisease female age lfam child quietly poisson mdu $xlist, vce(cluster id) estimates store POOLED quietly xtpoisson mdu $xlist, pa corr(unstr) vce(robust) estimates store POPAVE quietly xtpoisson mdu $xlist, re vce(cluster id) estimates store RE_GAMMA quietly xtpoisson mdu $xlist, re normal vce(cluster id) estimates store RE_NORMAL quietly xtpoisson mdu $xlist, fe vce(robust) estimates store FXED estimates table POOLED POPAVE RE_GAMMA RE_NORMAL FXED, /// equations(1) b(%8.4f) se stats(n ll) stfmt(%8.0f) A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 43 / 47

44 4. Panel data Estimator comparison Comparison of di erent Poisson panel estimators with panel-robust s.e. s Variable POOLED POPAVE RE_GAMMA RE_NOR~L FXED #1 lcoins ndisease female age lfam child _cons lnalpha _cons lnsig2u _cons Statistics N ll legend: b/se A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 44 / 47

45 4. Panel data Panel negative binomial Panel negative binomial Fixed and random e ects for negative binomial also exist. But e ciency gains may not be great simplest to work with Poisson but make sure get cluster-robust standard errors to control for overdispersion. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 45 / 47

46 4. Panel data Dynamic panel Dynamic panels Extend Arellano-Bond setup for linear model to nonlinear model. Sequential moment conditions E[y it jy it 1,..., y i1, x it,..., x i1, α i ] = α i λ it. Obvious model is α i λ it = α i exp(ρy i,t 1 + xit 0 β) but this is potentially explosive. May be better to use linear feedback: α i λ it = α i fρy i,t 1 + exp(xit 0 β)g Then E[y it (λ i,t 1 /λ it )y it 1 jy it 1,..., y i1, x it,..., x i1 ] = 0 So can do GMM based on moment condition E[z it fy it (λ i,t 1 /λ it )y it 1 g] = 0 where z it = (y it 1, x it ) for example. These can be coded up in Stata using the gmm command. A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 46 / 47

47 4. Panel data Dynamic panel References n addition to those given in preceding set of slides. Finite Mixture Models Deb, P. and P.K. Trivedi (2022), The structure of demand for health care: latent class versus two-part models, Journal of health economics, Panel Data Cameron, A.C., and P.K. Trivedi (2015), Count Panel Data, in B. Baltagi ed., Oxford Handbook of Panel Data, Oxford: Oxford University Press, pp A. Colin Cameron Univ. of Calif. - Davis... for Center Count of Labor Regression: Economics PartNorwegian 2 School ofaug Economics 28 - Sept Advanced 1, 2017 Microeconomet 47 / 47

Day 2A Instrumental Variables, Two-stage Least Squares and Generalized Method of Moments

Day 2A Instrumental Variables, Two-stage Least Squares and Generalized Method of Moments Day 2A nstrumental Variables, Two-stage Least Squares and Generalized Method of Moments c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based

More information

Day 3B Nonparametrics and Bootstrap

Day 3B Nonparametrics and Bootstrap Day 3B Nonparametrics and Bootstrap c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based on A. Colin Cameron and Pravin K. Trivedi (2009,2010),

More information

Day 1A Count Data Regression: Part 1

Day 1A Count Data Regression: Part 1 Day 1A Count Data Regression: Part 1 A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Economics Norwegian School of Economics Advanced Microeconometrics Aug 28 - Sept 1, 2017. Colin Cameron

More information

Day 4 Nonlinear methods

Day 4 Nonlinear methods Day 4 Nonlinear methods c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based on A. Colin Cameron and Pravin K. Trivedi (2009, 2010), Microeconometrics

More information

Day 1A Ordinary Least Squares and GLS

Day 1A Ordinary Least Squares and GLS Day 1A Ordinary Least Squares and GLS c A. Colin Cameron Univ. of Calif.- Davis Frontiers in Econometrics Bavarian Graduate Program in Economics. Based on A. Colin Cameron and Pravin K. Trivedi (2009,2010),

More information

Longitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 2017, Chicago, Illinois

Longitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 2017, Chicago, Illinois Longitudinal Data Analysis Using Stata Paul D. Allison, Ph.D. Upcoming Seminar: May 18-19, 217, Chicago, Illinois Outline 1. Opportunities and challenges of panel data. a. Data requirements b. Control

More information

Day 4A Nonparametrics

Day 4A Nonparametrics Day 4A Nonparametrics A. Colin Cameron Univ. of Calif. - Davis... for Center of Labor Economics Norwegian School of Economics Advanced Microeconometrics Aug 28 - Sep 2, 2017. Colin Cameron Univ. of Calif.

More information

Generalized method of moments estimation in Stata 11

Generalized method of moments estimation in Stata 11 Generalized method of moments estimation in Stata 11 David M. Drukker StataCorp Stata Conference Washington, DC 2009 1 / 27 Outline 1 A quick introduction to GMM 2 gmm examples Ordinary least squares Two-stage

More information

DEEP, University of Lausanne Lectures on Econometric Analysis of Count Data Pravin K. Trivedi May 2005

DEEP, University of Lausanne Lectures on Econometric Analysis of Count Data Pravin K. Trivedi May 2005 DEEP, University of Lausanne Lectures on Econometric Analysis of Count Data Pravin K. Trivedi May 2005 The lectures will survey the topic of count regression with emphasis on the role on unobserved heterogeneity.

More information

Lab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p )

Lab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p ) Lab 3: Two levels Poisson models (taken from Multilevel and Longitudinal Modeling Using Stata, p. 376-390) BIO656 2009 Goal: To see if a major health-care reform which took place in 1997 in Germany was

More information

Dynamic Panels. Chapter Introduction Autoregressive Model

Dynamic Panels. Chapter Introduction Autoregressive Model Chapter 11 Dynamic Panels This chapter covers the econometrics methods to estimate dynamic panel data models, and presents examples in Stata to illustrate the use of these procedures. The topics in this

More information

ECON 594: Lecture #6

ECON 594: Lecture #6 ECON 594: Lecture #6 Thomas Lemieux Vancouver School of Economics, UBC May 2018 1 Limited dependent variables: introduction Up to now, we have been implicitly assuming that the dependent variable, y, was

More information

Jeffrey M. Wooldridge Michigan State University

Jeffrey M. Wooldridge Michigan State University Fractional Response Models with Endogenous Explanatory Variables and Heterogeneity Jeffrey M. Wooldridge Michigan State University 1. Introduction 2. Fractional Probit with Heteroskedasticity 3. Fractional

More information

GMM Estimation in Stata

GMM Estimation in Stata GMM Estimation in Stata Econometrics I Department of Economics Universidad Carlos III de Madrid Master in Industrial Economics and Markets 1 Outline Motivation 1 Motivation 2 3 4 2 Motivation 3 Stata and

More information

Эконометрика, , 4 модуль Семинар Для Группы Э_Б2015_Э_3 Семинарист О.А.Демидова

Эконометрика, , 4 модуль Семинар Для Группы Э_Б2015_Э_3 Семинарист О.А.Демидова Эконометрика, 2017-2018, 4 модуль Семинар 3 160418 Для Группы Э_Б2015_Э_3 Семинарист ОАДемидова * Stata program * copyright C 2010 by A Colin Cameron and Pravin K Trivedi * used for "Microeconometrics

More information

Non-linear panel data modeling

Non-linear panel data modeling Non-linear panel data modeling Laura Magazzini University of Verona laura.magazzini@univr.it http://dse.univr.it/magazzini May 2010 Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 1

More information

ECONOMETRICS II (ECO 2401S) University of Toronto. Department of Economics. Spring 2013 Instructor: Victor Aguirregabiria

ECONOMETRICS II (ECO 2401S) University of Toronto. Department of Economics. Spring 2013 Instructor: Victor Aguirregabiria ECONOMETRICS II (ECO 2401S) University of Toronto. Department of Economics. Spring 2013 Instructor: Victor Aguirregabiria SOLUTION TO FINAL EXAM Friday, April 12, 2013. From 9:00-12:00 (3 hours) INSTRUCTIONS:

More information

CRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M.

CRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M. CRE METHODS FOR UNBALANCED PANELS Correlated Random Effects Panel Data Models IZA Summer School in Labor Economics May 13-19, 2013 Jeffrey M. Wooldridge Michigan State University 1. Introduction 2. Linear

More information

A Journey to Latent Class Analysis (LCA)

A Journey to Latent Class Analysis (LCA) A Journey to Latent Class Analysis (LCA) Jeff Pitblado StataCorp LLC 2017 Nordic and Baltic Stata Users Group Meeting Stockholm, Sweden Outline Motivation by: prefix if clause suest command Factor variables

More information

Simultaneous Equations with Error Components. Mike Bronner Marko Ledic Anja Breitwieser

Simultaneous Equations with Error Components. Mike Bronner Marko Ledic Anja Breitwieser Simultaneous Equations with Error Components Mike Bronner Marko Ledic Anja Breitwieser PRESENTATION OUTLINE Part I: - Simultaneous equation models: overview - Empirical example Part II: - Hausman and Taylor

More information

Econometric Analysis of Cross Section and Panel Data

Econometric Analysis of Cross Section and Panel Data Econometric Analysis of Cross Section and Panel Data Jeffrey M. Wooldridge / The MIT Press Cambridge, Massachusetts London, England Contents Preface Acknowledgments xvii xxiii I INTRODUCTION AND BACKGROUND

More information

Estimation of hurdle models for overdispersed count data

Estimation of hurdle models for overdispersed count data The Stata Journal (2011) 11, Number 1, pp. 82 94 Estimation of hurdle models for overdispersed count data Helmut Farbmacher Department of Economics University of Munich, Germany helmut.farbmacher@lrz.uni-muenchen.de

More information

Lecture 4: Linear panel models

Lecture 4: Linear panel models Lecture 4: Linear panel models Luc Behaghel PSE February 2009 Luc Behaghel (PSE) Lecture 4 February 2009 1 / 47 Introduction Panel = repeated observations of the same individuals (e.g., rms, workers, countries)

More information

Generalized linear models

Generalized linear models Generalized linear models Christopher F Baum ECON 8823: Applied Econometrics Boston College, Spring 2016 Christopher F Baum (BC / DIW) Generalized linear models Boston College, Spring 2016 1 / 1 Introduction

More information

Economics 671: Applied Econometrics Department of Economics, Finance and Legal Studies University of Alabama

Economics 671: Applied Econometrics Department of Economics, Finance and Legal Studies University of Alabama Problem Set #1 (Random Data Generation) 1. Generate =500random numbers from both the uniform 1 ( [0 1], uniformbetween zero and one) and exponential exp ( ) (set =2and let [0 1]) distributions. Plot the

More information

Ninth ARTNeT Capacity Building Workshop for Trade Research "Trade Flows and Trade Policy Analysis"

Ninth ARTNeT Capacity Building Workshop for Trade Research Trade Flows and Trade Policy Analysis Ninth ARTNeT Capacity Building Workshop for Trade Research "Trade Flows and Trade Policy Analysis" June 2013 Bangkok, Thailand Cosimo Beverelli and Rainer Lanz (World Trade Organization) 1 Selected econometric

More information

Partial effects in fixed effects models

Partial effects in fixed effects models 1 Partial effects in fixed effects models J.M.C. Santos Silva School of Economics, University of Surrey Gordon C.R. Kemp Department of Economics, University of Essex 22 nd London Stata Users Group Meeting

More information

Review of Panel Data Model Types Next Steps. Panel GLMs. Department of Political Science and Government Aarhus University.

Review of Panel Data Model Types Next Steps. Panel GLMs. Department of Political Science and Government Aarhus University. Panel GLMs Department of Political Science and Government Aarhus University May 12, 2015 1 Review of Panel Data 2 Model Types 3 Review and Looking Forward 1 Review of Panel Data 2 Model Types 3 Review

More information

4 Instrumental Variables Single endogenous variable One continuous instrument. 2

4 Instrumental Variables Single endogenous variable One continuous instrument. 2 Econ 495 - Econometric Review 1 Contents 4 Instrumental Variables 2 4.1 Single endogenous variable One continuous instrument. 2 4.2 Single endogenous variable more than one continuous instrument..........................

More information

11. Bootstrap Methods

11. Bootstrap Methods 11. Bootstrap Methods c A. Colin Cameron & Pravin K. Trivedi 2006 These transparencies were prepared in 20043. They can be used as an adjunct to Chapter 11 of our subsequent book Microeconometrics: Methods

More information

4 Instrumental Variables Single endogenous variable One continuous instrument. 2

4 Instrumental Variables Single endogenous variable One continuous instrument. 2 Econ 495 - Econometric Review 1 Contents 4 Instrumental Variables 2 4.1 Single endogenous variable One continuous instrument. 2 4.2 Single endogenous variable more than one continuous instrument..........................

More information

Panel Data. March 2, () Applied Economoetrics: Topic 6 March 2, / 43

Panel Data. March 2, () Applied Economoetrics: Topic 6 March 2, / 43 Panel Data March 2, 212 () Applied Economoetrics: Topic March 2, 212 1 / 43 Overview Many economic applications involve panel data. Panel data has both cross-sectional and time series aspects. Regression

More information

Lecture 3.1 Basic Logistic LDA

Lecture 3.1 Basic Logistic LDA y Lecture.1 Basic Logistic LDA 0.2.4.6.8 1 Outline Quick Refresher on Ordinary Logistic Regression and Stata Women s employment example Cross-Over Trial LDA Example -100-50 0 50 100 -- Longitudinal Data

More information

ECONOMETRICS FIELD EXAM Michigan State University May 9, 2008

ECONOMETRICS FIELD EXAM Michigan State University May 9, 2008 ECONOMETRICS FIELD EXAM Michigan State University May 9, 2008 Instructions: Answer all four (4) questions. Point totals for each question are given in parenthesis; there are 00 points possible. Within

More information

David M. Drukker Italian Stata Users Group meeting 15 November Executive Director of Econometrics Stata

David M. Drukker Italian Stata Users Group meeting 15 November Executive Director of Econometrics Stata Estimating the ATE of an endogenously assigned treatment from a sample with endogenous selection by regression adjustment using an extended regression models David M. Drukker Executive Director of Econometrics

More information

Estimating the Fractional Response Model with an Endogenous Count Variable

Estimating the Fractional Response Model with an Endogenous Count Variable Estimating the Fractional Response Model with an Endogenous Count Variable Estimating FRM with CEEV Hoa Bao Nguyen Minh Cong Nguyen Michigan State Universtiy American University July 2009 Nguyen and Nguyen

More information

Chapter 2. Dynamic panel data models

Chapter 2. Dynamic panel data models Chapter 2. Dynamic panel data models School of Economics and Management - University of Geneva Christophe Hurlin, Université of Orléans University of Orléans April 2018 C. Hurlin (University of Orléans)

More information

ERSA Training Workshop Lecture 5: Estimation of Binary Choice Models with Panel Data

ERSA Training Workshop Lecture 5: Estimation of Binary Choice Models with Panel Data ERSA Training Workshop Lecture 5: Estimation of Binary Choice Models with Panel Data Måns Söderbom Friday 16 January 2009 1 Introduction The methods discussed thus far in the course are well suited for

More information

Discrete Choice Modeling

Discrete Choice Modeling [Part 6] 1/55 0 Introduction 1 Summary 2 Binary Choice 3 Panel Data 4 Bivariate Probit 5 Ordered Choice 6 7 Multinomial Choice 8 Nested Logit 9 Heterogeneity 10 Latent Class 11 Mixed Logit 12 Stated Preference

More information

1 Outline. Introduction: Econometricians assume data is from a simple random survey. This is never the case.

1 Outline. Introduction: Econometricians assume data is from a simple random survey. This is never the case. 24. Strati cation c A. Colin Cameron & Pravin K. Trivedi 2006 These transparencies were prepared in 2002. They can be used as an adjunct to Chapter 24 (sections 24.2-24.4 only) of our subsequent book Microeconometrics:

More information

Outline. Linear OLS Models vs: Linear Marginal Models Linear Conditional Models. Random Intercepts Random Intercepts & Slopes

Outline. Linear OLS Models vs: Linear Marginal Models Linear Conditional Models. Random Intercepts Random Intercepts & Slopes Lecture 2.1 Basic Linear LDA 1 Outline Linear OLS Models vs: Linear Marginal Models Linear Conditional Models Random Intercepts Random Intercepts & Slopes Cond l & Marginal Connections Empirical Bayes

More information

Nonlinear Econometric Analysis (ECO 722) : Homework 2 Answers. (1 θ) if y i = 0. which can be written in an analytically more convenient way as

Nonlinear Econometric Analysis (ECO 722) : Homework 2 Answers. (1 θ) if y i = 0. which can be written in an analytically more convenient way as Nonlinear Econometric Analysis (ECO 722) : Homework 2 Answers 1. Consider a binary random variable y i that describes a Bernoulli trial in which the probability of observing y i = 1 in any draw is given

More information

xtunbalmd: Dynamic Binary Random E ects Models Estimation with Unbalanced Panels

xtunbalmd: Dynamic Binary Random E ects Models Estimation with Unbalanced Panels : Dynamic Binary Random E ects Models Estimation with Unbalanced Panels Pedro Albarran* Raquel Carrasco** Jesus M. Carro** *Universidad de Alicante **Universidad Carlos III de Madrid 2017 Spanish Stata

More information

ECON Introductory Econometrics. Lecture 16: Instrumental variables

ECON Introductory Econometrics. Lecture 16: Instrumental variables ECON4150 - Introductory Econometrics Lecture 16: Instrumental variables Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 12 Lecture outline 2 OLS assumptions and when they are violated Instrumental

More information

Lecture 8 Panel Data

Lecture 8 Panel Data Lecture 8 Panel Data Economics 8379 George Washington University Instructor: Prof. Ben Williams Introduction This lecture will discuss some common panel data methods and problems. Random effects vs. fixed

More information

Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data

Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data July 2012 Bangkok, Thailand Cosimo Beverelli (World Trade Organization) 1 Content a) Classical regression model b)

More information

Warwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation

Warwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation Warwick Economics Summer School Topics in Microeconometrics Instrumental Variables Estimation Michele Aquaro University of Warwick This version: July 21, 2016 1 / 31 Reading material Textbook: Introductory

More information

multilevel modeling: concepts, applications and interpretations

multilevel modeling: concepts, applications and interpretations multilevel modeling: concepts, applications and interpretations lynne c. messer 27 october 2010 warning social and reproductive / perinatal epidemiologist concepts why context matters multilevel models

More information

Dynamic Panel Data Models

Dynamic Panel Data Models Models Amjad Naveed, Nora Prean, Alexander Rabas 15th June 2011 Motivation Many economic issues are dynamic by nature. These dynamic relationships are characterized by the presence of a lagged dependent

More information

Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data

Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data The 3rd Australian and New Zealand Stata Users Group Meeting, Sydney, 5 November 2009 1 Model and Working Correlation Structure Selection in GEE Analyses of Longitudinal Data Dr Jisheng Cui Public Health

More information

Lecture#12. Instrumental variables regression Causal parameters III

Lecture#12. Instrumental variables regression Causal parameters III Lecture#12 Instrumental variables regression Causal parameters III 1 Demand experiment, market data analysis & simultaneous causality 2 Simultaneous causality Your task is to estimate the demand function

More information

Appendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator

Appendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator Appendix A. Numeric example of Dimick Staiger Estimator and comparison between Dimick-Staiger Estimator and Hierarchical Poisson Estimator As described in the manuscript, the Dimick-Staiger (DS) estimator

More information

Lecture 3 Linear random intercept models

Lecture 3 Linear random intercept models Lecture 3 Linear random intercept models Example: Weight of Guinea Pigs Body weights of 48 pigs in 9 successive weeks of follow-up (Table 3.1 DLZ) The response is measures at n different times, or under

More information

Practice 2SLS with Artificial Data Part 1

Practice 2SLS with Artificial Data Part 1 Practice 2SLS with Artificial Data Part 1 Yona Rubinstein July 2016 Yona Rubinstein (LSE) Practice 2SLS with Artificial Data Part 1 07/16 1 / 16 Practice with Artificial Data In this note we use artificial

More information

xtdpdqml: Quasi-maximum likelihood estimation of linear dynamic short-t panel data models

xtdpdqml: Quasi-maximum likelihood estimation of linear dynamic short-t panel data models xtdpdqml: Quasi-maximum likelihood estimation of linear dynamic short-t panel data models Sebastian Kripfganz University of Exeter Business School, Department of Economics, Exeter, UK UK Stata Users Group

More information

options description set confidence level; default is level(95) maximum number of iterations post estimation results

options description set confidence level; default is level(95) maximum number of iterations post estimation results Title nlcom Nonlinear combinations of estimators Syntax Nonlinear combination of estimators one expression nlcom [ name: ] exp [, options ] Nonlinear combinations of estimators more than one expression

More information

Latent class analysis and finite mixture models with Stata

Latent class analysis and finite mixture models with Stata Latent class analysis and finite mixture models with Stata Isabel Canette Principal Mathematician and Statistician StataCorp LLC 2017 Stata Users Group Meeting Madrid, October 19th, 2017 Introduction Latent

More information

2. We care about proportion for categorical variable, but average for numerical one.

2. We care about proportion for categorical variable, but average for numerical one. Probit Model 1. We apply Probit model to Bank data. The dependent variable is deny, a dummy variable equaling one if a mortgage application is denied, and equaling zero if accepted. The key regressor is

More information

Chapter 6. Panel Data. Joan Llull. Quantitative Statistical Methods II Barcelona GSE

Chapter 6. Panel Data. Joan Llull. Quantitative Statistical Methods II Barcelona GSE Chapter 6. Panel Data Joan Llull Quantitative Statistical Methods II Barcelona GSE Introduction Chapter 6. Panel Data 2 Panel data The term panel data refers to data sets with repeated observations over

More information

Lab 07 Introduction to Econometrics

Lab 07 Introduction to Econometrics Lab 07 Introduction to Econometrics Learning outcomes for this lab: Introduce the different typologies of data and the econometric models that can be used Understand the rationale behind econometrics Understand

More information

ECON Introductory Econometrics. Lecture 11: Binary dependent variables

ECON Introductory Econometrics. Lecture 11: Binary dependent variables ECON4150 - Introductory Econometrics Lecture 11: Binary dependent variables Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 11 Lecture Outline 2 The linear probability model Nonlinear probability

More information

Repeated observations on the same cross-section of individual units. Important advantages relative to pure cross-section data

Repeated observations on the same cross-section of individual units. Important advantages relative to pure cross-section data Panel data Repeated observations on the same cross-section of individual units. Important advantages relative to pure cross-section data - possible to control for some unobserved heterogeneity - possible

More information

Control Function and Related Methods: Nonlinear Models

Control Function and Related Methods: Nonlinear Models Control Function and Related Methods: Nonlinear Models Jeff Wooldridge Michigan State University Programme Evaluation for Policy Analysis Institute for Fiscal Studies June 2012 1. General Approach 2. Nonlinear

More information

Econometrics Midterm Examination Answers

Econometrics Midterm Examination Answers Econometrics Midterm Examination Answers March 4, 204. Question (35 points) Answer the following short questions. (i) De ne what is an unbiased estimator. Show that X is an unbiased estimator for E(X i

More information

INTRODUCTION TO BASIC LINEAR REGRESSION MODEL

INTRODUCTION TO BASIC LINEAR REGRESSION MODEL INTRODUCTION TO BASIC LINEAR REGRESSION MODEL 13 September 2011 Yogyakarta, Indonesia Cosimo Beverelli (World Trade Organization) 1 LINEAR REGRESSION MODEL In general, regression models estimate the effect

More information

New Developments in Econometrics Lecture 11: Difference-in-Differences Estimation

New Developments in Econometrics Lecture 11: Difference-in-Differences Estimation New Developments in Econometrics Lecture 11: Difference-in-Differences Estimation Jeff Wooldridge Cemmap Lectures, UCL, June 2009 1. The Basic Methodology 2. How Should We View Uncertainty in DD Settings?

More information

Instrumental Variables. Ethan Kaplan

Instrumental Variables. Ethan Kaplan Instrumental Variables Ethan Kaplan 1 Instrumental Variables: Intro. Bias in OLS: Consider a linear model: Y = X + Suppose that then OLS yields: cov (X; ) = ^ OLS = X 0 X 1 X 0 Y = X 0 X 1 X 0 (X + ) =)

More information

Econometrics. 8) Instrumental variables

Econometrics. 8) Instrumental variables 30C00200 Econometrics 8) Instrumental variables Timo Kuosmanen Professor, Ph.D. http://nomepre.net/index.php/timokuosmanen Today s topics Thery of IV regression Overidentification Two-stage least squates

More information

Applied Econometrics. Lecture 3: Introduction to Linear Panel Data Models

Applied Econometrics. Lecture 3: Introduction to Linear Panel Data Models Applied Econometrics Lecture 3: Introduction to Linear Panel Data Models Måns Söderbom 4 September 2009 Department of Economics, Universy of Gothenburg. Email: mans.soderbom@economics.gu.se. Web: www.economics.gu.se/soderbom,

More information

Bootstrap-Based Improvements for Inference with Clustered Errors

Bootstrap-Based Improvements for Inference with Clustered Errors Bootstrap-Based Improvements for Inference with Clustered Errors Colin Cameron, Jonah Gelbach, Doug Miller U.C. - Davis, U. Maryland, U.C. - Davis May, 2008 May, 2008 1 / 41 1. Introduction OLS regression

More information

Dealing With and Understanding Endogeneity

Dealing With and Understanding Endogeneity Dealing With and Understanding Endogeneity Enrique Pinzón StataCorp LP October 20, 2016 Barcelona (StataCorp LP) October 20, 2016 Barcelona 1 / 59 Importance of Endogeneity Endogeneity occurs when a variable,

More information

ESTIMATING AVERAGE TREATMENT EFFECTS: REGRESSION DISCONTINUITY DESIGNS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics

ESTIMATING AVERAGE TREATMENT EFFECTS: REGRESSION DISCONTINUITY DESIGNS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics ESTIMATING AVERAGE TREATMENT EFFECTS: REGRESSION DISCONTINUITY DESIGNS Jeff Wooldridge Michigan State University BGSE/IZA Course in Microeconometrics July 2009 1. Introduction 2. The Sharp RD Design 3.

More information

A Course in Applied Econometrics Lecture 14: Control Functions and Related Methods. Jeff Wooldridge IRP Lectures, UW Madison, August 2008

A Course in Applied Econometrics Lecture 14: Control Functions and Related Methods. Jeff Wooldridge IRP Lectures, UW Madison, August 2008 A Course in Applied Econometrics Lecture 14: Control Functions and Related Methods Jeff Wooldridge IRP Lectures, UW Madison, August 2008 1. Linear-in-Parameters Models: IV versus Control Functions 2. Correlated

More information

Applied Microeconometrics (L5): Panel Data-Basics

Applied Microeconometrics (L5): Panel Data-Basics Applied Microeconometrics (L5): Panel Data-Basics Nicholas Giannakopoulos University of Patras Department of Economics ngias@upatras.gr November 10, 2015 Nicholas Giannakopoulos (UPatras) MSc Applied Economics

More information

GMM-based inference in the AR(1) panel data model for parameter values where local identi cation fails

GMM-based inference in the AR(1) panel data model for parameter values where local identi cation fails GMM-based inference in the AR() panel data model for parameter values where local identi cation fails Edith Madsen entre for Applied Microeconometrics (AM) Department of Economics, University of openhagen,

More information

The Regression Tool. Yona Rubinstein. July Yona Rubinstein (LSE) The Regression Tool 07/16 1 / 35

The Regression Tool. Yona Rubinstein. July Yona Rubinstein (LSE) The Regression Tool 07/16 1 / 35 The Regression Tool Yona Rubinstein July 2016 Yona Rubinstein (LSE) The Regression Tool 07/16 1 / 35 Regressions Regression analysis is one of the most commonly used statistical techniques in social and

More information

4.8 Instrumental Variables

4.8 Instrumental Variables 4.8. INSTRUMENTAL VARIABLES 35 4.8 Instrumental Variables A major complication that is emphasized in microeconometrics is the possibility of inconsistent parameter estimation due to endogenous regressors.

More information

Economics 582 Random Effects Estimation

Economics 582 Random Effects Estimation Economics 582 Random Effects Estimation Eric Zivot May 29, 2013 Random Effects Model Hence, the model can be re-written as = x 0 β + + [x ] = 0 (no endogeneity) [ x ] = = + x 0 β + + [x ] = 0 [ x ] = 0

More information

Confidence intervals for the variance component of random-effects linear models

Confidence intervals for the variance component of random-effects linear models The Stata Journal (2004) 4, Number 4, pp. 429 435 Confidence intervals for the variance component of random-effects linear models Matteo Bottai Arnold School of Public Health University of South Carolina

More information

Econometrics of Panel Data

Econometrics of Panel Data Econometrics of Panel Data Jakub Mućk Meeting # 6 Jakub Mućk Econometrics of Panel Data Meeting # 6 1 / 36 Outline 1 The First-Difference (FD) estimator 2 Dynamic panel data models 3 The Anderson and Hsiao

More information

Strength and weakness of instruments in IV and GMM estimation of dynamic panel data models

Strength and weakness of instruments in IV and GMM estimation of dynamic panel data models Strength and weakness of instruments in IV and GMM estimation of dynamic panel data models Jan F. Kiviet (University of Amsterdam & Tinbergen Institute) preliminary version: January 2009 JEL-code: C3;

More information

We begin by thinking about population relationships.

We begin by thinking about population relationships. Conditional Expectation Function (CEF) We begin by thinking about population relationships. CEF Decomposition Theorem: Given some outcome Y i and some covariates X i there is always a decomposition where

More information

Econometrics of Panel Data

Econometrics of Panel Data Econometrics of Panel Data Jakub Mućk Meeting # 1 Jakub Mućk Econometrics of Panel Data Meeting # 1 1 / 31 Outline 1 Course outline 2 Panel data Advantages of Panel Data Limitations of Panel Data 3 Pooled

More information

A Course in Applied Econometrics Lecture 18: Missing Data. Jeff Wooldridge IRP Lectures, UW Madison, August Linear model with IVs: y i x i u i,

A Course in Applied Econometrics Lecture 18: Missing Data. Jeff Wooldridge IRP Lectures, UW Madison, August Linear model with IVs: y i x i u i, A Course in Applied Econometrics Lecture 18: Missing Data Jeff Wooldridge IRP Lectures, UW Madison, August 2008 1. When Can Missing Data be Ignored? 2. Inverse Probability Weighting 3. Imputation 4. Heckman-Type

More information

Workshop for empirical trade analysis. December 2015 Bangkok, Thailand

Workshop for empirical trade analysis. December 2015 Bangkok, Thailand Workshop for empirical trade analysis December 2015 Bangkok, Thailand Cosimo Beverelli (WTO) Rainer Lanz (WTO) Content (I) a. Classical regression model b. Introduction to panel data analysis c. Basic

More information

MC3: Econometric Theory and Methods. Course Notes 4

MC3: Econometric Theory and Methods. Course Notes 4 University College London Department of Economics M.Sc. in Economics MC3: Econometric Theory and Methods Course Notes 4 Notes on maximum likelihood methods Andrew Chesher 25/0/2005 Course Notes 4, Andrew

More information

Notes on Generalized Method of Moments Estimation

Notes on Generalized Method of Moments Estimation Notes on Generalized Method of Moments Estimation c Bronwyn H. Hall March 1996 (revised February 1999) 1. Introduction These notes are a non-technical introduction to the method of estimation popularized

More information

Applied Health Economics (for B.Sc.)

Applied Health Economics (for B.Sc.) Applied Health Economics (for B.Sc.) Helmut Farbmacher Department of Economics University of Mannheim Autumn Semester 2017 Outlook 1 Linear models (OLS, Omitted variables, 2SLS) 2 Limited and qualitative

More information

Quantitative Methods Final Exam (2017/1)

Quantitative Methods Final Exam (2017/1) Quantitative Methods Final Exam (2017/1) 1. Please write down your name and student ID number. 2. Calculator is allowed during the exam, but DO NOT use a smartphone. 3. List your answers (together with

More information

ECON Introductory Econometrics. Lecture 13: Internal and external validity

ECON Introductory Econometrics. Lecture 13: Internal and external validity ECON4150 - Introductory Econometrics Lecture 13: Internal and external validity Monique de Haan (moniqued@econ.uio.no) Stock and Watson Chapter 9 Lecture outline 2 Definitions of internal and external

More information

Using generalized structural equation models to fit customized models without programming, and taking advantage of new features of -margins-

Using generalized structural equation models to fit customized models without programming, and taking advantage of new features of -margins- Using generalized structural equation models to fit customized models without programming, and taking advantage of new features of -margins- Isabel Canette Principal Mathematician and Statistician StataCorp

More information

Some Stata commands for endogeneity in nonlinear panel-data models

Some Stata commands for endogeneity in nonlinear panel-data models Some Stata commands for endogeneity in nonlinear panel-data models David M. Drukker Director of Econometrics Stata 2014 German Stata Users Group meeting June 13, 2014 1 / 51 Overview Two approaches to

More information

Empirical Application of Panel Data Regression

Empirical Application of Panel Data Regression Empirical Application of Panel Data Regression 1. We use Fatality data, and we are interested in whether rising beer tax rate can help lower traffic death. So the dependent variable is traffic death, while

More information

Regression with a Single Regressor: Hypothesis Tests and Confidence Intervals

Regression with a Single Regressor: Hypothesis Tests and Confidence Intervals Regression with a Single Regressor: Hypothesis Tests and Confidence Intervals (SW Chapter 5) Outline. The standard error of ˆ. Hypothesis tests concerning β 3. Confidence intervals for β 4. Regression

More information

Panel Data Models. James L. Powell Department of Economics University of California, Berkeley

Panel Data Models. James L. Powell Department of Economics University of California, Berkeley Panel Data Models James L. Powell Department of Economics University of California, Berkeley Overview Like Zellner s seemingly unrelated regression models, the dependent and explanatory variables for panel

More information

Limited Dependent Variable Models II

Limited Dependent Variable Models II Limited Dependent Variable Models II Fall 2008 Environmental Econometrics (GR03) LDV Fall 2008 1 / 15 Models with Multiple Choices The binary response model was dealing with a decision problem with two

More information

Topic 10: Panel Data Analysis

Topic 10: Panel Data Analysis Topic 10: Panel Data Analysis Advanced Econometrics (I) Dong Chen School of Economics, Peking University 1 Introduction Panel data combine the features of cross section data time series. Usually a panel

More information

Exam ECON5106/9106 Fall 2018

Exam ECON5106/9106 Fall 2018 Exam ECO506/906 Fall 208. Suppose you observe (y i,x i ) for i,2,, and you assume f (y i x i ;α,β) γ i exp( γ i y i ) where γ i exp(α + βx i ). ote that in this case, the conditional mean of E(y i X x

More information

Chapter 6: Endogeneity and Instrumental Variables (IV) estimator

Chapter 6: Endogeneity and Instrumental Variables (IV) estimator Chapter 6: Endogeneity and Instrumental Variables (IV) estimator Advanced Econometrics - HEC Lausanne Christophe Hurlin University of Orléans December 15, 2013 Christophe Hurlin (University of Orléans)

More information

Lecture 8: Instrumental Variables Estimation

Lecture 8: Instrumental Variables Estimation Lecture Notes on Advanced Econometrics Lecture 8: Instrumental Variables Estimation Endogenous Variables Consider a population model: y α y + β + β x + β x +... + β x + u i i i i k ik i Takashi Yamano

More information