------------------------------------------------------------------------------------------------------------

name:  <unnamed>

log type:  text

opened on:   5 Oct 2015, 10:09:55

. use "C:\Users\Michael\Desktop\cps_mar_2000_new_unchanged.dta", clear

. *class starts here.

. graph box age if occ1990==178| occ1990==95 | occ1990==125, over (occ1990)

. graph hbox age if occ1990==178| occ1990==95 | occ1990==125, over (occ1990)

* See the Stata help for definition of the box plot lines- the box goes from 25th percentile to 75th percentile, with a line in the middle for the median (50th percentile). Once you have made the graphs, you can turn on the Stata graph editor to edit them, then save them, copy them, and paste them into your Word file.

*And now, two ways to find the exact values of the 25th, 50th, and 75th percentile:

. summarize age if occ1990==178, detail

Age

-------------------------------------------------------------

Percentiles      Smallest

1%           24             24

5%           27             24

10%           29             24       Obs                 441

25%           35             24       Sum of Wgt.         441

50%           43                      Mean           44.38549

Largest       Std. Dev.      12.48585

75%           52             84

90%           61             86       Variance       155.8965

95%           66             87       Skewness       .7190904

99%           83             90       Kurtosis       3.549932

. table occ1990 if occ1990==178| occ1990==95 | occ1990==125, contents(freq p25 age p50 age p75 age)

----------------------------------------------------------------------

Occupation, 1990      |

basis                 |      Freq.    p25(age)    med(age)    p75(age)

----------------------+-----------------------------------------------

Registered nurses |        966          36          43          51

Sociology instructors |          6          50          53          54

Lawyers |        441          35          43          52

----------------------------------------------------------------------

. tabulate occ1990 if occ1990==178| occ1990==95 | occ1990==125

Occupation, 1990 basis |      Freq.     Percent        Cum.

----------------------------------------+-----------------------------------

Registered nurses |        966       68.37       68.37

Sociology instructors |          6        0.42       68.79

Lawyers |        441       31.21      100.00

----------------------------------------+-----------------------------------

Total |      1,413      100.00

*Tabulate with and then without labels is one way to identify which value is which. Also, check ipums.org. Codebook and label list can also work, but keep in mind that occ1990 has many hundreds of values.

. tabulate occ1990 if occ1990==178| occ1990==95 | occ1990==125, nolab

Occupation, |

1990 basis |      Freq.     Percent        Cum.

------------+-----------------------------------

95 |        966       68.37       68.37

125 |          6        0.42       68.79

178 |        441       31.21      100.00

------------+-----------------------------------

Total |      1,413      100.00

. display invttail(5,.025)

2.5705818

. log close

name:  <unnamed>