BookmarkSubscribeRSS Feed
n_samples
Calcite | Level 5

Hi,

I have conducted an experiment that ecologists often call a complete reciprocal transplantation experiment with six site and six populations. To make an "overall" test for local adaptation (i.e. an organism has higher fitness or performance at "home" as compared to "away") I want to specify a contrast to examine the difference in biomass at "home" and "away". For this, I have used the mixed procedure and an lsmestimate statement as given below. I simply wonder if my model looks reasonable, or if there are obvious mistakes in the way I have specified the model and the contrast?

* ln_biomass mixed model;
proc mixed data=adaptationdata;
class site pop block;
model ln_biomass = site pop site*pop;
random block(site);
lsmestimate site*pop '"all home" vs "all away" (mean) ' 
  0.2  -0.04  -0.04  -0.04  -0.04  -0.04
-0.04  0.2   -0.04  -0.04  -0.04  -0.04
-0.04 -0.04   0.2   -0.04  -0.04  -0.04
-0.04 -0.04  -0.04   0.2   -0.04  -0.04
-0.04 -0.04  -0.04  -0.04   0.2   -0.04
-0.04 -0.04  -0.04  -0.04  -0.04   0.2 / CL;
run;

Kind regards,
K

1 REPLY 1
SteveDenham
Jade | Level 19

While the lsmestimate statement will run, I don't think it is quite what you want, as the 'all home' coefficients and "all away" coefficients sum to 1.2.

Try:

lsmestimate site*pop '"all home" vs "all away" (mean) ' 

5  -1  -1  -1  -1  -1

-1  5   -1  -1  -1  -1

-1 -1   5   -1  -1  -1

-1 -1  -1   5  -1  -1

-1 -1  -1  -1   5   -1

-1 -1  -1  -1  -1   5 / CL divisor=30;

Steve Denham

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!
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
  • 1404 views
  • 3 likes
  • 2 in conversation