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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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