[R-sig-ME] Mixed models and learning curves
Seth W. Bigelow
seth at swbigelow.net
Fri Nov 23 14:08:24 CET 2012
Giovanna:
your description suggests your dataset consists of 30 observations (5
students X 6 replications), but the degrees of freedom in your model output,
> 100, would seem to indicate that you are incorporating individual log
cycle times in your analysis...
As Douglas Bates said, with 1-2 students per 'previous experience' class, it
may be difficult to make a mixed-effects model. You may want to consider
doing a simple linear regression on each student (sum of logs' cycle time
vs. replication, and compare the confidence intervals around the slopes of
individual students' performance to make some inference about the effects of
previous experience.
In theory, you could try fitting non-linear models to individual students'
performance to see if there was, e.g., exponential learning curve happening.
But with 6 replications you would probably be unable to demonstrate that a
non-linear model is an improvement over a linear one (e.g., with AIC).
Since you have recorded yarding times for individual logs, you may also want
to consider comparing the within-replication variance among students. I
would expect that variance would be much smaller for the trainer than for
the students with little previous experience (I can't advise on how to do
this, however).
Finally, are you using R graphics capability (lattice, ggplot2) to view your
data? For example:
Library(lattice)
xyplot(prod.time~Trial, data=YardingData, groups=Student, auto.key=TRUE)
Best,
Seth W. Bigelow, Ph.D.
Forest Ecologist
Landgrove VT USA
-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org
[mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of Giovanna
Ottaviani
Sent: Thursday, November 22, 2012 2:55 PM
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] Mixed models and learning curves
My name is Giovanna and I am a PhD student in Norway.
I am a beginner with statistics and R, hence my ignorance. Apologies from
now.....
I have been collecting data on time performances of 5 subjects using a 1:3
scale tower yarder. The task was consisting in yarding 5 small logs placed
on permanently marked course. Four subjects had different previous
experiences (None, Some) and the fifth was a trainer (Control).
Each cycle time per each log was registered, the sum of the 5 logs' cycle
time was giving the replication time. We had 6 replication per subject .
I would like to predict the time necessary to perform the task.
I have been modelling the time to perform the task (prod.time)versus the
replication number (Trial-in the dataset), the previous experience (factor)
and their interaction. As random effect I have been using the subjects.
> ma<-lme(prod.time~Trial+Previous.experience+Trial*Previous.experience,
data= Data27_04, random=~1|Student, method="ML")
> summary(ma)
Linear mixed-effects model fit by maximum likelihood
Data: Data27_04
AIC BIC logLik
1517.445 1541.259 -750.7226
Random effects:
Formula: ~1 | Student
(Intercept) Residual
StdDev: 7.337648 42.42332
Fixed effects: prod.time ~ Trial + Previous.experience + Trial *
Previous.experience
Value Std.Error DF t-value p-value
(Intercept) 102.44173 9.561987 137 10.713435 0.0000
Trial -6.48494 2.252271 137 -2.879291 0.0046
Previous.experience1 -37.36173 14.786033 2 -2.526826 0.1274
Previous.experience2 47.22627 12.451072 2 3.792948 0.0630
Trial:Previous.experience1 6.55351 3.496401 137 1.874360 0.0630
Trial:Previous.experience2 -7.55163 2.940879 137 -2.567813 0.0113
Correlation:
(Intr) Trial Prvs.1 Prvs.2 Tr:P.1
Trial -0.841
Previous.experience1 0.253 -0.208
Previous.experience2 -0.234 0.199 -0.540
Trial:Previous.experience1 -0.207 0.264 -0.835 0.447
Trial:Previous.experience2 0.199 -0.226 0.447 -0.836 -0.550
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.3519731 -0.6903211 -0.1031114 0.6503216 4.6699702
Number of Observations: 145
Number of Groups: 5
>
Do you think this is good enough to demonstrate a learning effect.
Learning curves are exponential. I have been trying to log transform the
response variable but then p-values are saying that previous experience has
no significance.
> mb<-lme(log.prodtime~Trial+Previous.experience+Trial*Previous.experience,
data= Data27_04, random=~1|Student, method="ML")
> summary(mb)
Linear mixed-effects model fit by maximum likelihood
Data: Data27_04
AIC BIC logLik
225.1042 248.9181 -104.5521
Random effects:
Formula: ~1 | Student
(Intercept) Residual
StdDev: 0.04484554 0.495812
Fixed effects: log.prodtime ~ Trial + Previous.experience + Trial *
Previous.experience
Value Std.Error DF t-value p-value
(Intercept) 4.448206 0.10593072 137 41.99165 0.0000
Trial -0.060150 0.02629765 137 -2.28726 0.0237
Previous.experience1 -0.333664 0.16351518 2 -2.04057 0.1781
Previous.experience2 0.368358 0.13776525 2 2.67381 0.1160
Trial:Previous.experience1 0.051714 0.04084708 137 1.26604 0.2076
Trial:Previous.experience2 -0.043036 0.03435150 137 -1.25282 0.2124
Correlation:
(Intr) Trial Prvs.1 Prvs.2 Tr:P.1
Trial -0.886
Previous.experience1 0.248 -0.221
Previous.experience2 -0.237 0.209 -0.535
Trial:Previous.experience1 -0.220 0.266 -0.881 0.473
Trial:Previous.experience2 0.208 -0.225 0.474 -0.883 -0.551
Standardized Within-Group Residuals:
Min Q1 Med Q3 Max
-2.7119095 -0.8005032 0.1127388 0.8621127 2.1988560
Number of Observations: 145
Number of Groups: 5
>
The model is surely better (AIC, BIC) also the residuals are looking better
but then should I reduce the model leaving only the Trial number?
How would you present the results in a clear way? I am still struggling to
figure it out. The concept of mixed models is clear in my head but it is
hard to present it.
How should I then plot the learning curve?
I have been plotting the data I have adding a smooth line. Is this good
enough?
Looking forward for your response
Best regards
Giovanna
Giovanna Ottaviani Aalmo
Stipendiat/Ph..D. Student
-------------------------------------------
Norsk institutt for skog og landskap
Pb 115, NO-1431 Es
T (+47) 64 94 9094
M(+47) 980 30 422
F(+47) 64 94 90 80
-------------------------------------------
www.skogoglandskap.no<http://www.skogoglandskap.no/>
-------------------------------------------
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list