# Anova random effects

The prior examples have assumed one line per unique subject/variable combination. This is not a typical way to enter data. A more typical way (found ., in Systat) is to have one row/subject. We need to "stack" the data to go from the standard input to the form preferred by the analysis of variance. Consider the following analyses of 27 subjects doing a memory study of the effect on recall of two presentation rates and two recall intervals. Each subject has two replications per condition. The first 8 columns are the raw data, the last 4 columns collapse across replications. The data are found in a file on the personality project server.

Hi Charles. Thanks again for such a great website!
I have run some experiments comparing 2 groups, control and treatment, monitoring an output for 5 days, thus I believe ANOVA with repeated measures is the right model to analyze my data. I then run an F-test for variance between subjects which turns out statistically significant, so that I do not have common variance. You state that ANOVA is pretty robust to reasonable violations of this assumption, but what it is “reasonable” in this case? What do you suggest to do in this case? I can run more experiments of course, but there is any other way to analyze the data?
You also use the same dataset for two factor multivariate Repeated Measures Analysis with Two Dependent Variables and conclude saying that in this model “All the tests show there is no significant difference between the mean hours of sleep for the three age groups. Interestingly enough this is the opposite conclusion from the univariate test” . My question is how do I choose which one is the most powerful analysis?
Ciao!

Charles;
first of all, I finally have access to the program, it was blocked and I unblocked it as per your instructions. Thanks
Now I have a question about ANOVA.
My experimental design has 3 factors:
Factor 1 (formulation): 2 levels
Factor 2 (Sequence): 2 levels
Factor 3 (Period): 4 levels
So I did 3 factor ANOVA
1. In the output, how does the program assign A, B, C to the factors?
2. There is no designation of which factor is between and which is within
3. It did not make a difference if the factors are numerical or categorical

A fixed effects model (in its most basic form) controls for any unmeasured variables that are constant over time but vary between individuals by explicitly including a separate intercept term for each individual ($\alpha_i$) in the regression equation. In our example, it will automatically control for confounding effects from gender, as well as any unmeasured confounders (marital status, socioeconomic status, educational attainment, etc…). In fact, gender cannot be included in the regression and $\beta_1$ cannot be estimated by a fixed effects model, since $gender_i$ is collinear with the $\alpha_i$'s.

## Anova random effects

A fixed effects model (in its most basic form) controls for any unmeasured variables that are constant over time but vary between individuals by explicitly including a separate intercept term for each individual ($\alpha_i$) in the regression equation. In our example, it will automatically control for confounding effects from gender, as well as any unmeasured confounders (marital status, socioeconomic status, educational attainment, etc…). In fact, gender cannot be included in the regression and $\beta_1$ cannot be estimated by a fixed effects model, since $gender_i$ is collinear with the $\alpha_i$'s.