My simple ttest not working

New Contributor
Posts: 2

My simple ttest not working

I am fairly new to SAS.

proc ttest  alpha=0.05 h0=14 sides=u DATA = "/folders/myfolders/sasuser.v94/FB1.csv" ;

var Averagetime ;


This is the error


42 ;

43 proc ttest alpha=0.05 h0=14 sides=u DATA = "/folders/myfolders/sasuser.v94/FB1.csv" ;

ERROR: Extension for physical file name "/folders/myfolders/sasuser.v94/FB1.csv" does not correspond to a valid member type.

44 var Averagetime ;

45 run;

Posts: 4,237

Re: My simple ttest not working

Welcome to SAS.  You have asked a great question.  The simple answer is that the DATA= option is expecting a SAS data set, not a csv file.  So before you call the TTEST procedure you should import the csv file into SAS.  There are several ways to do it.  If you are using a SAS GUI you can run an import wizard (File->Import Data in the Windowing Environment or in Enterprise Guide), or you can use some of the programming techniques in this article:

Import CSV files and create SAS data sets on the fly! | SAS

If you create a SAS data set called FB1 in the WORK libref, then you can use DATA=WORK.FB1 to access the data.

To performa a standard t-test, you will also want to include a CLASS statement in the call to PROC TTEST. The CLASS statement enables you to specify the name of the variable that indicates whenther each observation belongs to Group1 or Group2.

Posts: 24

Re: My simple ttest not working

i have summary report and detail report,detail report having date prompt ,this prompt get date from summary report using report linking .

but at time of linking (summary report to detail report ) date variable not found in summary report only in cross tab object.

but its properly work in other object like bar chat,line chart etc.

so whats the problem for cross tab for report linking date prompt

New Contributor
Posts: 2

Re: My simple ttest not working

Thanks, I have fixed it. all I did was I removed the Var=Averagetime.

Ask a Question
Discussion stats
  • 3 replies
  • 1 like
  • 3 in conversation