Dear Joao,
Joao Santos Silva Thank you for your reply.
From one of your previous replies:
The data is "xtset county year", with state level staggered treatments.
1. When I run xtpoisson or xtpqml or ppmlhdfe with negative values, stata gives an error saying that all values must be positive.
The summary statistics which I provided was for the "first difference" (denoted by diff_) of the original >=0 count variable. This process creates negative values. I transformed my original variable to first difference because my actual dep variable is aggregate yearly count in that year (not annual flow or change) as is typically used in the gravity models. If I want to model the change (just like number of trips in gravity model) I have to use the change from last year, hence the first difference. Alternately, I could keep using the original >=0 count variable nevertheless since taking first difference gives negative values.
My actual variable is count variable with a lot of zero values (I don't know if that is zero inflated or not) is as follows:
Does that qualify to be zero inflated? In any case it is a count variable >= 0 and I guess poisson would still be needed.
But I am still at a loss about what to do if I decide to take the first difference (which generates negative values in dep var). You suggest ivppml but I am not familiar with it and I don't have good IVs as of yet. Also, it is a short panel -2010 to 2019.
2.
Now, we say that pqmle and ppml are same and are just different acronyms for poisson reg, ppmlhdfe allows me to use two way fixed effects while xtpqmle doesn't allow me to use i.year. So, this is what I do and the results are different (of course because xtpqmle doesn't allow me to use i.year) .
Thus, even though ppml and pqml are the same thing, for me their implementation in Stata is different. ppmlhdfe allows me to use both i.year and vce(robust) while pqml (already has inbuilt robust SE) but doesn't allow me to use i.year.
a. I also try:
which should give me the same result as ppmlhdfe above. However, the results are different.
b. Now, I understand that PQMLE assumes no unobserved heterogeneity. If PPML is same as PQMLE, then it should also assume that there is no unobserved heterogeneity and shouldn't allow me to use time FE. But ppmlhdfe does allow me to use both county and time FE in Stata!
Now these two below give me exactly the same results but I can't use i.year:
In any case, just xtpoisson look reasonable instead of xtpqmle or ppmlhdfe as I can use time FE (i.year). But I'd like to know your thoughts.
I'd highly appreciate your feedback. Thank you.
Joao Santos Silva Thank you for your reply.
From one of your previous replies:
Originally posted by Joao Santos Silva
View Post
1. When I run xtpoisson or xtpqml or ppmlhdfe with negative values, stata gives an error saying that all values must be positive.
The summary statistics which I provided was for the "first difference" (denoted by diff_) of the original >=0 count variable. This process creates negative values. I transformed my original variable to first difference because my actual dep variable is aggregate yearly count in that year (not annual flow or change) as is typically used in the gravity models. If I want to model the change (just like number of trips in gravity model) I have to use the change from last year, hence the first difference. Alternately, I could keep using the original >=0 count variable nevertheless since taking first difference gives negative values.
My actual variable is count variable with a lot of zero values (I don't know if that is zero inflated or not) is as follows:
Code:
. di "Percentage of zeros: " ((`zero_records' / `total_records')*100) Percentage of zeros: 3.2603503
But I am still at a loss about what to do if I decide to take the first difference (which generates negative values in dep var). You suggest ivppml but I am not familiar with it and I don't have good IVs as of yet. Also, it is a short panel -2010 to 2019.
2.
Of course the results differ if you include fixed effects; that is why we include them

Code:
ppmlhdfe MDs atet_paypar bbdT1std atet_imlcc `controls', a(countyfips year) vce(robust) xtpqml MDs atet_paypar bbdT1std atet_imlcc `controls', fe
a. I also try:
Code:
xtpoisson MDs atet_paypar bbdT1std atet_imlcc `controls' i.year, fe vce(robust)
b. Now, I understand that PQMLE assumes no unobserved heterogeneity. If PPML is same as PQMLE, then it should also assume that there is no unobserved heterogeneity and shouldn't allow me to use time FE. But ppmlhdfe does allow me to use both county and time FE in Stata!
Now these two below give me exactly the same results but I can't use i.year:
Code:
xtpqml MDs atet_paypar bbdT1std atet_imlcc `controls', fe xtpoisson MDs atet_paypar bbdT1std atet_imlcc `controls', fe vce(robust)
In any case, just xtpoisson look reasonable instead of xtpqmle or ppmlhdfe as I can use time FE (i.year). But I'd like to know your thoughts.
I'd highly appreciate your feedback. Thank you.
Comment