# Practice 1.2 - Exercise US wages open "...\USwages.gdt" #a) summary wage --simple #b) print wage age --byobs #c) genr logwage = log(wage) #Or: # logs wage summary logwage --simple #d) freq educ #Also: smpl educ=12 --restrict smpl educ>=16 --restrict --replace smpl --full ## Be careful! An error will stop your script: # smpl educ=0 --restrict #e) freq black summary wage --by=black --simple #Also: smpl black --dummy summary wage --simple smpl --full #f) Sort by wage in descendent order dataset dsortby wage print age black married wage --byobs #Also, since we know the maximum wage in the sample: smpl wage=3088 --restrict summary age black married --simple smpl --full