[R] nlme Output
ONKELINX, Thierry
Thierry.ONKELINX at inbo.be
Tue Sep 7 10:44:12 CEST 2010
Dear Eward,
I notice that you use group_id both in the fixed effects as in the
random effects. Therefore you have no df for the group_id in the fixed
effects. So you have two options. Either you are interested in the group
effect and then you should switch to a simple lm(). Either you are not
interested in the group effect and then your model would look like this:
lme(AvgTrials ~ time, random = ~ time | group_id, data = tmp.dat, method
= "ML", na.action = na.omit)
However, since you have only 3 groups, the variance estimate of random
effects will not be reliable at all. Hence switching to lm() is IMHO the
best option with your design.
HTH,
Thierry
------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium
Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx op inbo.be
www.inbo.be
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data.
~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey
________________________________
Van: Edward Patzelt [mailto:patze003 op umn.edu]
Verzonden: dinsdag 7 september 2010 0:25
Aan: ONKELINX, Thierry
CC: r-help op r-project.org
Onderwerp: Re: [R] nlme Output
The design is a repeated measures with 3 instances. There are 3
groups: Controls, Heavy Cocaine Users, Light Cocaine Users.
I reshaped the data so that there was one variable for the 3
instances called AvgTrials. Time is the indicator of each instance.
Here is the model call:
mod5 <- lme(AvgTrials ~ time + factor(group_id) +
time*factor(group_id), random = ~ 1 | group_id, data = tmp.dat, method =
"ML", na.action = na.omit)
What else would you need here?
-Edward
On Mon, Sep 6, 2010 at 8:52 AM, ONKELINX, Thierry
<Thierry.ONKELINX op inbo.be> wrote:
Dear Edward,
You have no degrees of freedom left to estimate those
p-values. Your
design does not allows for the model your implemented.
We need a brief
summary of your design in order to help you further.
HTH,
Thierry
------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen
Belgium
Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx op inbo.be
www.inbo.be
To call in the statistician after the experiment is done
may be no more
than asking him to perform a post-mortem examination: he
may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data.
~ Roger Brinner
The combination of some data and an aching desire for an
answer does not
ensure that a reasonable answer can be extracted from a
given body of
data.
~ John Tukey
> -----Oorspronkelijk bericht-----
> Van: r-help-bounces op r-project.org
> [mailto:r-help-bounces op r-project.org] Namens Edward
Patzelt
> Verzonden: maandag 6 september 2010 15:43
> Aan: r-help op r-project.org
> Onderwerp: [R] nlme Output
>
> Everyone -
>
> What do the NaN's mean here? Is this analysis a
problem?
>
>
> Linear mixed-effects model fit by maximum likelihood
> Data: tmp.dat
> AIC BIC logLik
> 1611.251 1638.363 -797.6253
>
> Random effects:
> Formula: ~1 | group_id
> (Intercept) Residual
> StdDev: 0.0003077668 9.236715
>
> Fixed effects: AvgTrials ~ time + factor(group_id) +
time *
> factor(group_id)
> Value Std.Error DF
t-value p-value
> (Intercept) 18.159722 3.576664 213
5.077279 0.0000
> time 4.192708 1.655674 213
2.532327 0.0121
> factor(group_id)2 -6.929563 5.235700 0
-1.323522 NaN
> factor(group_id)3 -1.654554 4.189575 0
-0.394922 NaN
> time:factor(group_id)2 1.729911 2.423658 213
0.713760 0.4762
> time:factor(group_id)3 -2.555111 1.939396 213
-1.317478 0.1891
> Correlation:
> (Intr) time fc(_)2 fc(_)3
t:(_)2
> time -0.926
> factor(group_id)2 -0.683 0.632
> factor(group_id)3 -0.854 0.790 0.583
> time:factor(group_id)2 0.632 -0.683 -0.926 -0.540
> time:factor(group_id)3 0.790 -0.854 -0.540 -0.926
0.583
>
> Standardized Within-Group Residuals:
> Min Q1 Med Q3 Max
> -1.8842754 -0.6979785 -0.3370998 0.5666704 3.0943948
>
> Number of Observations: 219
> Number of Groups: 3
> Warning message:
> In pt(q, df, lower.tail, log.p) : NaNs produced
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help op r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
reproducible code.
>
Druk dit bericht a.u.b. niet onnodig af.
Please do not print this message unnecessarily.
Dit bericht en eventuele bijlagen geven enkel de visie
van de schrijver weer
en binden het INBO onder geen enkel beding, zolang dit
bericht niet bevestigd is
door een geldig ondertekend document. The views
expressed in this message
and any annex are purely those of the writer and may not
be regarded as stating
an official position of INBO, as long as the message is
not confirmed by a duly
signed document.
--
Edward H. Patzelt
Research Assistant - TRiCAM Lab
University of Minnesota - Psychology/Psychiatry
VA Medical Center
Office: N437 Elliot Hall - Twin Cities Campus
Phone: 612-624-3892 Email: patze003 op umn.edu
Please consider the environment before printing this email
www.psych.umn.edu/research/tricam
Druk dit bericht a.u.b. niet onnodig af.
Please do not print this message unnecessarily.
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in this message
and any annex are purely those of the writer and may not be regarded as stating
an official position of INBO, as long as the message is not confirmed by a duly
signed document.
More information about the R-help
mailing list