* You will need to change the path, or use wizard; PROC IMPORT OUT= WORK.cf DATAFILE= "C:\Users\pbreheny\Desktop\cystic-fibrosis.txt" DBMS=TAB REPLACE; GETNAMES=YES; DATAROW=2; RUN; * One-sample t-test; PROC TTEST DATA=cf; VAR Drug; RUN; * Paired t-test; PROC TTEST DATA=cf; PAIRED Placebo*Drug; RUN; PROC IMPORT OUT= WORK.lead DATAFILE= "C:\Users\pbreheny\Desktop\lead-iq.txt" DBMS=TAB REPLACE; GETNAMES=YES; DATAROW=2; RUN; * Two-sample t-test; PROC TTEST DATA=lead; VAR IQ; CLASS Smelter; RUN; * Wilcoxon rank sum test; PROC NPAR1WAY DATA=lead; VAR IQ; CLASS Smelter; RUN; * You will need to change the path, as well as manually create the data set; PROC IMPORT OUT= WORK.Lister DATAFILE= "C:\Users\pbreheny\Desktop\lister.xlsx" DBMS=EXCELCS REPLACE; RANGE="Sheet1$"; SCANTEXT=YES; USEDATE=YES; SCANTIME=YES; RUN; * Incorrect!; PROC FREQ DATA=lister; TABLE Survival; RUN; * One-sample inference for proportions (Clopper-Pearson); PROC FREQ DATA=lister; TABLE Survival; WEIGHT N; EXACT BINOMIAL; RUN; * Chi-squared & Fisher tests; PROC FREQ DATA=lister; TABLE Survival*Group / CHISQ; WEIGHT N; RUN;