I have a data set in which I want to do a generalized linear model with repeated 
measures.  A sample of my data is below.  I'm not sure which is the correct way 
to do repeated measures in R.  These are the two ways that I have it.
 
study.lm<-lmer(error~true_percentage + Distance + Angle +(1|Subject), 
data=study)
summary(study.lm)
 
                                     
study.aov<- aov(log.error ~ factor(true_percentage)* factor(Distance)* 
factor(Angle) + Error(1|Subject),data=study)
summary(study.aov)
 
In the aov do I need to factor the variables?  What is the meaning of 
(1|Subject) is it telling R that each subject did all combinations of the 
trials.  Is it reading all of subject 1 trials, then all of subject 2 trials, 
etc ?
 
 
Each subject did 60 trials and each and I have 10 subjects.  The independent 
variables are true percentages (5), distance (3), and angle (4).  The predictor 
variable is error. 
 
Thank you in Advance     
 
 
Subject true_percentage Distance Angle     error 
1 60 25 180 3.33985 
1 45 35 45 4.912889 
1 45 35 70 4.651052 
1 30 35 180 4.330917 
1 15 45 25 5.134426 
1 30 35 45 4.330917 
1 45 35 180 4.651052 
1 45 45 25 2.357552 
2 60 25 180 4.330917 
2 45 35 45 4.912889 
2 45 35 70 3.918863 
2 30 35 180 4.330917 
2 15 45 25 5.326429 
2 30 35 45 3.918863 
2 45 35 180 4.098032 
2 45 45 25 4.179909 
2 30 25 25 3.33985 



      
	[[alternative HTML version deleted]]


