BookmarkSubscribeRSS Feed
DingDing
Quartz | Level 8

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.

 

8 REPLIES 8
PaigeMiller
Diamond | Level 26

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.

 

http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_plm_overview...

--
Paige Miller
DingDing
Quartz | Level 8

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.

dcruik
Lapis Lazuli | Level 10

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.

 

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_reg_sect006....

and http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_reg_sect013....

 

OR

 

http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glm_sect007....

and http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_glmselect_se...

DingDing
Quartz | Level 8

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

 

dcruik
Lapis Lazuli | Level 10

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!

DingDing
Quartz | Level 8
Thank you, dear dcruik. It really helps. It's very nice of you.
PaigeMiller
Diamond | Level 26

@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

--
Paige Miller
DingDing
Quartz | Level 8
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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1113 views
  • 0 likes
  • 3 in conversation