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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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