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?

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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