BookmarkSubscribeRSS Feed
aml6102
Calcite | Level 5

I am testing the effect of a product applied at four different concentrations (continuous variable), at two sites and six genotypes (class variables).  The treatments were blocked at each site.  Site*concentration is significant, which is interesting.  Two specific follow-up questions are 1. what is the slope for concentration at each site, averaged across genotypes? and 2. are each of those slopes different from zero (i.e., does concentration actually affect the response at both of the sites)?

 

This may not be the most elegant strategy, but I'm able to get the response = slope*concentration + intercept lines for each site by sending the lsmeans through proc reg.  However, since the data variability is lost, this does not tell me whether each slope is different from zero.  My attempts at proc mixed estimate statements for this test are giving errors; any help would be much appreciated!

 

Thanks,

Anna

 

proc mixed data=data ;
class site genotype block;
model response = site|genotype|concentration ;
random block(site) ;
lsmeans site / at concentration = 0  ;
lsmeans site / at concentration = 10  ;
lsmeans site / at concentration = 20  ;
lsmeans site / at concentration = 30  ;
ods output lsmeans = lsmeans; 
run;

proc sort data=lsmeans; by site; 
proc reg data=lsmeans;
by site;
model estimate = concentration;
run;

 

 

1 REPLY 1
StatsMan
SAS Super FREQ

Estimate statements for slopes are tricky. It gets even trickier when you have many interactions. Harder still is averaging slopes over one of the model CLASS effects. The best strategies for getting to your end result is to build up your ESTIMATE statements using more simple tests and using the /E option on the ESTIMATE statement to make sure you have coefficients in the correct place. It is scarily easy to write an ESTIMATE statement that is giving you an answer but that is testing the wrong hypothesis!

First, try to write ESTIMATE statements for each of the 6 slopes on genotype for the 2 sites. Those ESTIMATE statements will involve the main effect of CONCENTRATION and the interactions of SITE*CONCENTRATION, GENOTYPE*CONCENTRATION, and SITE*GENOTYPE*CONCENTRATION. The coefficients on the ESTIMATE statement will all be 1's here, in the appropriate spots for each of these 4 effects. Again, that /E option will show you if you have your coefficients in the right spot. 

Then, you can average the coefficients over the genotypes in a site to get your final result. With 6 genotypes, you can either use .1666666 as the coefficients on the G*C and S*G*C interactions, or use 1 and the DIVISOR=6 option on the ESTIMATE statement. The coefficient on C and S*C would be 6 in this case using that DIVISOR= option.

If you get a non-estimable result for that ESTIMATE, check the /E option output to make sure you have the coefficients in the right place. Check that output even if you don't get a non-estimable result to make sure you are testing the correct hypothesis. 

It takes a lot of experience to get estimates like this correct. Working with an experienced statistician is always a good idea when writing post-hoc tests like these.  

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 416 views
  • 0 likes
  • 2 in conversation