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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 745 views
  • 0 likes
  • 3 in conversation