| 
 |  | ||||
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Re: RE: calculating gender wage ratioes for different levels of education
From 
 
"Scott Merryman" <[email protected]> 
To 
 
<[email protected]> 
Subject 
 
st: RE: Re: RE: calculating gender wage ratioes for different levels of education 
Date 
 
Thu, 7 Sep 2006 10:40:28 -0500 
Here is one way in which the ratios are store as locals:
sysuse auto,clear
recode rep 1/3=3
drop if rep==.
levelsof rep , local(levels)
foreach l of local levels {
	forv  j = 0/1 {
		qui sum price if rep == `l' & fore == `j', meanonly
		local p_`l'_`j' = r(mean)
	}
	local ratio`l' = `p_`l'_0'/`p_`l'_1'
}
macro list _ratio3 _ratio4 _ratio5
Scott
*
*   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–2025 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |