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

PROC REG DATA=SizePrice;

MODEL Price=Size ;

PLOT Price*Size='+' p.*Size='*' / overlay;

OUTPUT OUT=NEW P=PRED;

RUN;

Hello All, as per the code above i am creating a linear regression model and want to plot the values however while doing so i get an error message:

NOTE: The previous statement has been deleted.

ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, /, ADJRSQ., AIC., BIC., COOKD., COVRATIO., CP., DFBETAS.,

              DFFITS., EDF., GMSEP., H., IN., JP., L95., L95M., LCL., LCLM., MSE., NP., NPP., NQQ., OBS., P., PC., PRED.,

              PREDICTED., PRESS., R., RESIDUAL., RMSE., RSQ., RSTUDENT., SBC., SP., SSE., STDI., STDP., STDR., STUDENT., U95.,

              U95M., UCL., UCLM.. 

ERROR 201-322: The option is not recognized and will be ignored

Kindly suggest what is that i missed here.

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Wow.  I haven't seen anyone use the old-style graphics in 10 years. You should consider moving to ODS statistical graphics, which have been around since the early SAS 9 days. The graph you want is called a FitPlot. PROC REG can create about 20 graphs automatically:

ods graphics on;

PROC REG DATA=sashelp.class plot(only)=(FitPlot);

MODEL weight=height ;

OUTPUT OUT=NEW P=PRED;

RUN;

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

Wow.  I haven't seen anyone use the old-style graphics in 10 years. You should consider moving to ODS statistical graphics, which have been around since the early SAS 9 days. The graph you want is called a FitPlot. PROC REG can create about 20 graphs automatically:

ods graphics on;

PROC REG DATA=sashelp.class plot(only)=(FitPlot);

MODEL weight=height ;

OUTPUT OUT=NEW P=PRED;

RUN;

Shivi82
Quartz | Level 8

thank you, I will use this option

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1753 views
  • 0 likes
  • 2 in conversation