/* The dataset has the formats below permanently assigned to certain variables. We do NOT need to rerun the DATA step used to assign the formats however we DO need to resubmit the PROC FORMAT so SAS will know the translations used */ PROC FORMAT; VALUE GDR 1 = "Male" 2 = "Female"; VALUE YN 1 = "Yes" 2 = "No"; VALUE EXER 1 = "High" 2 = "Moderate" 3 = "Low"; VALUE TREAT 1 = "Ran" 2 = "Sat"; RUN; /* PROC FREQ is also used to create two-way tables but the command is different than for frequency distributions for one variable at a time. Here we use a * between variables, multiple requests can be placed in one TABLES statement and variables can be grouped in parentheses. The variables to the left of the * are the rows and those to the right, the columns */ PROC FREQ DATA=BIO.PULSE_STEP2; TABLES ALCOHOL*EXERCISE (GENDER SMOKES ALCOHOL EXERCISE)*TRT; RUN;