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
- /
- SAS Programming
- /
- SAS/GRAPH and ODS Graphics
- /
- Plot a variable not specified in Model for reg pro...

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-13-2010 05:52 PM

Hi everybody,

Newby on the forum and with sas, I would like to do a regression for exemple :

model car_solded = earn population

After I would like plot the results and residues on the same graph but depending on time. But I have the problem below:

ERROR: A variable was specified in the PLOT statement which is not specified in a VAR or

MODEL statement

The complete example is below:

proc reg data=data.data_used;

title 'regression lineaire';

model car_solded = earn population /r p;

plot r.*Time;

run;

Could someone helping me.

Thanks a lot

Newby on the forum and with sas, I would like to do a regression for exemple :

model car_solded = earn population

After I would like plot the results and residues on the same graph but depending on time. But I have the problem below:

ERROR: A variable was specified in the PLOT statement which is not specified in a VAR or

MODEL statement

The complete example is below:

proc reg data=data.data_used;

title 'regression lineaire';

model car_solded = earn population /r p;

plot r.*Time;

run;

Could someone helping me.

Thanks a lot

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

10-14-2010 04:24 AM

The documentation for PROC REG says

*VAR*

lists variables for which crossproducts are to be computed, variables that can be interactively added to the model, or variables to be used in scatter plots.

So you probably need a VAR statement here (as the ERROR message suggests BTW.)

As an aside: why can't these error messages say which variable? Should be pretty much known ...

lists variables for which crossproducts are to be computed, variables that can be interactively added to the model, or variables to be used in scatter plots.

So you probably need a VAR statement here (as the ERROR message suggests BTW.)

As an aside: why can't these error messages say which variable? Should be pretty much known ...