BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
pansoh
Calcite | Level 5

I am going to do the residual analyze. So I need the residual plot. I am not sure how to fix the error.

 

 

DATA Golf;
INPUT Season $ Score;
Datalines;
Summer 83
Summer 85
Summer 85
Summer 87
Summer 90
Summer 88
Summer 88
Summer 84
Summer 91
Summer 90
Shoulder 91
Shoulder 87
Shoulder 84
Shoulder 87
Shoulder 85
Shoulder 86
Shoulder 83
Winter 94
Winter 91
Winter 87
Winter 85
Winter 87
Winter 91
Winter 92
Winter 86
;

proc print;
run;

 

PROC REG DATA=Golf;
Model Score =Season;

Run;

 

ERROR: Variable Season in list does not match type prescribed for this list.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

Note that there can only be one predicted value for each season (the season mean score). Try this:

 


PROC glm DATA=Golf plots=DIAGNOSTICS(LABEL UNPACK);
class season;
Model Score = Season;
Run;
PG

View solution in original post

5 REPLIES 5
ChrisNZ
Tourmaline | Level 20

The message is clear.

A regression is performed between 2 numeric variables; you have a character variable here.

pansoh
Calcite | Level 5

How to correct it?

ChrisNZ
Tourmaline | Level 20
pansoh
Calcite | Level 5

Residual vs fit plot, normal qq plot. Response is Score.

PGStats
Opal | Level 21

Note that there can only be one predicted value for each season (the season mean score). Try this:

 


PROC glm DATA=Golf plots=DIAGNOSTICS(LABEL UNPACK);
class season;
Model Score = Season;
Run;
PG

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1356 views
  • 2 likes
  • 3 in conversation