turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Error in Linear regression while creating a plot

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-30-2014 04:54 AM

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

Accepted Solutions

Solution

10-30-2014
09:03 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-30-2014 09:03 AM

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;

All Replies

Solution

10-30-2014
09:03 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-30-2014 09:03 AM

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;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

10-30-2014 09:21 AM

thank you, I will use this option