Difference between two-way ANOVA and (two-way) ANCOVA

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Difference between two-way ANOVA and (two-way) ANCOVA

syrvn
Hi!

as my subject says I am struggling with the different of a two-way ANOVA and a (two-way) ANCOVA.

I found the following examples from this webpage:

http://www.statmethods.net/stats/anova.html

# One Way Anova (Completely Randomized Design)
fit <- aov(y ~ A, data=mydataframe)

# Randomized Block Design (B is the blocking factor)
fit <- aov(y ~ A + B, data=mydataframe)

# Two Way Factorial Design
fit <- aov(y ~ A + B + A:B, data=mydataframe)
fit <- aov(y ~ A*B, data=mydataframe) # same thing

# Analysis of Covariance
fit <- aov(y ~ A + x, data=mydataframe)

I) The 1. example is pretty clear. A simple on way ANOVA.

II) Is it correct to say that example 2. (which is called a Randomized Block Design) is a two way ANOVA?

III) Example 3 is like example 2. (in case I was right in II) )  a two way ANOVA but including an interaction term. That's why
they call it here a Factorial Design.

So far so good.

IV) For me, the ANCOVA (last example) looks like a two-way ANOVA. So in what way is the variable "x" different to variable "B" so that it is called an ANCOVA and not an ANOVA??? I presume that from the type of data R knows whether to perform an ANCOVA or an ANOVA.

V) Is it right to say that the ANCOVA example is a two-way ANCOVA? Or can a one-way ANCOVA actually exists?

You see I am a bit confused especially how R distinguishes between the ANCOVA and the two-way ANOVA?

I hope to find some useful answers here.

Cheers!
Reply | Threaded
Open this post in threaded view
|

Re: Difference between two-way ANOVA and (two-way) ANCOVA

Peter Dalgaard-2

On Jul 4, 2012, at 15:20 , syrvn wrote:

> Hi!
>
> as my subject says I am struggling with the different of a two-way ANOVA and
> a (two-way) ANCOVA.
>
> I found the following examples from this webpage:
>
> http://www.statmethods.net/stats/anova.html
>
> # One Way Anova (Completely Randomized Design)
> fit <- aov(y ~ A, data=mydataframe)
>
> # Randomized Block Design (B is the blocking factor)
> fit <- aov(y ~ A + B, data=mydataframe)
>
> # Two Way Factorial Design
> fit <- aov(y ~ A + B + A:B, data=mydataframe)
> fit <- aov(y ~ A*B, data=mydataframe) # same thing
>
> # Analysis of Covariance
> fit <- aov(y ~ A + x, data=mydataframe)
>
> I) The 1. example is pretty clear. A simple on way ANOVA.
>
> II) Is it correct to say that example 2. (which is called a Randomized Block
> Design) is a two way ANOVA?
>
> III) Example 3 is like example 2. (in case I was right in II) )  a two way
> ANOVA but including an interaction term. That's why
> they call it here a Factorial Design.
>
> So far so good.
>
> IV) For me, the ANCOVA (last example) looks like a two-way ANOVA. So in what
> way is the variable "x" different to variable "B" so that it is called an
> ANCOVA and not an ANOVA??? I presume that from the type of data R knows
> whether to perform an ANCOVA or an ANOVA.
>
> V) Is it right to say that the ANCOVA example is a two-way ANCOVA? Or can a
> one-way ANCOVA actually exists?
>
> You see I am a bit confused especially how R distinguishes between the
> ANCOVA and the two-way ANOVA?
>
> I hope to find some useful answers here.


Well, it's not really about R, is it?


Anyways, I'd call  y~A+x a ONE-way ANCOVA, because it deals with the covariation of two variables (y and x) in a one-way layout. In the traditional applications, x is often independent of A (pre-randomization measurement like soil quality, etc.) so that the group means of y can be estimated as the value of the regression at the grand mean of x ("adjusted means"), and the mean difference between two groups is the vertical difference between the parallel regression lines.

>
> Cheers!
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Difference-between-two-way-ANOVA-and-two-way-ANCOVA-tp4635403.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

--
Peter Dalgaard, Professor
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: [hidden email]  Priv: [hidden email]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Difference between two-way ANOVA and (two-way) ANCOVA

Richard M. Heiberger
In reply to this post by syrvn
The usual terminology uses the number of "ways" to mean the number of
factors (categorical
or classification variables, with more than one degree of freedom per
factor).
The term covariate is used for continuous variables, with exactly one df.

On Wed, Jul 4, 2012 at 9:20 AM, syrvn <[hidden email]> wrote:

> Hi!
>
> as my subject says I am struggling with the different of a two-way ANOVA
> and
> a (two-way) ANCOVA.
>
> I found the following examples from this webpage:
>
> http://www.statmethods.net/stats/anova.html
>
> # One Way Anova (Completely Randomized Design)
> fit <- aov(y ~ A, data=mydataframe)
>
> # Randomized Block Design (B is the blocking factor)
> fit <- aov(y ~ A + B, data=mydataframe)
>
> # Two Way Factorial Design
> fit <- aov(y ~ A + B + A:B, data=mydataframe)
> fit <- aov(y ~ A*B, data=mydataframe) # same thing
>
> # Analysis of Covariance
> fit <- aov(y ~ A + x, data=mydataframe)
>
> I) The 1. example is pretty clear. A simple on way ANOVA.
>
> II) Is it correct to say that example 2. (which is called a Randomized
> Block
> Design) is a two way ANOVA?
>
> III) Example 3 is like example 2. (in case I was right in II) )  a two way
> ANOVA but including an interaction term. That's why
> they call it here a Factorial Design.
>
> So far so good.
>
> IV) For me, the ANCOVA (last example) looks like a two-way ANOVA. So in
> what
> way is the variable "x" different to variable "B" so that it is called an
> ANCOVA and not an ANOVA??? I presume that from the type of data R knows
> whether to perform an ANCOVA or an ANOVA.
>
> V) Is it right to say that the ANCOVA example is a two-way ANCOVA? Or can a
> one-way ANCOVA actually exists?
>
> You see I am a bit confused especially how R distinguishes between the
> ANCOVA and the two-way ANOVA?
>
> I hope to find some useful answers here.
>
> Cheers!
>
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Difference-between-two-way-ANOVA-and-two-way-ANCOVA-tp4635403.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.