# st: Re: RE: calculating gender wage ratioes for different levels of education

 From "Christer Thrane" <[email protected]> To <[email protected]> Subject st: Re: RE: calculating gender wage ratioes for different levels of education Date Thu, 7 Sep 2006 17:21:46 +0200

Okay, a second try, then.

Using the auto data, I wish to calculate the foreign/domestic price ratioes for three different levels of repair record.

use c:\data\auto.dta, clear
(1978 Automobile Data)

.
. recode rep 1/3=3

. tab rep

Repair |
Record 1978 | Freq. Percent Cum.
------------+-----------------------------------
3 | 40 57.97 57.97
4 | 18 26.09 84.06
5 | 11 15.94 100.00
------------+-----------------------------------
Total | 69 100.00

. drop if rep==.
(5 observations deleted)

. sort rep

. by rep: oneway price foreign, t

--------------------------------------------------------------------------------------------------------------
-> rep78 = 3

| Summary of Price
Car type | Mean Std. Dev. Freq.
------------+------------------------------------
Domestic | 6,358.405 3,526.92 37
Foreign | 4,828.667 1,285.613 3
------------+------------------------------------
Total | 6,243.675 3,425.43 40

rest of output omitted
--------------------------------------------------------------------------------------------------------------
-> rep78 = 4

| Summary of Price
Car type | Mean Std. Dev. Freq.
------------+------------------------------------
Domestic | 5,881.556 1,592.019 9
Foreign | 6,261.444 1,896.092 9
------------+------------------------------------
Total | 6,071.5 1,709.608 18

rest of output omitted
--------------------------------------------------------------------------------------------------------------
-> rep78 = 5

| Summary of Price
Car type | Mean Std. Dev. Freq.
------------+------------------------------------
Domestic | 4,204.5 311.83409 2
Foreign | 6,292.667 2,765.629 9
------------+------------------------------------
Total | 5,913 2,615.763 11

rest of output omitted

.
end of do-file

... and here I must stop the do-file and obtain the results above in the following calcualtions:

. dis 6358/4828
1.3169014

. dis 5881/6261
.93930682

. dis 4204/6292
.66815003

Question: Is it possible to do this in one operation?

BR

Christer

----- Original Message ----- From: "Nick Cox" <[email protected]>
To: <[email protected]>
Sent: Thursday, September 07, 2006 4:40 PM
Subject: st: RE: calculating gender wage ratioes for different levels of education

```Sorry, but what results are you talking about?

What are 70,000 110,000 etc.?

Also, you should be able to translate this easily
into an example with a standard dataset accessible
to all Stata users.

Nick
[email protected]

Christer Thrane
```
```I wish to calculate gender wage ratioes for different levels
of education,
hopefully in a less cumbersomeway than below

sort educ
by educ: oneway wage gender, t

and then for each level of educ type:

dis 70,000/110,000
dis 85,000/140,000

and so on...

The main problem is that I have to get the results from the
one-way anovas
first, and then use the results from these in the later -dis-
calculations.
Is there a simple way to do this in one operation so that I
can run the
whole do-file without stopping?
```
```*
*   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/
```

• References: