Programming the statistical procedures from SAS

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

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

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;

      lsmeans treatment/ ADJUST=TUKEY;

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.

Attachment

Accepted Solutions
Solution
‎06-05-2015 02:10 PM
Respected Advisor
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


View solution in original post


All Replies
Solution
‎06-05-2015 02:10 PM
Respected Advisor
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.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 335 views
  • 0 likes
  • 2 in conversation