/* I am going to show how to use an infile statement in the data step to read in data rather than copy and paste (but you can still copy and paste if you want to) */ /* One thing to think about is if you have a header row on your data file, then you'd need to put in firstobs=2 at the end of the INFILE statement like I have here */ /* For the address in the INFILE statement, you'll need to change it to your computer's address where you have the file located. */ /* The DSD statement at the end of the INFILE tells SAS that if there is a missing value at the end of a record, it should record it as a missing value (rather than trying to grab info from the next record -- which will mess up the data. It's not necessary here but it's not a bad habit to have so as to err on the side of caution. */ filename skulls url 'https://webpages.uidaho.edu/~renaes/Data/Egypt%20skulls.csv'; data Egypt; infile skulls dlm=',' dsd firstobs=2; input breadth era $; run; proc print data=Egypt; run; /* To change this test to a one sided (either upper or lower), you'll need an option in the proc ttest statement to adjust your test. With no SIDES= option used, it will default to a 2-tailed test. */ /* An upper tail test */ proc ttest data=Egypt sides=U; var breadth; class era; run; * 2T test for CIs; proc ttest data=Egypt; var breadth; class era; run; /* A lower tail test */ proc ttest data=Egypt sides=L; var breadth; class era; run;