Questions tagged [anova]

ANOVA is an acronym for "analysis of variance". It is a widely used statistical technique to analyze the source of variance within a data set.

Overview

Although ANOVA stands for ANalysis Of VAriance, it is about comparing means of data from different groups. It is part of the general linear model which also includes linear regression and ANCOVA. In matrix algebra form, all three are:

Y=XB+e

Where Y is a vector of values for the dependent variable (these must be numeric), X is a matrix of values for the independent variables and e is error.

Tag usage

  • SO questions on ANOVA should be about implementation and programming problems, not about the statistical or theoretical properties of the technique.

  • Consider whether your question might be better suited to CrossValidated, the StackExchange site for statistics, machine learning and data analysis.

In scientific software for statistical computing and graphics, function aov implements ANOVA. Note that function anova does something else. See When should I use aov() and when anova()?

1456 questions
0
votes
1 answer

Odd phenomenon: In aov() objects created inside a loop, the data frames of the different aov objects are identical

I was running aov() inside a loop. The output of each iteration was saved as an list item. When I used model.frame() to check the data frame of each aov object, all of them were identical - in fact, all of them were basically the data frame of the…
Alex
  • 4,030
  • 8
  • 40
  • 62
0
votes
1 answer

MANOVA - huge matrices

First, sorry by the tag as "ANOVA", it is about MANOVA (yet to become a tag...) From the tutorials I found, all the examples use small matrices, following them would not be feasible for the case of big ones as it is the case of many studies. I got…
0
votes
1 answer

anova output blank when run on lmer model

I'm trying to run an anova model using the lme4 library. I don't have any real data, so I just yanked the Cars93 data from MASS. While I could get lmer(...) to work, I can't seem to get the anova table to print. Here's what happened: >…
Connor_84
  • 1
  • 2
0
votes
1 answer

Extracting data from an ANOVA object that is based on the data in R

I am trying to find a less convoluted way to extract data from an aov object. Suppose I have a dataset a as shown below, and I ran an ANOVA based on the data, resulting in an object named a.model. I tried to locate the data by using str(a.model),…
Alex
  • 4,030
  • 8
  • 40
  • 62
0
votes
1 answer

R: lm() with factors. Don't understand how ANOVA table calculates "Sum Sq"

I'm learning R and trying to understand how lm() handles factor variables & how to make sense of the ANOVA table. I'm fairly new to statistics, so please be gentle with me. Here's some movie data from Rotten Tomatoes. I'm trying to model the score…
user7661
  • 57
  • 6
0
votes
2 answers

Test for significance in a time series using R

Given a simplified example time series looking at a population by year Year<-c(2001,2002,2003,2004,2005,2006) Pop<-c(1,4,7,9,20,21) DF<-data.frame(Year,Pop) What is the best method to test for significance in terms of change between years/ which…
Vinterwoo
  • 3,843
  • 6
  • 36
  • 55
0
votes
1 answer

Adjusted predictions running ANOVA in Stata

I have an outcome variable x and three explanatory variables a, b, c which are categorical variables. In my example a has 8 levels, b has 4 levels and c has 35 levels, but not all combinations of the three variables has observations (this is…
Stefan Hansen
  • 499
  • 1
  • 3
  • 16
0
votes
1 answer

N-way ANOVA in R

I need some help in performing N-way ANOVA in R to capture inter dependencies among different factors. In my data, there are around 100 different factors and I am using the following code to perform ANOVA. model.lm<-lm(y~.,…
Shahzad
  • 1,999
  • 6
  • 35
  • 44
0
votes
1 answer

Two way ANOVA in R - added term doesn't appear in summary table

I am dealing with a dataset that involves 9 different genotypes, arranged into 3 different classes. About 20 size measurements from each genotype have been recorded. I tried running a two-way anova (after a one-way anova established that size…
0
votes
1 answer

very simple anova model - compare variables with factors vs different vectors

I think my question is best understood with a little code: #Load data b <- structure(list(s1 = c(18.5, 24, 17.2, 19.9, 18), s2 = c(26.3, 25.3, 24, 21.2, 24.5), s3 = c(20.6, 25.2, 20.8, 24.7, 22.9), s4 = c(25.5, 19.9, 22.6, 17.5, 20.4)),…
Andreas
  • 6,612
  • 14
  • 59
  • 69
0
votes
1 answer

R can't find function pure.error.anova

I am trying to create an ANOVA table with pure errors and lack-of-fit errors, but R gives me the following message when I try to use the function pure.error.anova: Error: could not find function pure.error.anova Why isn't this function being found?
user1691605
  • 1
  • 1
  • 1
0
votes
1 answer

Anova Type 2 and Contrasts

the study design of the data I have to analyse is simple. There is 1 control group (CTRL) and 2 different treatment groups (TREAT_1 and TREAT_2). The data also includes 2 covariates COV1 and COV2. I have been asked to check if there is a linear or…
0
votes
1 answer

How to do a MANOVA (statistics) from within java?

I need to do a program that runs a MANOVA analysis. The best would be to run the analysis from within java, but if it's imposible it can call R or Stata, or some statistics software that runs a MANOVA and then exports the results to java again. I'd…
juancamilo87
  • 629
  • 8
  • 13
0
votes
1 answer

How to do Tukey's HSD post-hoc test after 1-way RM ANOVA in SAS?

I run the following lines: DATA abc; INPUT AA BB CC DD EE; CARDS; ... ; RUN; PROC GLM DATA = abc; MODEL AA BB CC DD EE = / NOUNI; REPEATED conditions 5 (1 2 3 4 5) / PRINTE; MEANS / TUKEY ALPHA = 0.05; RUN; But the MEANS…
abc
  • 167
  • 1
  • 4
  • 18
-1
votes
2 answers

Issue with Anova in R

This is a picture of my column names in a value and then the anova that I have set up for it that works I want to make a be able to switch out each column name in my anova in a loop so I don't have to rewrite the code and just change the column…