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 / 29
Binary models... In many economic studies, the dependent variable is discrete car purchase, labor force participation, default on a loan,... Binary choice modeling: y it = 1 if the event happens for individual (household, firm,...) i at time t, 0 otherwise p it = Pr(y it = 1) = E(y it x it ) = F (x itβ) For estimation: LPM, logit, probit Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 2 / 29
... in panel data The presence of individual effects complicates matters significantly LPM also implies x it β c i 1 x it β In a latent variable framework (i = 1,..., N; t = 1,..., T ) y it = x itβ + c i + u it with y it = 1 if y it > 0, y it = 0 otherwise Therefore: Pr(y it = 1) = Pr(y it > 0) = Pr(u it > x itβ c i ) = F (x itβ + c i ) due to the simmetry of logit and probit Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 3 / 29
FE and RE approach Pr(y it = 1) = F (x itβ + c i ) RE approach: c i is assumed to be unrelated to x it Stronger assumption than the linear case: also place restrictions on the form of heterogeneity FE approach: no assumption about the relationship between c i and x it Modeling framework fraught with difficulties and unconventional estimation problems Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 4 / 29
The incidental parameter problem Neyman and Scott (1948) Pr(y it = 1) = F (x itβ + c i ) If you want to treat c i as a fixed parameter, then as N, for fixed T, the number of parameters c i increases with N This means that c i cannot be consistently estimated for fixed T In the linear case the problem is solved using the within-transformation In the linear case the MLE of β and c i are asymptotically independent (Hsiao, 2003) This is not possible in the non-linear case! The inconsistency of ĉ i is transmitted to ˆβ within a FE framework Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 5 / 29
The incidental parameter problem A simple example Suppose y it N(c i, σ 2 ) MLE yields: n t ĉ i = ȳ i and ˆσ 2 i=1 t=1 = (y it ȳ 1 ) 2 NT E[ˆσ 2 ] = σ 2 (T 1)/T, so ˆσ 2 is inconsistent for N for fixed T With T = 2, ˆσ 2 0.5σ 2 Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 6 / 29
Road map Pooled probit Random effect approach Fixed effect approach How serious is the bias? Alternative approach: max score estimator Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 7 / 29
Pooled probit or logit (1) Partial likelihood methods Max Lik estimation: we assume that the parametric model for the density of y given x is correctly specified Inference is made under the assumption that observations are i.i.d., i.e. in case of a panel dataset, the likelihood should be written as L(θ y, x) = N i=1 t=1 T f (y it x it ; θ) This is not suited to the panel data case! Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 8 / 29
Pooled probit or logit (2) Partial likelihood methods Suppose we have correctly specified the density of y t given x t : f t (y t x t ; θ) Define the partial log likelihood of each observation as l i (θ) = T ln f t (y t x t ; θ) t=1 The partial maximum likelihood estimator (PMLE) solves max θ Θ N i=1 l i (θ) = max θ Θ N i=1 t=1 T ln f t (y t x t ; θ) Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 9 / 29
Dynamic completeness A model is dynamic complete if once x t is conditioned on, neither past lags of y t nor elements of x from any other time period (past or future) appear in the conditional density of y t given x t Quite a strong assumption: strict exogeneity + absence of dynamics Pr(y it = 1 x it, y it 1, x it 1,...) = Pr(y it = 1 x it ) Inference is considerably easier: all the usual statistics from a probit or logit that pools observations and treats the sample as a long independent cross section of size NT are valid, including likelihood ratio statistics We are not assuming independence across t For example, x it can contain lagged dependent variables DC implies that the scores are serially uncorrelated across t (the key condition for the standard inference procedures to be valid) Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 10 / 29
Testing dynamic completeness (1) Add lagged dependent variable and possibly lagged explanatory variables (2) Chi-square statistic: Define u it = y it F (x it β) Under DC, for each t: E[u it x it, y it 1, x it 1,...] = 0, i.e. u it is uncorrelated with any function of the variables (x it, y it 1, x it 1,...) including u it 1 Let û it = y it F (x it β). A simple test is available by using pooled data to estimate the artificial model Pr(y it = 1 x it, û it 1 ) = F (x itβ + γû it 1 ) The null hypothesis is H0: γ = 0 Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 11 / 29
Random effect probit approach (1) y it = x itβ + ε it with y it = 1 y it >0 We let ε it = c i + u it and assume: Strict exogeneity assumption: Pr(y it = 1 x i, c i ) = Pr(y it = 1 x it, c i ) Independence between c i and x it Normally distributed error components: c i N(0, σ 2 c ) and u it N(0, σ 2 u) Since E(ε it ε is ) = σc 2 for t s, the joint likelihood of (y i1,..., y it ) cannot be written as the product of the marginal likelihood of the y it This complicates derivation of the max lik that now involves T -dimensional integrals L i = Pr(y i1,..., y it x) =... f (ε i1,..., ε it )dε i1...dε it Extreme of integration is (, x it β) if y it = 0 and ( x it β, + ) if y it = 1 Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 12 / 29
Random effect probit approach (2) Computation of the likelihood function is simplified if we consider the joint density of ε i and c i and then obtain the marginal density of ε i integrating out the individual effect: f (ε i1,..., ε it, c i ) = f (ε i1,..., ε it c i )f (c i ) Therefore: f (ε i1,..., ε it ) = f (ε i1,..., ε it c i )f (c i )dc i Conditional on c i, ε it are independent f (ε i1,..., ε it ) = T t=1 f (ε it c i )f (c i )dc i Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 13 / 29
Random effect probit approach (3) This simplifies the computation of the likelihood Key: lack of autocorrelation over time in u it Allowing autocorrelation in u it : hallmark of simulation methods (Hajivassiliou, 1984) L i = Pr(y i1,..., y it x) =... f (ε i1,..., ε it )dε i1...dε it = = = [ +... ] T f (ε it c i )f (c i )dc i dε i1...dε it t=1 Ranges of integration are independent: exchange order of int. + T [... f (ε it c i )dε i1...dε it ] t=1 Conditioned on c i, the error terms are independent + [ T t=1 f (ε it c i )dε it ] f (c i )dc i f (c i )dc i Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 14 / 29
Random effect probit approach (4) L i = = + + [ T ] f (ε it c i )dε it f (c i )dc i t=1 [ T ] Pr(Y it = y it x itβ + c i ) f (c i )dc i t=1 We are left with one-dimensional integral! Pr(Y it = y it x it β + c i) = Φ(q it (x it β + c i)) with q it = 2y it 1 Butler and Moffit (1982) proposes a procedure to approximate the integral under normality of c i (Gaussian quadrature) Alternatively, simulated-maximum likelihood methods Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 15 / 29
RE What are we estimating? Pr(y it = 1 x i, c i ) = Pr(y it = 1 x it, c i ) = Φ(x itβ + c i ) The interest is in average partial effect [ ] ( ) Pr(yit = 1 x i, c i ) β j x E = φ it β 1 + σ 2 c 1 + σ 2 c x it(j) The traditional random effect probit model assumes c i x i N(0, σ 2 c) As a result the composite error term of the latent equation has variance 1 + σ 2 c Recall APE in the case of neglected heterogeneity (for a continuous x it(j) ) Therefore by pooled probit we can estimate β c = β/(1 + σ 2 c ) 1/2 and APE If we further assume independence of (y i1,..., y it ) conditional on (x i, c i ) we can separately estimate β and σ 2 c ρ = σ 2 c /(1 + σ 2 c ): relative importance of the unobserved effect Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 16 / 29
RE allowing for correlation between c i and x i Chamberlain (1980) Chamberlain (1980) allowed for correlation between c i and x i under the assumption of conditional normal distribution with linear expectation and constant variance: c i x i N(ψ + x iξ, σ 2 α) The approach allows some dependence of c i on x i In its original formulation, all elements of x i are included in the conditional distribution The proposed formulation is more conservative on parameters Known as Chamberlain s random effect probit model Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 17 / 29
Chamberlain s random effect probit model c i x i N(ψ + x i ξ, σ 2 α) We can write y it = x itβ + c i + u it = x itβ + ψ + x iξ + u it Estimation is straightforward: we include x i among the regressor of a RE probit model As in the linear case, it is not possible to estimate the effect of time-invariant variables Intuitively, we are adding x i as a control for unobserved heterogeneity A test of the usual RE probit model is easily obtained as a test of H0: ξ = 0 Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 18 / 29
RE & the strict exogeneity assumption Wooldridge, 2003 (pag. 490) RE estimation relies on the strict exogeneity assumption Correcting for an explanatory variable that is not strictly exogenous is quite difficult in nonlinear models (see Wooldridge, 2000) It is however possible to test for strict exo: Let w it denote a variable suspected of failing the strict exogeneity requirement (subset of x it ) A simple test adds w it+1 as an additional set of covariates If strict exo holds, w it+1 should be insignificant If the test does not reject, it provides at least some justification for the strict exo assumption Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 19 / 29
Fixed Effect approach FE in non-linear model: unsolved problem in econometrics Incidental parameter problem If you force estimation (by including dummies), how serious is the bias? Consider a logit model with T = 2; one regressor with x i1 = 0 and x i2 = 1: plim ˆβ MLE = 2β (Hsiao, 2003) Simulation experiment by Greene (2004): MLE is biased even for large T however it improves as T increases. The bias is 100% with T = 2; 16% with T = 10 and 6.9% with T = 20 (N = 1000) Simulation experiment by Heckman and MaCurdy (1981), the bias is about 10% (N = 100; T = 8) Trade-off between the virtue of FE and incidental parameter problem (Arellano, 2001) The problem can be solved in the logit (and poisson) models Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 20 / 29
Conditional maximum likelihood estimation (1) For the logit model, Chamberlain (1980) finds that T t=1 y it is a minimal sufficient statistics for c i Put it differently, conditioned on n i = T t=1 y it, the log-lik does not contain c i, solving the incidental parameter problem Consider the case T = 2 The conditional likelihood can be computed by looking at L c = N i=1 Pr(y i1, y i2 2 t=1 y it) The sum y i1 + y i2 can be 0, 1, 2 If y i1 + y i2 = 0, then y i1 = y i2 = 0: Pr(0, 0 sum = 0) = 1 If y i1 + y i2 = 2, then y i1 = y i2 = 1: Pr(1, 1 sum = 2) = 1 Only units where y i1 + y i2 = 1 will contribute to the log-lik Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 21 / 29
Conditional maximum likelihood estimation (2) Pr(0, 1 sum = 1) = Pr(0, 1, sum = 1) Pr(sum = 1) = Pr(0, 1) Pr(0, 1) + Pr(1, 0) Therefore the conditional probability can be written in a form that does not contain c i : Pr(0, 1 1) = = = Pr 1 (0) Pr 2 (1) Pr 1 (0) Pr 2 (1) + Pr 1 (1) Pr 2 (0) 1 exp(x 1+exp(x i1 β+c i2 β+c i ) i ) 1+exp(x i2 β+c i ) 1 exp(x 1+exp(x i1 β+c i2 β+c i ) i ) 1+exp(x i2 β+c i ) + exp(x i1 β+c i ) 1 1+exp(x i1 β+c i ) 1+exp(x i2 β+c i ) exp(x i2 β) exp(x i1 β) + exp(x i2 β) = exp[(x i2 x i1 ) β] 1 + exp[(x i2 x i1 ) β] Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 22 / 29
Conditional maximum likelihood estimation (3) Analogously: Pr(1, 0 1) = exp(x i1 β) exp(x i1 β) + exp(x i2 β) = 1 1 + exp[(x i2 x i1 ) β] Standard logit package can be used for estimation Only observations where y i1 + y i2 = 1 contribute to the likelihood Easily generalized to T > 2 Test for individual heterogeneity by Hausman s test comparing conditional MLE and the usual MLE ignoring the effects Conditional lik approach not available with probit Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 23 / 29
Max score estimator (MSE) Manski (1975, 1987) It is possible to relax the logit assumption by generalizing the MSE to panel data In cross-section let q i = 2y i 1 and α a preset quantile MSE is based on the fitting rule max S(β) = 1 N [q i (1 2α)]sgn(x i β) N i=1 If α = 1/2 then (1 2α) and the MSE is computed as max S(β) = 1 N N q i sgn(x i β) i=1 It max the number of times the predictor x i β has the same sign as q i (i.e. it max the number of correct predictions) Identification condition: β β = 1 Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 24 / 29
Manski estimator with panel data Manski allows for a strictly increasing distribution function which differs across individuals, but not over time for the same individual Strict exo is still needed (lagged dep vars are ruled out) For T = 2, the identification of β is based on the fact that (under regularity conditions on the distribution of exogenous variables) sgn[pr(y i2 = 1 x i, c i ) Pr(y i1 = 1 x i, c i )] = sgn[(x i2 x i1 ) β] For panel, MSE can be applied to the differences y it on x it Exploit only the observations where y i1 y i2 Note that there is no likelihood, no information matrix, no s.e.: bootstrap can be employed for computing s.e. No functional form for Pr(y it = 1), therefore no marginal effects Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 25 / 29
Overview of STATA commands For probit, xtprobit only allows re approach There is no command for a conditional FE model, as there does not exist a sufficient statistic allowing the fixed effects to be conditioned out of the likelihood Estimation is slow because the likelihood function is calculated by adaptive Gauss-Hermite quadrature Computation time is roughly proportional to the number of points used for the quadrature; the default is intpoints(12) Use quadchk to check sensitivity of quadrature approximation In the case of xtlogit, both re and fe options can be considered fe is conditional fixed-effect (also obtained by clogit) re estimates are obtained under the assumption of normality of c i MSE not implemented (feasible up to 15 coeffs and 1,500-2,000 observations) Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 26 / 29
Censored regression model Unobserved effect Tobit model yit = x itβ c i + u it y it = max(0, yit) u it x i, c i N(0, σu) 2 Analogous treatment to the probit case FE approach provides inconsistent estimates RE Need to specify the distribution of c i x i N(0, σc) 2 Approximation is needed for solving the integral in the probit part Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 27 / 29
Count data and panel data models Leading ref: Hausman, Hall, Griliches (1984) developed fixed and random effect models under full distributional assumptions Pooled Poisson QMLE Conditional estimation of fixed effect models Sufficient statistics: n i = T t=1 y it Random effect approach (Gamma distribution assumed for c i ) Recent advances in simulation methods allow c i N Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 28 / 29
Main references Arellano M, Honoré B (2001): Panel Data Models: Some Recent Developments, Handbook of Econometrics Chamberlain G (1980): Analysis of Covariance with Qualitative Data, Review of Economic Studies 47, 225 238 Chamberlain G (1984): Panel Data, in Griliches Intriligator (eds) Handbook of Econometrics, 1247 1318 Greene WH (2003): Econometric Analysis, ch.21 Baltagi BH (2008): Econometric Analysis of Panel Data (4th ed.), ch.11 Hajivassiliou VA (1984): Estimation by Simulation of External Debt Repayment Problems, Journal of Applied Econometrics 9, 109 132 Hsiao C (2003): Analysis of Panel Data Wooldridge, JM (2002): Econometric Analysis of Cross Section and Panel Data, ch.15 Laura Magazzini (@univr.it) Non-linear panel data modeling May 2010 29 / 29