The link below give out Stepwise Regression.
I have one quest. Say I have dataset below. Surely I can have code on two-step regression. But how to tell(what criteria to tell) two-step
is better than one-step regression?! Thanks,
%let slope1=-2; %let slope2=5; %let turner=90;
data indata;
do i=1 to 100;
if i<&turner. then y=5*ranuni(i)+i*&slope1.;
else y=10*ranuni(i)+i*&slope2.-&turner.*&slope2.+&turner.*&slope1.;
output;
end;
run;quit;
ods listing gpath="%sysfunc(getoption(work))";
proc sgplot data=indata;
scatter x=i y=y;
run;quit;
The dataset is hypo. What if turner=95 or turner=98?!
Duplicate post. An answer was discussed here. Please put all discussion of this problem in one location, at the link I gave.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.