Hi all,
I am working with trade data and have one observation per firm, year, and destination. I would like to predict the probability to trade as
,
where my outcome variable exporter is an indicator variable.
Afterwards, I would like to make an out-of-sample prediction:
I have two questions:
1) Can I use the normal logit-command? (I found forum entries stating that if there are enough observations within each industry and if there are not too many industry categories, one can use xtlogit and include industry dummies. How is "enough" and "not too many" specified? I have 99-categories, and around half of them are omitted when estimating a logit. The minimum amount of observations per industry is 220; most industries have much more observations. It is not possible to use the xtlogit-command because I not only have one observation per firm and year, but I have one observation per firm, year and destination.)
If it is not possible to use the normal logit-command, what could be an alternative?
2) Something with my prediction is wrong, but I don't know what causes the problem. (I tried an in-sample prediction and compared it to
, which does not give me the same values.
Unfortunately, I am not able to provide a data example due to confidentiality reasons.
Best,
Kathrin
I am working with trade data and have one observation per firm, year, and destination. I would like to predict the probability to trade as
Code:
logit exporter distance ... i.industry if inrange(year,2016,2019), vce(robust)
where my outcome variable exporter is an indicator variable.
Afterwards, I would like to make an out-of-sample prediction:
Code:
gen prediction_exporter = normprob(_b[cons]+_b[distance]xdistance + ... + _b[_industry__1]+_b[_industry__2] + ... _b[_industry__99]) if year == 2012
1) Can I use the normal logit-command? (I found forum entries stating that if there are enough observations within each industry and if there are not too many industry categories, one can use xtlogit and include industry dummies. How is "enough" and "not too many" specified? I have 99-categories, and around half of them are omitted when estimating a logit. The minimum amount of observations per industry is 220; most industries have much more observations. It is not possible to use the xtlogit-command because I not only have one observation per firm and year, but I have one observation per firm, year and destination.)
If it is not possible to use the normal logit-command, what could be an alternative?
2) Something with my prediction is wrong, but I don't know what causes the problem. (I tried an in-sample prediction and compared it to
Code:
predict prediction_exporter, pr
Unfortunately, I am not able to provide a data example due to confidentiality reasons.
Best,
Kathrin
Comment