Programming the statistical procedures from SAS

22-322: Syntax error

Accepted Solution Solved
Reply
Contributor
Posts: 69
Accepted Solution

22-322: Syntax error

Hello,

 

I run the following code:

proc reg data=sasuser.sasfile;
model roa1 = ff ff*introduc2 ff*growth2 ff*maturing2 ff*shake2c Lnsalesgro;
run;

 

Where ff, introduc2, growth2, maturing2, shake2c are dummy variables and Lnsalesgro and ROA1 is countinous variables.

I got the following log:

 

323 model roa1 = ff ff*introduc2 ff*growth2 ff*maturing2 ff*shake2c Lnsalesgro
-
22
76
ERROR 22-322: Syntax error, expecting one of the following: a name, ;, -, /, :, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_, {.

ERROR 76-322: Syntax error, statement will be ignored.

 

What is my mistake?

 

Thanks a lot!

 

 


Accepted Solutions
Solution
‎04-06-2017 06:15 AM
Super User
Posts: 7,100

Re: 22-322: Syntax error

From the documentation:

"After the keyword MODEL, the dependent (response) variables are specified, followed by an equal sign and the regressor variables."

You can only use variables, not terms; create variables that hold the multiplied values in a precursor data step.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Solution
‎04-06-2017 06:15 AM
Super User
Posts: 7,100

Re: 22-322: Syntax error

From the documentation:

"After the keyword MODEL, the dependent (response) variables are specified, followed by an equal sign and the regressor variables."

You can only use variables, not terms; create variables that hold the multiplied values in a precursor data step.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 10,871

Re: 22-322: Syntax error

Please post such error related log content in a code box using the {i} menu icon. The position of the _ in the error message helps diagnose problems but the main forum window reformats some of the text so that the position changes.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 134 views
  • 1 like
  • 3 in conversation