/* Examples of dummy dependent variables Data " cps_msa2013 : 2013 Current population survey for 3 MSA 3 MSA : NY, LA, CHICAGO Created by Jin Man Lee Updated: 3/11/2015 1. Befor you run this program you need to download the sas data set from http://condor.depaul.edu/jlee141/econdata/cps/cps_msa2013.sas7bdat 2. copy the file into your folder. I am using d:\cps as an example 3. Once you have the file, you need to define the location of the file using 'libname' 4. Here is the example */ libname cps 'd:\cps' ; data d2013 ; set cps.cps_msa2013 ; if educ92 = 1 then educyr = 1 ; if educ92 = 2 then educyr = 4 ; if educ92 = 3 then educyr = 6 ; if educ92 = 4 then educyr = 8 ; if educ92 = 5 then educyr = 9 ; if educ92 = 6 then educyr = 10; if educ92 = 7 then educyr = 11; if educ92 = 8 | educ92 = 9 then educyr = 12; if educ92 = 10 | educ92 = 11 | educ92 = 12 then educyr = 14; if educ92 = 13 then educyr = 16; if educ92 = 14 then educyr = 18; if educ92 = 15 then educyr = 20; if educ92 = 16 then educyr = 21 ; edusq = educyr*educyr ; /* Labor Participation Definition */ if lfstat = 1 | lfstat = 2 then laborp = 1; else laborp = 0 ; /* Select only Female */ if lfstat ne . and female = 1 ; /* Log Income */ lhincome = log(inch_all) ; run ; /* All statistic Analysis can be done after the data step process */ proc freq ; tables laborp female lfstat*laborp ; run ; proc means ; var tables laborp female lhincome ; run ; proc reg ; model laborp = age educyr married child lhincome ; run ; proc logistic ; model laborp = age educyr married child lhincome ; run ; proc contents ; run ;