Solved
New Contributor
Posts: 2

# Adjusted means from Randomized complete block experiment where block effect is highly significant

What is the best way to obtain adjusted means from a Proc GLM model (file attached) such as:

proc glm data=invivo;

class block treatment;

model invivo=block treatment;

weight treatment;

Contrast 'Compare stx1-0hr with stx2-0hr' treatment 1 0 0 0 -1 0 0 0 0;

Contrast 'Compare stx1-1hr with stx2-1hr' treatment 0 1 0 0 0 -1 0 0 0;

Contrast 'Compare stx1-2hr with stx2-2hr' treatment 0 0 1 0 0 0 -1 0 0;

Contrast 'Compare stx1-3hr with stx2-3hr' treatment 0 0 0 1 0 0 0 -1 0;

run;

The block effect is highly significant but I am having trouble identifying a method to report the adjusted means which accounts for the significant block effect.  Does this require the ESTIMATE function?

Any suggestions?

Thank you.

Accepted Solutions
Solution
‎06-05-2015 02:10 PM
Posts: 2,655

## Re: Adjusted means from Randomized complete block experiment where block effect is highly significant

The best way is to analyze the data using PROC MIXED or PROC GLIMMIX, and consider block as a random effect.  In this case, standard errors of the treatment means will correctly incorporate the variance due to block.  I also notice in your contrasts that there is a time factor.  If the time reflects repeated measurements on the same experimental unit, then the analysis should also incorporate that. Until that is clear, consider the following:

proc glimmix data=invivo;

class block treatment;

model invivo=treatment;

random block;

lsmeans treatment;

LSMESTIMATE treatment

'Compare stx1-0hr with stx2-0hr'  1 0 0 0 -1 0 0 0 0,

'Compare stx1-1hr with stx2-1hr'  0 1 0 0 0 -1 0 0 0,

'Compare stx1-2hr with stx2-2hr'  0 0 1 0 0 0 -1 0 0,

'Compare stx1-3hr with stx2-3hr'  0 0 0 1 0 0 0 -1 0/adjust=simulate(seed=1);

/*Tukey adjustment is not available for the LSMESTIMATE as it is not defined */

run;

Steve Denham

All Replies
Solution
‎06-05-2015 02:10 PM
Posts: 2,655

## Re: Adjusted means from Randomized complete block experiment where block effect is highly significant

The best way is to analyze the data using PROC MIXED or PROC GLIMMIX, and consider block as a random effect.  In this case, standard errors of the treatment means will correctly incorporate the variance due to block.  I also notice in your contrasts that there is a time factor.  If the time reflects repeated measurements on the same experimental unit, then the analysis should also incorporate that. Until that is clear, consider the following:

proc glimmix data=invivo;

class block treatment;

model invivo=treatment;

random block;

lsmeans treatment;

LSMESTIMATE treatment

'Compare stx1-0hr with stx2-0hr'  1 0 0 0 -1 0 0 0 0,

'Compare stx1-1hr with stx2-1hr'  0 1 0 0 0 -1 0 0 0,

'Compare stx1-2hr with stx2-2hr'  0 0 1 0 0 0 -1 0 0,

'Compare stx1-3hr with stx2-3hr'  0 0 0 1 0 0 0 -1 0/adjust=simulate(seed=1);

/*Tukey adjustment is not available for the LSMESTIMATE as it is not defined */

run;

Steve Denham

New Contributor
Posts: 2

## Re: Adjusted means from Randomized complete block experiment where block effect is highly significant

Many thanks Steve.  I appreciate your time and expertise.

Sincerely,

John

🔒 This topic is solved and locked.