Professional Documents
Culture Documents
rtf";
Libname FinalSas "C:\Final";
Run;
* PINCP is Personal Income. We are using positive and all;
* COW is Class of Worker. We are using Private Not for Profit (2) versus all else,
and Private for Profit (1) versus all else, and Government employee (3,4,5) versus
all else;
* SCHL is Educational attainment. We are using "At least regular high school
diploma" (16 or more) as one qualitative category and "At least associate's degree"
(20 or more) as another qualitative category;
* ESR is Employment Status Recode. We are using "1 .Civilian employed, at work"
(1), "2 .Civilian employed, with a job but not at work" and Employed Civilians (1
and 2).;
* AGEP is AGE up to 99. We are using age from 16 onwards, so we will take less than
16 as missing values and create a new variable AGEFIN;
* RAC1P is Recoded detailed race code;
* HISP is the detailed hispanic origin. 01 is Not Hispanic Latino;
* SEX is the original variable for sex;
* CIT is for citizenship;
* Creating NonProfits Private Workers binary; If COW = 2 Then NFPW = 1; If COW < 2
Then NFPW = 0; If COW > 2 Then NFPW = 0; If COW = b Then NFPW = .;
* Creating For Profit Workers binary;If COW = 1 Then PFPW = 1; If COW < 1 Then PFPW
= 0; If COW > 1 Then PFPW = 0; If COW = b Then PFPW = .;
* Creating Self-Employed Workers binary; If COW = 6 Then SEW = 1; If COW = 7 Then
SEW = 1; If SEW ~= 1 Then SEW = 0; If COW = b Then SEW = .;
* Creating Government Workers binary; If COW = 3 Then GOVW = 1; If COW = 4 Then
GOVW = 1; If COW = 5 Then GOVW = 1; If COW > 5 Then GOVW = 0; If COW < 3 Then GOVW
= 0; If COW = b Then GOVW = .;
Run;
proc means;
var PINCALL AGEFIN;
run;
Proc Freq;
table SEX HSDIP CLDEG NONHISP NONCIT ;
RUN;
Proc ttest;
class NF_vs_PF;
var PINCALL;
run;
Proc ttest;
class NF_vs_GO;
var PINCALL;
run;
Proc ttest;
class NF_vs_PF;
var AGEFIN;
run;
Proc ttest;
class NF_vs_GO;
var AGEFIN;
run;
proc freq;
tables NF_vs_PF*SEX / chisquare expected;
run;
proc freq;
tables NF_vs_PF*HSDIP / chisquare expected;
run;
proc freq;
tables NF_vs_PF*CLDEG / chisquare expected;
run;
proc freq;
tables NF_vs_PF*NONHISP / chisquare expected;
run;
proc freq;
tables NF_vs_PF*NONCIT / chisquare expected;
run;
proc freq;
tables NF_vs_GO*SEX / chisquare expected;
run;
proc freq;
tables NF_vs_GO*HSDIP / chisquare expected;
run;
proc freq;
tables NF_vs_GO*CLDEG / chisquare expected;
run;
proc freq;
tables NF_vs_GO*NONHISP / chisquare expected;
run;
proc freq;
tables NF_vs_GO*NONCIT / chisquare expected;
run;
proc freq;
tables GROUP*SEX / chisquare expected;
run;
proc freq;
tables GROUP*HSDIP / chisquare expected;
run;
proc freq;
tables GROUP*CLDEG / chisquare expected;
run;
proc freq;
tables GROUP*NONHISP / chisquare expected;
run;
proc freq;
tables GROUP*NONCIT / chisquare expected;