I am using the SAS command to run a linear multiple regression, stepwise method. However, I have covariates and I would like to know, which is the correct SAS command for this. My actual command is:
proc reg data=a;
model dependent_variable= independent_variables/selection=stepwise;
run;
model dependent_variable=covariate independent_variables/selection=stepwise;
If you want stepwise to force the covariate into the model, so it must be selected, use include=1 which forces the first variable listed to always be selected.
model dependent_variable=covariate independent_variables/selection=stepwise include=1;
I feel compelled to advise about the dangers of using Stepwise regression, as many statisticians don't trust it, find it unreliable and misleading. Use your favorite internet search engine to search for "problems with stepwise regression" and you'll have enough to read on this topic for a week. Alternatives are PROC PLS and PROC GLMSELECT.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.