Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Dispersion of workplace years of education


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Dispersion of workplace years of education
Date   Mon, 15 May 2006 18:01:03 +0100

The mean (absolute) deviation (from the mean)
is also coded officially as -egen-'s -mdev()- 
function. 

The mean deviation is, NB, not much robust (resistant)
than the standard deviation, as it is mean-based. 
So, if you are playing with the idea of robustness, 
do not stop there: 

more robust yet is the median (absolute)
deviation (from the median), coded officially
as -egen-'s -mad()- function. 

Nick 
n.j.cox@durham.ac.uk 

Austin Nichols
 
> peter harper:
> One measure of dispersion of years of education by workplace would be
> . egen sde=sd(educ), by(workplace)
> but if you want the mean absolute difference (AD), you can code:
> . egen ej=mean(educ), by(workplace)
> . gen ad=abs(educ-ej)
> . egen ei=mean(ad), by(workplace)
> for example.
 
> On 5/15/06, peter harper <pharper11@yahoo.co.uk> wrote:

> > I am working on a cross-section dataset, with different 
> firms and different individuals. How would one generate a 
> variable which would provide a dispersion of workplace years 
> of education: absolute mean diff. across workers based on 
> mean worker years of education, say, Ei.
> >
> > I already have a variable for mean workplace years of 
> education called Ej: which is based on percentage of the 
> workforce in each of the k occupations times average years of 
> education for that occupation from worker respondents.

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index