BookmarkSubscribeRSS Feed
JUMMY
Obsidian | Level 7

I have a randomized complete design problem where Six litters of hamsters with 2 hamsters from each litter (considered blocks) were available for an experiment examining differences between length of day light on the NI enzyme level (ENZYME). The treatments (DAYLENGTH) of short (1) and long (2) are randomly assigned within litter (LITTERS). How do I test for differences in treatments taking litter into account

 

I am not sure if my code is set up the code properly to answer the question.

 

data have;
input litter daylength enzyme;
datalines;

1 short 2.1 
2 short 1.8 
3 short 1.4 
4 short 1.2 
5 short 1.9 
6 short 2.4 
1 long 2.6 
2 long 2.2 
3 long 2.4 
4 long 1.7 
5 long 2.9 
6 long 2.3 
;
run;


proc glm data=have plots=(meanplot(connect));
  class daylength litter;
  model enzyme=daylength litter;
  means daylength / tukey;
  lsmeans daylength / stderr pdiff adjust=tukey;
title 'RCB ANOVA';
run;

 Does the above code answer the question on testing the differences in treatments while taking BLOCKS into account?

2 REPLIES 2
PaigeMiller
Diamond | Level 26

@JUMMY wrote:

I have a randomized complete design problem where Six litters of hamsters with 2 hamsters from each litter (considered blocks) were available for an experiment examining differences between length of day light on the NI enzyme level (ENZYME). The treatments (DAYLENGTH) of short (1) and long (2) are randomly assigned within litter (LITTERS). How do I test for differences in treatments taking litter into account

 

I am not sure if my code is set up the code properly to answer the question.

 

data have;
input litter daylength enzyme;
datalines;

1 short 2.1 
2 short 1.8 
3 short 1.4 
4 short 1.2 
5 short 1.9 
6 short 2.4 
1 long 2.6 
2 long 2.2 
3 long 2.4 
4 long 1.7 
5 long 2.9 
6 long 2.3 
;
run;


proc glm data=have plots=(meanplot(connect));
  class daylength litter;
  model enzyme=daylength litter;
  means daylength / tukey;
  lsmeans daylength / stderr pdiff adjust=tukey;
title 'RCB ANOVA';
run;

 Does the above code answer the question on testing the differences in treatments while taking BLOCKS into account?


Yes.

--
Paige Miller
JUMMY
Obsidian | Level 7
The overall F-Test shows a p-value of 0.0648 which is insignificant. However, the p-value for the treatment shows a significant difference while block is insignificant. Can I still go ahead and find which treatments are different even though the F-Test suggest otherwise?

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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