[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: Dispersion of workplace years of education
The mean (absolute) deviation (from the mean)
is also coded officially as -egen-'s -mdev()-
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.
> 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 <email@example.com> 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: