Dear community,
I need to produce a jackknife variance estimator for a Poisson regression that implements a double difference design (difference-in-difference)
This is the command I run
glm ///
Naloxone /// Outcome on interest
HN /// Treatment dummy
i.t c.t##i.mt /// Double difference with flexible trends
LogPoliceRate /// Controls
trpf physicianexam /// Controls
pharmacistverification requireid /// Controls
T_GS_HasLaw pdmp doctorshopping painclinic /// Controls
, ///
family(poisson) ///
vce(jackknife, cluster(st) idcluster(ST)) //
Jackknife fails to compute, i.e., all crosses are red. I suspect that this is a computational issue driven by a large number of fixed effects. Therefore, I'd like to partially out fixed effects (i.t c.t##i.mt) and run ppml without them. Section 3.4. of Cluster-robust inference: A guide to empirical practice by James G. MacKinnon and others suggests doing so for jackknife variance in the context of linear regression.
For linear models, Stata's package HDFE trivialises this task
http://scorreia.com/demo/hdfe.html
However, for Poisson regression, the implementation is unclear.
Stata's PPMLHDFE
http://scorreia.com/help/ppmlhdfe.html
as explained here
http://arxiv.org/abs/1903.01690
talks about Frisch-Waugh-Lovell for PPML, but I do know how to implement it exactly.
For concreteness, consider the following:
Thank you, and I hope everyone is having a fantastic day.
Warm regards,
Sergey Alexeev
https://alexeev.pw/
I need to produce a jackknife variance estimator for a Poisson regression that implements a double difference design (difference-in-difference)
This is the command I run
glm ///
Naloxone /// Outcome on interest
HN /// Treatment dummy
i.t c.t##i.mt /// Double difference with flexible trends
LogPoliceRate /// Controls
trpf physicianexam /// Controls
pharmacistverification requireid /// Controls
T_GS_HasLaw pdmp doctorshopping painclinic /// Controls
, ///
family(poisson) ///
vce(jackknife, cluster(st) idcluster(ST)) //
Jackknife fails to compute, i.e., all crosses are red. I suspect that this is a computational issue driven by a large number of fixed effects. Therefore, I'd like to partially out fixed effects (i.t c.t##i.mt) and run ppml without them. Section 3.4. of Cluster-robust inference: A guide to empirical practice by James G. MacKinnon and others suggests doing so for jackknife variance in the context of linear regression.
For linear models, Stata's package HDFE trivialises this task
http://scorreia.com/demo/hdfe.html
However, for Poisson regression, the implementation is unclear.
Stata's PPMLHDFE
http://scorreia.com/help/ppmlhdfe.html
as explained here
http://arxiv.org/abs/1903.01690
talks about Frisch-Waugh-Lovell for PPML, but I do know how to implement it exactly.
For concreteness, consider the following:
Code:
sysuse auto, clear * Benchmark | FWL Theorem for linear model reghdfe /// price /// weight /// length /// , /// a(turn trunk) * Demean variables hdfe /// price /// weight /// length /// , /// a(turn trunk) /// gen(RESID_) * Same point estimates as in reghdfe without fixed effects | very nice reg /// RESID_price /// RESID_weight /// RESID_length /// , /// nocons * Then the question is how to get residuals to estimate the following glm /// RESID_price /// RESID_weight /// RESID_length /// , /// family(poisson) // * so that it gives the same point estimates as this glm /// price /// weight /// length /// i.turn i.trunk /// , /// family(poisson) //
Warm regards,
Sergey Alexeev
https://alexeev.pw/
Comment