I am using SAS 9.4 TS level 1MZ.on window version of 6.1.7601. I went to compare more than two regression lines so anyone could help to do this please? or anyone share this syntax would be highly appreciated.
Thanks in advance!
First, which regression procedure are you using? It may helps us to provide some of the code you are running to give us an idea of what may be practical.
Second what kind of comparison are you looking to do? Graphs? Differences of slopes? Differences of Intercepts? Differences of R-squares?
Here is an example. The slopes are compared as the interaction term between engine size and origin in the ANOVA table, and the predicted values are compared for a 4-liter engine in the LSMeans output :
proc glm data=sashelp.cars;
class origin;
model horsepower = origin|engineSize;
lsmeans origin / at engineSize=4 pdiff; /* At 4-litre engine size */
run;
(for an illustration, look at the ANCOVA graph)
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.