Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: data question

From   "Eric Strobl" <[email protected]>
To   <[email protected]>
Subject   st: Re: data question
Date   Mon, 22 Jul 2002 09:43:22 -0400


I have the following problem and was wondering whether anybody could help

I am calculating share (employment in an industry by a county) variables and
their deviation from the mean, my data are employment levels aggregated up
to sector/county units:

egen empl_sector=sum(empl_sector_county), by(sector year)
egen share_empl_mean=mean(share_empl), by(year county)

gen share_deviation_mean=share_empl-share_empl_mean

For my regression analysis (simple OLS) I need the mean of this variable,
share_deviation_mean, to be exactly zero .  But summary statistics show that
it is only very close to zero.  How can I ensure that it is equal to zero?
(I know that this has to do with the way STATA uses data formats, but am not
sure what to do about it)

Also, how about other variables that are not deviations from the mean, but
again that I know should be equal to zero theoretically, but when I look at
summary statistics they are not.

Any help would be greatly appreciated.  Please send emails to:

[email protected]



*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index