Statalist The Stata Listserver


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

st: Dispersion of workplace years of training


From   peter harper <[email protected]>
To   [email protected]
Subject   st: Dispersion of workplace years of training
Date   Tue, 6 Jun 2006 11:39:24 +0000 (GMT)

Dear Statalist

Thanks Austin and Nick. I am now looking at the dispersion measure of average of absolute differences between own training (across random sample of workers) and mean workplace 
training.

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 training: absolute mean diff. 
across workers based on Ti. The dispersion measure is the average of 
absolute differences between own training, tij (across the random sample 
of workers) and mean workplace training, Tj.

Sigma (this is the greek letter for sum)|(Tj - tij)|/nj

where tij = workers years of training, i = worker and j = firm and Tj is 
given below.
I already have a variable for mean workplace years of training called Tj: 
which is based on percentage of the workforce in each of the k occupations 
times average years of training for that occupation from worker 
respondents.
Would the command be:
.gen adtr= abs(meantrwk-b4a2)
.egen meandisptr=mad (adtr), by (serno)

where meantrwk=meanworkplace years of training; b4a2=workers who have been trained.

But when I run the regression with both mean dispersion of education and mean dispersion of training. The mean dispersion of training is dropped. I then find the mean is zero. So, I would be grateful if anyone would let me know, the correct command for the mean dispersion of training as mentioned above.

Thanks

Nick Cox wrote:
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 
[email protected] 

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 <[email protected]> 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
*
*   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