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.
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.
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.
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
Thank you very much, dear dcruik. You offer me a great help!
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 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
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.