I found the bug:
Since I am using the following command before the estimation:
bysort County disease: keep if _n==1
Stata probably kicks out different obervations eacht time.
Does someone knows how to avoid that? A similar question was posed a
couple of days ago:
How to delete duplicate observations, Martin recommended the following
command that I used (see above):
bysort ID: keep if_n==1
However my problem is not exactly the same:
Since I would like to aggregate my individual level data to the county
level I would like to just keep one observation for each county [instead
of keeping one observation per county I would like to keep 98
observations per county (one observation per county and per cancer type;
there are 98 different cancer types)].
Therefore the observations I would like to drop are not the same
individuals, they just live in the same county and suffer from the same
disease.
Thanks for your help!!
Johannes
Johannes Schoder schrieb:
Dear Statalist users:
When I am estimating the same model several times afterwards (with the
same computer):
xi: glm [dep. var.] [indep. var.] i.county i.year, family (binomial
weight) link(logit)
I get different results for the exactly same specification.
Does anyone know whats going on here? Is it because of the different
number of iterations (sometimes 8,9 or 10)?
Which results are right? What can I do to get the identical result for
the same estimation?
Thanks a lot for any suggestion!
Johannes
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/