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
- /
- Base SAS Programming
- /
- Making a plot to show the effect of interaction

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

12-01-2015 07:37 AM

The multiple regression model is

E(Y)= beta0+beta1*X1+beta2*X2+beta3 X1*X2

We are reqired to make a plot to show the effect of interaction.

What kind of plot made by SAS will be good to show the interaction effect?

Could anybody offer me a hint? Thanks in advance.

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

Posted in reply to DingDing

12-01-2015 08:16 AM

If you perform this model fit in PROC GLM (or a bunch of other procedures), then using PROC PLM is an easy way to make an interaction plot using the EFFECTPLOT statement.

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

Posted in reply to PaigeMiller

12-01-2015 08:31 AM

Thank you!! It really helps. One more question not relate to this, but relate to my assignment. So I would like to consult you directly here.

We are required to use the F-test to perform a Forward stepwise selection procedure to decide whether to add an variable, and then use the Akaike Information Criterion(AIC) to check model selection?

The model fit is

E(Y)= beta0+beta1*X1+beta2*X2+beta3 X1*X2

I don't know how to calculate the AIC and how to perform Forward stepwise selection procedure in SAS. Do you have some examples similiar to this? I check the web again and again but failed to find some similiar procedure. If you could help me, that is really very appreciated.

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

Posted in reply to DingDing

12-01-2015 09:09 AM

The AIC is a default model statistic that SAS produces in the proc reg or proc glm/proc glmselect procedures. To perform a Forward and Stepwise selection, you just need to use the option "selection=" after your model statement. Below are links to help you with the different options with the proc reg and proc glm/proc glmselect procedures.

OR

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

Posted in reply to dcruik

12-01-2015 09:42 AM - edited 12-01-2015 02:44 PM

Thank you very much, dear dcruik. You offer me a great help!

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

Posted in reply to DingDing

12-01-2015 10:46 AM - edited 12-01-2015 10:47 AM

I'm not sure what procedure you are using, but you can try to specify the plots option like "plots(only)=(diagnositcs(stats=default aic sbc));" or even after your selection= option, you may be able to use an AIC option that will display the AIC for the models. You will need to make sure you have the ods graphics on before using the plots= statement though. Whichever procedure you are using, I would recommend Google searching the syntax on it and determining how to specify specific statistics to be produced and outputted. Hope this helps!

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

Posted in reply to dcruik

12-01-2015 02:46 PM

Thank you, dear dcruik. It really helps. It's very nice of you.

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

Posted in reply to DingDing

12-01-2015 09:53 AM - edited 12-01-2015 09:55 AM

DingDing wrote:

We are required to use the F-test to perform a Forward stepwise selection procedure to decide whether to add an variable, and then use the Akaike Information Criterion(AIC) to check model selection?

Time for a rant

Gosh, I really hate to hear things like this. Is there some reason to require Forward stepwise selection? This method has been shown in many different papers to be a poor method of model building. Or is this simply a homework assignment? (In which case, I don't understand why a professor would require a poor method of model building)

Rant off

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

Posted in reply to PaigeMiller

12-01-2015 10:23 AM

I am very sorry. This is indeed an assignment, since time is very limited to submit, and I don't have much time to go through everything and I thought I am not able to figure out this before the deadline, so I just post it here for a direct answer.