Dear All,
first post here. I'll try to be as precise as possible. I am working with a cross-sectional data set for some 64 countries and have some 900 observations for the 1st administrative level. In order to account for unobserved heterogeneity on the country level I want to use a country-fixed effects operator. Both predict commands, for the same data, yield the same predicted values.
So far so good. If I use both commands and predict for the whole dataset, which includes countries that are not within e(sample), the results for the out of sample predictions, y_hat and y_hat1, differ. This has no direct relevance for my work. But I cant really identify what is leading to the differing results. Any help is greatly appreciated.
Best,
Philipp
first post here. I'll try to be as precise as possible. I am working with a cross-sectional data set for some 64 countries and have some 900 observations for the 1st administrative level. In order to account for unobserved heterogeneity on the country level I want to use a country-fixed effects operator. Both predict commands, for the same data, yield the same predicted values.
Code:
reg ln_y ln_x ibn.country predict y_hat if e(sample) reg ln_y ln_x ibn.country, nocons predict y_hat1 if e(sample)
Best,
Philipp
Comment