Hot answers tagged anova
12
Consider that they can all be written as a regression equation (perhaps with slightly differing interpretations than their traditional forms).
Regression:
$$
Y=\beta_0 + \beta_1X_{\text{(continuous)}} + \varepsilon \\
\text{where }\varepsilon\sim\mathcal N(0, \sigma^2)
$$
t-test:
$$
Y=\beta_0 + \beta_1X_{\text{(dummy code)}} + \varepsilon \\
...
6
As you indicated in the comments, SS type I (aov()) vs. III (SPSS) is indeed one reason for the different results. The other reason is that your formula for aov() is incorrect, as the Error() term you used is the for two crossed within factors - whereas you have one between (group) and one within (phase) factor. Here's a reproducible example on how to ...
6
Because they can all be written as particular cases of the general linear model.
The t-test is a two-sample case of ANOVA.
An ANOVA model is basically a regression model where the factor levels are represented by dummy (or indicator) variables.
So if the model for a t-test is a subset of the ANOVA model and ANOVA is a subset of the multiple regression ...
5
I guess my comments have become so extensive that I should call them an answer.
If it's a situation where you want fixed effects, you can do it with a Poisson glm just as you can do ANOVA via lm. If you want a mixed model (glmm), you could use lme4 (such as the function glmer), though there are other suitable packages (see below).
If you do want a fixed ...
4
@JeremyMiles is right. First, there's a rule of thumb that the ANOVA is robust to heterogeneity of variance so long as the largest variance is not more than 4 times the smallest variance. Furthermore, the general effect of heterogeneity of variance is to make the ANOVA less efficient. That is, you would have lower power. Since you have a significant ...
3
If you do a bunch of tests, the chances of at least one Type I error (when the null hypothesis is true) will go up, sometimes dramatically.
A Bonferroni adjustment (as with most other multiple comparison procedures) is an attempt to hold the overall Type I error rate from the collection of pairwise comparisons to no more than a prespecified rate of Type I ...
3
I think that the easiest is to center your dependent variable around the grand mean. Given your example:
test$Satisfaction <- scale(test$Satisfaction, center=TRUE)
This way, the grand mean is now 0, and the mean for each ethnic group is the deviation from the grand mean. Then you run your regression as usual, but the four tests that you get are whether ...
3
First, the difference between significant and non-significant is not necessarily significant. So if after adding a covariate your interaction p-value changed from .04 to .06, this doesn't mean anything substantial other than you've bounced from one side of a binary .05 decision threshold.
However, the other possibility is that the covariate has ...
3
Nothing went wrong. The program did exactly what it was meant to do. It's because you only have a 2x2 factorial design in your example. Mauchly's test for sphericity compares variances of differences between levels of repeated measures factors. Another way of looking at it is the covariance matrix in the repeated measures design. If you have a 2x2 design, ...
2
You can use a Chi-Squared test to test for significant variation between seasons, under the assumption that we expect equal counts in each season. e.g. in R:
d = c(631,540,502,605)
chisq.test(matrix(c(d, rep(mean(d),4)), ncol=2))
Result:
Pearson's Chi-squared test
data: matrix(c(d, rep(mean(d), 4)), ncol = 2)
X-squared = 9.2602, df = 3, p-value = ...
2
The difference is not due to different "types of sum of squares" - these only matter in unbalanced factorial designs (see gung's answer).
Note that you need to call lm(data ~ factor(f1) * factor(2)) (aov()automatically converts the RHS of the formula to factors). Then note the denominator for the general $t$-statistic in linear regression (see this answer ...
2
You're on the right track--the next thing you need to do is plot your means. An interaction effect means that, for example, A has a different effect depending on what the level of B is. So if A is, mm, size of hammer (large or small) and B is size of mouse (large or small) and your measure is end state of mouse after being hit with hammer, one possible ...
2
The two approaches (t-test on “gain scores” and F-test for the interaction term in the ANOVA) give exactly the same result, as you can easily verify by running both on the same data set.
Whether this is sound is subject to some debate, other approaches (e.g. ANCOVA on T2 measurements, with group as independent variable and T1 measurements as covariate) ...
2
This is of course possible in SPSS in several procedures. As the most handy tool to visually explore importances of variables in separating this or that cluster I recommend you AIM command (available only through syntax). AIM appeared around SPSS version 13. An example:
cluster v1 v2
1 .2231 -.5798
1 -.1558 -.3753
...
2
If your data are balanced, the sum contrasts (see contr.sum under ?contrasts) are explicitly the differences you're asking about, so you may want to look at testing those.
More generally, one problem is that "the mean of all races" includes the present race you're comparing it to, so you lose independence, which can make things more complex.
However, note ...
2
Your interpretation of a low p-value is a very common one, but it is not quite correct. The phrase "is unlikely to be equal" has no meaning in a Frequentist context. Either all of the population means are equal, or they are not. To the extent that something like a statement of probability can be made in this situation, the correct statement would be ...
2
I will address your questions one-by-one:
Summary statistics are always useful, it's good to try to understand your data rather than rely merely on tests and p-values. Do report them, look at the data, use graphs and think hard about what it all means.
What you should do depends on your objectives (decision to go on with the treatment? publication? student ...
2
In addition to @Glen_b 's excellent answer (+1) I'd add
1) "Familywise" begs the question of what a family is. All the analyses in one paper? All the analyses on one data set? All the analyses related to one question? All the analyses you do in your life? What about analyses that other people do on the same data?
2) In addition, we default to "5%" and ...
2
This comes up frequently on the site. Odour has an effect, colour has an effect, and they interact. Therefore, the degree of odour's effect varies across colour. You know this now. Look at the means and describe the amount of effects.
Let's say that you checked the effect of odour for light red and it was significant but it wasn't for colourless. What ...
1
I think that your approach is correct. Model m1 specifies a separate intercept for each subject. Model m2 adds a separate slope for each subject. Your slope is across days as subjects only participate in one treatment group. If you write model m2 as follows it's more obvious that you model a separate intercept and slope for each subject
m2 <- lmer(Obs ~ ...
1
A simple way to analyze this data set would be to average response times in each condition across all blocks and trials, as you usually do. It is less than ideal and you will loose power but it would still provide a test of your hypothesis. Alternatively, you could focus only on the last block. You would be throwing away a lot of data but 50 trials should be ...
1
There is a great deal of disagreement over good statistical style here, and indeed most of elsewhere.
But this strikes me as a mishmash of quite different procedures.
No tests for differing variances will work as designed if you Winsorize the data first. Perhaps someone has worked on this -- you might find literature references with modified tests -- but ...
1
You can indeed subset the data frame doing something like
aov(d.ratings ~ grp*fdback*dur + Error(particip/(fdback*dur))+grp,
PDdonly[attrib == "ease",])
Typically however, different ratings would simply be regarded as separate variables, with the data frame formated accordingly. You could then specify your model with something like
aov(ease ~ ...
1
I don't know about Statistica, but this will work in any program.
Generate some random data of the correct sample size, once for each group.
Standardize it.
Multiply it by the standard deviation.
Add the mean.
Combine the groups.
Run your anova.
BUT: You say N=5, that makes me think you've got repeated measures. If that's the case, you don't have enough ...
1
Your data there works fine for me as soon as I put 'Block' in the model instead of 'Year'
Check the data reads in okay:
> summary(TWP)
Block Severity Plot Richness
2003-2004:6 High:9 A:6 Min. : 8.00
2005-2006:6 Low :9 B:6 1st Qu.:14.00
2007-2009:6 C:6 Median :18.50
Mean ...
1
What you presented here already looks very good to me. Using an appendix/supplementary material to provide more details is also generally a good way to proceed. It's a good idea to show the means and some index of variability but it seems you have that covered with the graph. One important thing missing is an explanation of what the error bars represent (SE, ...
1
F distributions have two degrees of freedom, one for the numerator and one for the denominator.
http://en.wikipedia.org/wiki/F-distribution#Definition
In an ANOVA calculation, the numerator df is the df for the thing your null hypothesis relates to, the denominator df are the degrees of freedom for the residual.
You appear to be testing whether the ...
1
I don't really understand what variance you are talking about, is it a variance of variables over one measure ? a variance of a variable over multiple measures ?
The more a variable has variance the more it contains information. Think about it in variation: if a variable has little variance it does not evolve much around its mean and then it won't be ...
1
(1) "The means of each group are normally distributed" - on what basis can you make such an assertion?
(2) your difference in variance sounds pretty small, and if sample sizes are nearly equal would cause little concern, as others have mentioned,
(3) Welch-type adjustments* for degrees of freedom exist for ANOVA just as with two-sample t-tests; and just ...
1
GLM Repeated Measures
If you have no missing data and everyone is measured at each of the 12 time points, then you could use Analyze - GLM - Repeated Measures. This allows you to include a between subjects factor and the 12 time points. Your data would need to be set out in wide format with one SPSS variable for group and 12 SPSS variables for the 12 time ...
Only top voted, non community-wiki answers of a minimum length are eligible