xtlhazard linear discrete time hazard estimation using
play

xtlhazard : Linear discrete time hazard estimation using Stata - PowerPoint PPT Presentation

xtlhazard : Linear discrete time hazard estimation using Stata Harald Tauchmann 1 , 2 , 3 1 FAU, 2 RWI, 3 CINCH May 24 th 2019 2019 German Stata Users Group Meeting work in progress Outline Motivation 1 Theory 2 Monte Carlo Simulations 3


  1. xtlhazard : Linear discrete time hazard estimation using Stata Harald Tauchmann 1 , 2 , 3 1 FAU, 2 RWI, 3 CINCH May 24 th 2019 2019 German Stata Users Group Meeting work in progress

  2. Outline Motivation 1 Theory 2 Monte Carlo Simulations 3 4 Stata Implementation Real Data Application 5 Conclusions 6 May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 2 / 29

  3. Motivation Motivation Hazard models / duration analysis / survival analysis / models for non-repeated events & absorbing states » Modelling (directional) transitions 1. Continuous time hazard models » Parametric (Weibull, Gompertz, exponential, ...) models ( → streg ) » Semi-parametric (Cox) models ( → stcox ) » Not considered in this talk 2. Discrete time hazard models » Stacked binary outcome models (probit, logit, ...) May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 3 / 29

  4. Motivation Motivation II ◮ Unobserved individual heterogeneity (“frailty”) » Random effects › Straightforward (integrating out) › No correlation with regressors allowed » Fixed effects › Incidental parameters problem › Computationally demanding (possibly intractable) ◮ Linear probability model alternative that allows for linear fixed effects estimation? May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 4 / 29

  5. Motivation Does Linear Fixed Effects Estimation Work? Does Linear Fixed Effects Estimation Work? ◮ Left-hand-side y i 1 , . . . , y iT for unit i in panel of length T » 0 , 0 , . . . , 0 , 0 , 0 , 0 (censored) ( → no info in second, third, ... 1) » 0 , 0 , . . . , 0 , 1,1,1 ( → effectively T i ≤ T obs. if not cens.) » 0 , 0 , . . . , 0 , 1 ◮ Within-transformed lhs variable ( i observed T i periods) » 0 , 0 , . . . , 0 , 0 , 0 , 0 (censored) T i , T i − 1 » − 1 T i , − 1 T i , . . . , − 1 (not censored) T i » Transformation has little effect on lhs (at least for large T i ) ◮ First-differenced lhs variable ( i observed T i periods) » 0 , . . . , 0 , 0 , 0 , 0 (censored) » 0 , . . . , 0 , 1 (not censored) » (Besides loosing y i 1 ) transformation has no effect at all due to y it − 1 = 0 May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 5 / 29

  6. Motivation Does Linear Fixed Effects Estimation Work? Does Linear Fixed Effects Estimation Work? II ◮ Can transformations that (almost) do not transform the left-hand-side variable eliminate individual heterogeneity? ◮ Implicit answer of the literature seems to be “yes” : » Miguel et al. (2004, Journal of Political Economy ) » Ciccone (2011, AEJ: Applied ) » Brown and Laschever (2012, AEJ: Applied ) » Cantoni (2012, Economic Journal ) » Harding and Stasavage (2014, Journal of Politics ) » Jacobson and von Schedvin (2015, Econometrica ) » Wang et al. (2017, WP) » Bogart (2018, Economic Journal ) May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 6 / 29

  7. Theory The Data Generating Process The Data Generating Process y it = a i + x it β + ε it   1 − a i − x it β t = T i if and i is not censored  ε it = − a i − x it β t = T i if and i is censored   − a i − x it β if t < T i ◮ a i unobserved time-invariant individual heterogeneity ◮ a i + x it β ∈ [ 0 , 1 ] ∀ it Assumption rendering above equation regression model : E ( ε it | a i , x it , y it − = 0 ) = 0 y it − ≡ [ y i 0 ... y it − 1 ] with ⇒ P ( y it = 1 | a i , x it , y it − = 0 ) = a i + x it β May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 7 / 29

  8. Theory Estimation by OLS Estimation by pooled OLS y it = α c + x it β + ε OLS it ◮ ε OLS � = ε it , since a i not included as regressor it Conditional mean of disturbance: � � ( a i + x it β ) ( 1 − α c − x it β ) ε OLS | a i , x it , y it − = 0 = E it +( 1 − a i − x it β ) ( − α c − x it β ) a i − α c = ◮ Renders OLS biased and inconsistent if Cov ( a i , x it ) � = 0 ◮ First-differences or within-transformation to eliminate a i ? May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 8 / 29

  9. Theory First-Differences Estimation Estimation by First-Differences Estimation y it = ∆ x it β + ε FD ( y it = ∆ y it due to absorbing state ) it Conditional mean of disturbance: E ( ε FD it | a i , x it , x it − 1 , y it − = 0 ) = ( a i + x it β ) ( 1 − ∆ x it β ) +( 1 − a i − x it β ) ( − ∆ x it β ) = a i + x it − 1 β ◮ Taking first-differences » Does not eliminate a i » Makes x it − 1 enter conditional mean of disturbance ◮ Similar (yet more involved) result for within-transformation (eqiv. for T = 2) Within-Transformation ◮ First-diff. and within estimator biased and inconsistent May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 9 / 29

  10. Theory First-Differences Estimation with Constant First-Differences Estimation with Constant ◮ Including constant term in first-differences estimation improves matters E ( ε FDC x it − 1 ˜ a i + � | a i , x it , x it − 1 , y it − = 0 ) = ˜ β it ◮ Constant captures (estimation sample) mean of a i β ′ ≡ [ ˜ α c β ′ ] , � a i | sample ) = 0, ˜ ◮ E ( ˜ x it − 1 ≡ [ 0 x it − 1 ] , and � ∆ x it ≡ [ 1 ∆ x it ] May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 10 / 29

  11. Theory Asymptotic Properties Asymptotic Properties of FD Estimation with Constant Assumption Cov ( a i , ∆ x it ) = 0 , while Cov ( a i , x it ) � = 0 in the population  � � � − 1 � N T i N T i 1 1 ′ ′ � it � � plim ( b FDC ) =  I +  ˜ ∑ ∑ ∆ x ∆ x it ∑ ∑ ∆ x it � plim x it − 1 β N N t = 2 t = 2 i = 1 i = 1 � � − 1 � � N T i N T i 1 ′ 1 ′ � it � � � = ˜ ∑ ∑ ∑ ∑ + plim ∆ x ∆ x it ∆ x it ˜ β a i N N i = 1 t = 2 i = 1 t = 2 Two sources of asymptotic bias in b FDC 1. ‘ Ill-scaling bias ’ originates from first-differences transformation itself ( → even in the absence of any unobserved heterogeneity) 2. Survivor bias originates from Cov ( a i , x it | y it − = 0 ) � = Cov ( a i , x it − 1 | y it − = 0 ) due to selective survival May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 11 / 29

  12. Theory Asymptotic Properties An Adjusted First-Differences Estimator  � � � − 1 � − 1 N T i N T i ′ ′  I + � it � �  b FDC ∑ ∑ ∑ ∑ adjust = ∆ x ∆ x it ∆ x it � x it − 1 i = 1 t = 2 i = 1 t = 2 � �� � adjustment matrix W � � − 1 � � T i T i N N ′ ′ � it � � ∑ ∑ ∑ ∑ × ∆ x ∆ x it ∆ x it y it i = 1 t = 2 i = 1 t = 2 � �� � b FDC ◮ Eliminates ‘ ill-scaling bias ’ May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 12 / 29

  13. Theory Asymptotic Properties An Adjusted First-Differences Estimator II 1. Does not suffer from ‘ ill-scaling bias ’ » Dominant source of bias of b FDC in many stettings 2. Still subject to survivor bias » Unless x it follows random walk » Unless β = 0 » Unless Var ( a i ) = 0 » Yet, OLS also suffers from (different kind of) survivor bias even for Cov ( a i , x it ) = 0 3. Computationally very simple 4. Never consistent for α 5. Only exists if W is non-singular 6. Var ( b FDC adjust | X ) = W × Var ( b FDC | X ) × W » No serial correlation, just heterosecedasticity May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 13 / 29

  14. Theory Higher-Order Differences Higher-Order Differences ◮ Compared to conventional fixed-effects estimators much stronger assumptions required » Properties of b FDC adjust hinge on Cov ( a i , ∆ x it ) = 0 » May well be violated » Higher-order differences ∆ j x it as possible solution Higher-Order » Technically fully analogous to b FDC adjust » Costly in terms of variation in x that is used for identification May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 14 / 29

  15. Monte Carlo Simulations Design MC Simulation Design ◮ Five estimators 1. b OLS (OLS) 2. b WI (within transformation) 3. b FD (first-differences w/o constant) 4. b FDC (first-differences with constant) 5. b FDC adjust (adjusted first-differences) ◮ T = 5 ◮ N = 4 · 10 7 (large samp.) or N = 400 (small samp.) ◮ Number of MC replications » 1 (large sample) » 10 000 (small sample) ◮ T wo variants for small sample 1. x it and a i random 2. x it and a i fixed May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 15 / 29

  16. Monte Carlo Simulations Design MC Simulation Design II ◮ a i iid. continuous U ( 0 . 05 , 0 . 15 ) ( → α = 0 . 1) ◮ x it comprises only one variable, three DGPs: 1. stationary : x ST it = 0 . 1 + a i + ζ it , with ζ it ∼ iid. U ( − 0 . 035 , 0 . 035 ) 2. random walk w/o drift : x RW = x RW it − 1 + ν it , with it x i 1 = 0 . 1 + a i and ν it ∼ iid. U ( − 0 . 05 , 0 . 05 ) 3. trended with increasing variance : x TR it = 0 . 075 + a i + η it , with η it ∼ iid. U ( 0 , 0 . 025 t ) » Cov ( a i , x it ) > 0 and Cov ( a i , ∆ x it ) = 0 » a i + x it β ∈ [ 0 , 1 ] ∀ i , t = 1 . . . 5 » P ( y it = 1 ) and Var ( ∆ x it ) very similar across DGPs ◮ β = 1 May 24 th 2019 Harald Tauchmann (FAU) xtlhazard 16 / 29

Recommend


More recommend