To whom it may concern:
I am new to R and my knowledge is very basic. 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 have these measures for each of my subjects. Each subject did 60
trials each and I have 10 subjects. The independent variables are true
percentages (5), distance (3), and angle (4). The predictor variable is log
error. The goal is to see what impact the independent variables have on
judgment error (log error). Also to see if subjects are getting better or worse
at judgment over time. I wanted to know if I have the write set up to do this
in R.
Thank you in Advance
##Repeated Measures Model##
require(lme4)
pilotstudy.glm<-glmer(log.error~true_percentage + Distance + Angle +(1|Subject),
data=pilotstudy)
summary(pilotstudy.glm)
anova(pilotstudy.glm)
Subject true_percentage Distance Angle log 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]]