BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mistryr
Calcite | Level 5

I am trying to run a 2-way anova with my 2 x variables being speed and replicate. When I test the main effects of speed and replicate alone, I am able to produce output that gives me p values however when I try to test speed*replicate in my model my output fails to give me any p values. I am not sure if my data set is too small but my degrees of freedom are 3 and 5 and N = 25.  My coding is found below, if anyone could assist me with this I would really appreciate it, thanks

Rakesh

Title Adult Fatmucket CR vs Speed;

data first;

input replicate 1. +1 speed 2. +1 cr 6.;

cards;

proc print data=first;

title 'Speed Data';

run;

Title 'Analysis of variance';

proc mixed covtest;

class replicate speed;

model cr=speed replicate speed*replicate;

lsmeans speed;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

I ran the code and got p values for both speed (<0.0001) and replicate (0.0571).  I repeated with the interaction included and obtained the missing values that you report.  The reason is that the error term is the interaction in this model.  You have 4 levels of replicate, and 6 levels of speed, for 24 total observations.  Degrees of freedom will be 3, 5 and 15, or 23 total, which is n-1, so no p values are available.

Steve Denham

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

It is the design of the experiment that determines whether or not the speed*replicate term can be estimated. Could you show us the 25 runs in your experiment?

--
Paige Miller
mistryr
Calcite | Level 5

So my first category is replicate (df = 3) and second is speed (df = 5). The third category is CR (feeding rate). I have posted the runs below, thanks

Title Adult Fatmucket CR vs Speed;

data first;

input replicate 1. +1 speed 2. +1 cr 6.;

cards;

1 00 0.4956

2 00 0.3467

3 00 0.4513

4 00 0.5148

1 02 1.0200

2 02 1.1800

3 02 0.8400

4 02 0.8700

1 10 0.6024

2 10 1.2458

3 10 0.9109

4 10 1.4416

1 15 1.3708

2 15 1.3784

3 15 0.9514

4 15 1.4002

1 20 1.2100

2 20 1.6400

3 20 1.4500

4 20 1.7700

1 25 1.8636

2 25 1.7435

3 25 1.2154

4 25 1.8201

;

       

proc print data=first;

title 'Concentration Data';

run;

Title 'Analysis of variance';

proc mixed covtest;

class replicate speed;

model cr=speed replicate;

lsmeans speed;

run;

SteveDenham
Jade | Level 19

I ran the code and got p values for both speed (<0.0001) and replicate (0.0571).  I repeated with the interaction included and obtained the missing values that you report.  The reason is that the error term is the interaction in this model.  You have 4 levels of replicate, and 6 levels of speed, for 24 total observations.  Degrees of freedom will be 3, 5 and 15, or 23 total, which is n-1, so no p values are available.

Steve Denham

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 3 replies
  • 1639 views
  • 0 likes
  • 3 in conversation