BookmarkSubscribeRSS Feed
yael
Quartz | Level 8

Hello

 

I try to check nonlinearity in the regression by using square in one of my variable (fownff)

 

My code is:

proc glm data=sasuser.sasfile060716;

class firmno sector year industry;

model roa = fownff fownff**2 salesGro RDAssets LTassets LNAssetsindustry year

/solution;

run;

 

But the log I got is:

ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, *, -, /, @, _CHARACTER_, _CHAR_, _NUMERIC_, |.

ERROR 200-322: The symbol is not recognized and will be ignored.

 

As far as I know, this is the way to check linearity.

 

I appreciate your help to explain what is my mistake

 

Thanks a lot!

 

 

 

 

4 REPLIES 4
Ksharp
Super User

model roa = fownff    fownff*fownff   salesGro RDAssets LTassets LNAssetsindustry year


I suggest you check PROC LOESS 
yael
Quartz | Level 8

Thanks for your reply, but I got the same LOG answer with your proposal

 

PGStats
Opal | Level 21

X*Y is accepted in proc reg model specification as a polynomial effect. @Ksharp's suggestion should work. Please post your log.

PG
Reeza
Super User

Your code should look like the following. Note that you have variables in your CLASS statement that are not in your model statement. Not sure why you have them present. 

 

proc glm data=sasuser.sasfile060716;
class firmno sector year industry;
model roa = fownff fownff*fownff salesGro RDAssets LTassets LNAssetsindustry year
/solution;
run;

As stated, if something doesn't work please post the code and log. We can't help with 'things don't work'. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 985 views
  • 3 likes
  • 4 in conversation