Hello,
I am analyzing data collected from a randomized complete block design experiment. However, instead of having one replicate of a control in each block I have two. There is only one replicate for the other treatments in each block. I have been using proc mixed with block as a random factor, but I am unsure how to incorporate the multiple replicates of the control in each block. Am I really analyzing an incomplete or partial design? Any help or suggestions would be greatly appreciated. Thanks
You don't need to do anything different.
And comparisons to the mean of the control groups can easily be handled with an LSMESTIMATE statement.
Steve Denham
Thanks for the suggestions. Rather than using the LSMESTIMATE statement, I used the lsmeans/pdiff to see if the control was different from any treatment, and then I used a contrast statement to see if the control was different from all treatments (code below). There are 7 treatments (including control). Would this be the correct way making the comparisons? Thanks again.
proc mixed ;
class block treatment;
model response = treat;
random blk;
lsmeans treatment/pdiff;
contrast 'Control vs Treatment' treat -1 -1 6 -1 -1 -1 -1;
run;
Well, that brings up a question in my mind. If you have 2 control groups, wouldn't you want to compare to the mean of the two (maybe not--they may be a positive and a negative control)? In any case, in your CONTRAST statement, aren't you treating one of the control groups as a treated group? Just assuming that the controls are groups 2 and 3 (already know that 3 is a control), I would look at something like:
contrast ' Control vs Treatment' -2 -2 5 5 -2 -2 -2/divisor=2;
But that only gives me a p value, while
lsmestimate treat 'Control vs Treatment' -2 -2 5 5 -2 -2 -2/divisor=2 cl;
will also give a measure of the difference, the standard error of the difference and a confidence interval on the difference--which I think is a lot more informative than just a p value.
Steve Denham
Thanks for the reply. I probably was a little unclear on the actual design. A better way to put it is that I basically have two observations in the control plot, and only one observation in the other 6 treatments. That is why I had the contrast only compare to one control plot and not two. Both of the observations occur in the same plot. I don't know if that changes anything or not.
Also, I've done some reading up on the lsmestimate statement, but I am still having some trouble understanding what the divisor is? Any help would be appreciated. Thanks again.
Hmm, that may change things up a bit, as I would expect measurements within a plot to be more closely correlated than measures between plots.
So the design is a complete block of 7 treatments (one of which is a control), but with 2 subsamples from the control. OK, I would alter the analysis slightly. Make sure that the variable subsample is on every record of the data (=1 for active treatments, =1 or 2 for control), and try the following:
proc mixed ;
class block subsample treatment;
model response = treat;
random blk subsample(blk);
lsmeans treatment/pdiff;
contrast 'Control vs Treatment' treat -1 -1 6 -1 -1 -1 -1;
run;
Are the results any different?
As to the divisor, think of it this way for the contrast above. If you wanted to calculate the value associated with the difference, you would need to divide all the coefficients by 6, something like -1/6 -1/6 1 -1/6 -1/6 -1/6 -1/6. But the contrast statement doesn't recognize fractions (nor does the lsmestimate statement), so you might think you could put in -.1666 -.1666 1 -.1666 -.1666 -.1666 -.1666. That would come back as non-estimable, since it does not sum to zero. Using the divisor= option enables you to have integer values, and not have to deal with rounding.
Steve Denham
Steve raises the important point. You have subsamples for the control, not replicated experimental units. This is different. I am not sure if Steve's code will work since there are subsamples only for one treatment (variance may not be estimable). An approach that would work would be to get the average of the subsamples for the control (for each block), and use that as the single observation for the control for each block.
I agree with Larry here. If the G matrix comes back as not positive definite, averaging will be your only choice.
Steve Denham
The model did come back as not positive definite, so I will just use the averaging approach. Thank you both for your advice.
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!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.