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.
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;
The message is clear.
A regression is performed between 2 numeric variables; you have a character variable here.
How to correct it?
what are you trying to achieve?
Residual vs fit plot, normal qq plot. Response is Score.
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;
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!
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.
Ready to level-up your skills? Choose your own adventure.