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

st: RE: Re: data question


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Re: data question
Date   Mon, 22 Jul 2002 11:33:52 +0100

Eric Strobl
>
> I have the following problem and was wondering whether
> anybody could help
> me.
>
> 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)
> share_empl=empl_sector_county/empl_sector
> 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]
>

I am not sure what drives this, but I find that
a display format which rounds suitably removes
all user puzzlement produced in this way.

Also, I am _copying_ this to the email address above.

The Statalist FAQ states on this

"The Statalist convention is that you reply to the list, not to the
poster."

Nick
[email protected]

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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