Hi,

I am running a two stage regression, where the first stage is a linear regression of a price index on some variables and the second stage is a fractional logit where I use the predicted price index as regressor. For that reason, I want to bootstrap the standard errors of the second estimation. The sample is a panel of imports at sector-level over time and by country of origin. The data also includes other sector-level data such as the sector price index among others.

The model includes in all specifications year FEs, and in some specifications I want to include country FEs. The problem is that I cannot obtain the estimates when I bootstrap for the cases where country FEs are included (I have no problem when only year FEs are included). The message I get is: insufficient observations to compute bootstrap standard errors no results will be saved

From what I can see, it may be related to the fact that it cannot estimate the country FEs when it takes a sample and it has no observations from that country to get the estimation. I have tried with nodrop and also clustering by country, but it did not work. The solution that I have for the moment is taking difference of the second stage, and get rid of the country FEs. In that case, I do not have any problem with bootstraping in the second stage, but I would like to keep the original specification.

The model is:

First stage:

Code:
 regress ln_PPI_Hr ln_offshr_shr ln_tariff other_controls i.year i.country, vce(cluster sector_ID)

predict ln_PPIhat
Second stage:

Code:
glm IF_int ln_PPIhat ln_tariff other_controls i.year i.country, link(logit) family(binomial) vce(boot, reps(1000) seed(10101) cluster(sector_ID))

Thanks.
Leandro