F-test and One-way ANOVA (in R)?

  • Thread starter x^2
  • Start date
  • Tags
    anova
In summary, the author is suggesting that people should avoid using Excel for statistical analysis, and that instead they should use a different package.
  • #1
x^2
21
1
I have five groupings of data measurements, each group with a different quantity of measurements. I want to see if one grouping has higher measurements than the rest, but was told that using multiple t-tests was incorrect and that I should use ANOVA.

I'm using R for the analysis. Exactly how might I go about this? I've looked at a couple tutorials, but the examples are too complex for me to understand.

Using the formulas http://en.wikipedia.org/wiki/F-test#One-way_ANOVA_example" I tried an F-test, but got an F-value of on the order of 10^16 as my "within-group" sum of squares value is on the order of 10^-13.

Could someone show me how I'd run a simple ANOVA test in R given a few columns of data and how to interpret the results to test whether one grouping has statistically higher values?

Thank you,
x^2
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
I can't help with doing the analysis in R, but I would be able to do it in Excel. I would run the ANOVA calculations just like the example shown in the Wikipedia article.

Did you use the mean-square values, not the sum-of-squares, to compute the F-value? Have you considered the possibility that your F-value really is of order 1016?

If you really have doubts, perhaps you could post your data here. How many total measurements do you have?

EDIT:
As a test, you could try a t-test between just the groups with the highest and lowest average. You seem confident in your ability to do a t-test; see if you get a t-value that is outrageously large like your F-value was.
 
Last edited:
  • #3
Don't use Excel, for a variety of reasons.
"“Meanwhile, researchers should continue to avoid using the statistical functions in Excel 2007 for any scientific purpose.”
- Yalta (2008), ref 1 below

“... it is not safe to assume that Microsoft Excel’s statistical procedures give the correct answer. Persons who wish to conduct statistical analyses should use some other package.”
- McCullough and Heiser (2008), ref 2 below

"If you need to perform analysis of variance, avoid using Excel, unless you are dealing with extremely simple problems."
- Statistical Services Centre, Univ. of Reading, U.K. (at A, below)

"Excel is of very limited use in the formal statistical analysis of data unless your experimental design is very simple. . . . the "Data Analysis Toolpack" provided with Excel is no easier to use than most statistics packages, has very limited capability, has known bugs and so, on the whole, is not worth bothering with. "
-Neil Cox, ref 7 below

"Enterprises should advise their scientists and professional statisticians not to use Microsoft Excel for substantive statistical analysis. Instead, enterprises should look for professional statistical analysis software certified to pass the (NIST) Statistical Reference Datasets tests to their users' required level of accuracy."

Problems have existed in Excel's statistical analysis from the earliest years, and most (if not all) have not been addressed.

In R: I don't know what you've named your variables, so I'll use these names.
MyNumericalData - this is the vector that contains the measured values
MyCategories - this is the variable that contains the names of the factors (note: it has to be the same length as MyNumericalData)

If you do this:

myfit<-lm(MyNumericalData~MyCategories)

and then do

anova(myfit)

you have your ANOVA table.

If you have the pdf manuals for R installed, look at
"An Introduction to R"
The section on Statistical Models in R, subsection Linear Models
 

Related to F-test and One-way ANOVA (in R)?

1. What is the purpose of an F-test and One-way ANOVA in R?

The F-test and One-way ANOVA are statistical tests used to compare the means of two or more groups. They are commonly used in scientific research to determine if there is a significant difference between the means of the groups being studied.

2. How do I perform an F-test and One-way ANOVA in R?

In R, the function "anova" is used to perform both the F-test and One-way ANOVA. The syntax for the F-test is "anova(model1, model2)", where model1 and model2 are the two models being compared. For the One-way ANOVA, the syntax is "anova(model)", where model is the model containing all the groups being compared.

3. What is the difference between an F-test and One-way ANOVA?

An F-test is used to compare two models, while One-way ANOVA is used to compare multiple groups within one model. An F-test is also more commonly used in linear regression, while One-way ANOVA is used in analysis of variance (ANOVA).

4. How do I interpret the results of an F-test and One-way ANOVA in R?

The results of an F-test and One-way ANOVA will include an F-statistic and a p-value. The F-statistic represents the ratio of between-group variation to within-group variation, and a higher value indicates a larger difference between the group means. The p-value indicates the probability of obtaining the observed results if the null hypothesis (that there is no difference between the group means) is true. A p-value less than 0.05 is considered statistically significant.

5. Can I perform post-hoc tests after conducting an F-test and One-way ANOVA in R?

Yes, post-hoc tests can be performed to determine which specific groups have significantly different means. In R, the "TukeyHSD" function can be used to conduct a post-hoc test after an ANOVA. It will provide a table of pairwise comparisons between all the groups and their corresponding p-values.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
927
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
30
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
6K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
Back
Top