BookmarkSubscribeRSS Feed
fanellm1
Calcite | Level 5

I am tryong to test an interaction between variables temp, wind, and precip. If i use them under the imported data set and try to use a * in between two variables to resemble and interaction, SAS tells me it does not recognize the *. If i were to create a new data set I am confused how I would assign betas their corresponding variable, as it would not recognize the variable names from the imported data set.

3 REPLIES 3
Tom
Super User Tom
Super User

Please show the code you are trying to run. Use the Insert SAS Code icon to get a pop-up window to paste the lines of code.

If you are getting errors in the log then post the log. Use the Insert Code icon to get a pop-up window to paste the lines from the log.

fanellm1
Calcite | Level 5
 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         proc reg data = work.import;
 74         model so2= temp wind precip temp*wind /VIF;
                                            _
                                            22
                                            200
 NOTE: The previous statement has been deleted.
 ERROR 22-322: Syntax error, expecting one of the following: a name, ;, -, /, :, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_, {.  
 ERROR 200-322: The symbol is not recognized and will be ignored.
 75         run;
 
 WARNING: No variables specified for an SSCP matrix. Execution terminating.
 NOTE: PROCEDURE REG used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 76         
 77         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 89         

 

proc reg data = work.import;
model so2= temp wind precip temp*wind /VIF;
run;
PaigeMiller
Diamond | Level 26

You have to do this in PROC GLM.

 

PROC REG does not test interactions.

--
Paige Miller

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 594 views
  • 0 likes
  • 3 in conversation