BookmarkSubscribeRSS Feed
asifgeneral
Calcite | Level 5

Hi, Here is the code that I have written. The file is stored in the work library.

 

 

proc ttest data=work.Ameshousing
plots(shownull)=interval
H0=135000;
var SalePrice;
title "One-Sample t-test testing whether mean SalePrice=$135,000";
run;

title;

 

I am getting the below error 

 

ERROR 22-322: Syntax error, expecting one of the following: ;, (, ALPHA, CI, COCHRAN, DATA, H0.
ERROR 76-322: Syntax error, statement will be ignored.

 

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Please make our life easier. Show us the relevant parts of the SASLOG, in this case the entire PROC TTEST code and associated warnings and error messages, so we can see where the error appears.

 

CLick on the {i} icon and paste your SASLOG into the window that appears.

--
Paige Miller
Reeza
Super User

Ran your code, modifying it to use SASHELP.SHOES and no errors were generated. 

 

Couple of reasons why this may happen:

  • Code shown is not the cause of the error
  • Code used is different than what's posted
  • You're using an older version of SAS and are using some option that isn't supported in that version

I'm guessing on #1 or #3. 

You can check your version using 

proc product_status;run;

You're specifically looking for your SAS version and SAS/ETS versions. 

 


@asifgeneral wrote:

Hi, Here is the code that I have written. The file is stored in the work library.

 

 

proc ttest data=work.Ameshousing
plots(shownull)=interval
H0=135000;
var SalePrice;
title "One-Sample t-test testing whether mean SalePrice=$135,000";
run;

title;

 

I am getting the below error 

 

ERROR 22-322: Syntax error, expecting one of the following: ;, (, ALPHA, CI, COCHRAN, DATA, H0.
ERROR 76-322: Syntax error, statement will be ignored.

 


 

asifgeneral1
Calcite | Level 5
point no. 3

thank you!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 761 views
  • 1 like
  • 4 in conversation