turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Testing 2-way ANOVA with interaction

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-26-2015 11:25 AM

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;

Accepted Solutions

Solution

01-26-2015
03:36 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-26-2015 03:36 PM

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

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-26-2015 02:20 PM

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?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-26-2015 02:57 PM

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;

Solution

01-26-2015
03:36 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

01-26-2015 03:36 PM

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