BookmarkSubscribeRSS Feed
BDORR
Fluorite | Level 6

 

 The Code below produces the attached graph and I would like to test whether the intercepts and slopes of the 4 polynomial regression lines differ. I have 4 treatment levels control and stage 1-3.

 

 

ods graphics on;

proc glm data=MeanTotTRlat PLOTS=ANCOVAPLOT(CLM);
class treatment ;
model TotTR = latR LatR*LatR treatment ;

run;

ods graphics off;quit;

4 REPLIES 4
PaigeMiller
Diamond | Level 26

I have 4 treatment levels control and stage 1-3.

Stage does not appear in the code anywhere. Is it important to the problem?

 

I would like to test whether the intercepts and slopes of the 4 polynomial regression lines differ

 

proc glm data=MeanTotTRlat PLOTS=ANCOVAPLOT(CLM);
class treatment ;
model TotTR = treatment treatment*latR treatment*LatR*LatR;
run;

The interaction between treatment*latr is the test to see if the slopes are the same, or not. If the p-value is <0.05 then the slopes are not statistically the same. The interaction treatment*latr*latr tests to see if the quadratic effects are the same across treatments.

--
Paige Miller
BDORR
Fluorite | Level 6
Hi PaigeMiller (Esteemed Advisor),



The answer you gave below is great and addresses the issue of testing for differences in slopes. However I would also like to test for differences in intercepts for each regression line. Any Advice?





(reply in SAS Programming<> on 06-27-2019 05:43 PM )

________________________________

Re: SAS Proc GLM test for difference intercept and slope<>

I have 4 treatment levels control and stage 1-3.

Stage does not appear in the code anywhere. Is it important to the problem?



I would like to test whether the intercepts and slopes of the 4 polynomial regression lines differ



proc glm data=MeanTotTRlat PLOTS=ANCOVAPLOT(CLM);

class treatment ;

model TotTR = treatment treatment*latR treatment*LatR*LatR;

run;



The interaction between treatment*latr is the test to see if the slopes are the same, or not. If the p-value is <0.05 then the slopes are not statistically the same. The interaction treatment*latr*latr tests to see if the quadratic effects are the same across treatments.




PaigeMiller
Diamond | Level 26

@BDORR wrote:
Hi PaigeMiller (Esteemed Advisor),



The answer you gave below is great and addresses the issue of testing for differences in slopes. However I would also like to test for differences in intercepts for each regression line. Any Advice?












Testing intercepts is the exact same concept as testing slope or quadratic effect. So I leave it as a homework assignment for you to figure out.

--
Paige Miller
BDORR
Fluorite | Level 6

I don't need homework I need an answer.  Can anyone else in this community provide an answer?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1778 views
  • 0 likes
  • 2 in conversation