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?

CFC_SAS_Communities_400x225.jpg

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

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
  • 3820 views
  • 0 likes
  • 2 in conversation