Programming the statistical procedures from SAS

Constrast to test for local adaptation in populations

Reply
N/A
Posts: 1

Constrast to test for local adaptation in populations

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

Respected Advisor
Posts: 2,655

Re: Constrast to test for local adaptation in populations

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

Ask a Question
Discussion stats
  • 1 reply
  • 212 views
  • 3 likes
  • 2 in conversation