[R-sig-ME] estimating AR1 parameters of level one error
Steve Candy
burwood70 at gmail.com
Fri May 22 02:54:38 CEST 2015
Thanks Wolfgang
Yes I agree its possible and I have fitted such a model using random
subject-splines. I found numerical instability but this may not be the case
with other applications. So my statement "not sensible" is not justifiable.
I should have said "can be problematic". The marginal covariance is much
more complex and harder to describe graphically than the random intercepts
plus AR(1) error model which I have used extensively and combined with the
log-transform of the response to allow for "splaying-out" of curves in time
or adding extra variance parameters to model that or other types of variance
heterogeneity. I have found this type of model more stable in practice.
Thanks for correcting me.
Regards
Steve
>It is certainly possible to have a model with random intercepts and slopes
(for time) and also AR(1) correlated residuals over time within individuals.
The random slopes model differences in the trend between individuals, while
>the AR(1) structure models how the residuals are fluctuating around the
person-specific slopes within individuals. Of course, you need to have a
sufficient number of follow-up measurements within individuals to
distinguish >those two elements. But this is certainly possible. And in
fact, ignoring serial correlation in the residuals when it is present could
lead to inflated Type I error rates for the mean trend effect.
>Best,
>Wolfgang
-----Original Message-----
From: R-sig-mixed-models [mailto:r-sig-mixed-models-bounces at r-project.org]
On Behalf Of r-sig-mixed-models-request at r-project.org
Sent: Thursday, 21 May 2015 8:00 PM
To: r-sig-mixed-models at r-project.org
Subject: R-sig-mixed-models Digest, Vol 101, Issue 27
Send R-sig-mixed-models mailing list submissions to
r-sig-mixed-models at r-project.org
To subscribe or unsubscribe via the World Wide Web, visit
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
or, via email, send a message with subject or body 'help' to
r-sig-mixed-models-request at r-project.org
You can reach the person managing the list at
r-sig-mixed-models-owner at r-project.org
When replying, please edit your Subject line so it is more specific than
"Re: Contents of R-sig-mixed-models digest..."
Today's Topics:
1. Re: : estimating AR1 parameters of level one error using lme
(Steve Candy)
2. Re: : estimating AR1 parameters of level one error using lme
(Viechtbauer Wolfgang (STAT))
3. MCMCglmm phylogenetic model with polymorphic binary outcome
(Alberto Gallano)
----------------------------------------------------------------------
Message: 1
Date: Wed, 20 May 2015 21:13:37 +1000
From: "Steve Candy" <burwood70 at gmail.com>
To: <r-sig-mixed-models at r-project.org>
Subject: Re: [R-sig-ME] : estimating AR1 parameters of level one error
using lme
Message-ID: <006001d092ee$07dcb180$17961480$@gmail.com>
Content-Type: text/plain; charset="us-ascii"
I question whether this model of dependency between residuals in repeated
measures analysis is sensible
> > /RANDOM=INTERCEPT Time | SUBJECT(Subject)
corresponds to a random coefficients approach which implies a correlation
between time points within subjects which varies with time (also called "the
growth curve model" cf: Diggle et al 2002 pg 98-99) while
> > /REPEATED=Time | SUBJECT(Subject)COVTYPE(AR1)
also implies a correlation between time points within subjects which varies
with time (if the Phi1 is positive it implies a positive serial correlation
exponentially decaying to zero as the time lag increases).
Therefore these two error models compete with each other in explaining
correlation that varies with time which is very messy (i.e. what does the
theoretical semivariogram look like?) and possibly over-parameterised.
However, it makes sense to combine random intercepts with an AR1 process
(Diggle et al. 2002, Section 5.2.3, Figure 5.4)
> > /RANDOM=INTERCEPT | SUBJECT(Subject)
> > /REPEATED=Time | SUBJECT(Subject)COVTYPE(AR1).
My understanding is that the above SPSS error model is the same as the lme
error model below
> lme(
> fixed=conc~Time,
> random=~1|Subject,
> method="REML",
> data=fGlucose,
> na.action="na.omit",
> correlation=corAR1(form=~Time|Subject))
*Diggle, D. J., P. J. Heagerty, K. Y. Liang, and S. L. Zeger. 2002. Analysis
of Longitudinal Data. . Oxford University Press, Oxford, England.
Dr Steven G. Candy
Director/Consultant
SCANDY STATISTICAL MODELLING PTY LTD
(ABN: 83 601 268 419)
70 Burwood Drive
Blackmans Bay, TASMANIA, Australia 7052
Mobile: (61) 0439284983
------------------------------
Message: 2
Date: Wed, 20 May 2015 14:10:53 +0200
From: "Viechtbauer Wolfgang (STAT)"
<wolfgang.viechtbauer at maastrichtuniversity.nl>
To: "r-sig-mixed-models at r-project.org"
<r-sig-mixed-models at r-project.org>
Subject: Re: [R-sig-ME] : estimating AR1 parameters of level one error
using lme
Message-ID:
<077E31A57DA26E46AB0D493C9966AC730F0CA05B86 at UM-MAIL4112.unimaas.nl>
Content-Type: text/plain; charset="us-ascii"
It is certainly possible to have a model with random intercepts and slopes
(for time) and also AR(1) correlated residuals over time within individuals.
The random slopes model differences in the trend between individuals, while
the AR(1) structure models how the residuals are fluctuating around the
person-specific slopes within individuals. Of course, you need to have a
sufficient number of follow-up measurements within individuals to
distinguish those two elements. But this is certainly possible. And in fact,
ignoring serial correlation in the residuals when it is present could lead
to inflated Type I error rates for the mean trend effect.
Best,
Wolfgang
> -----Original Message-----
> From: R-sig-mixed-models [mailto:r-sig-mixed-models-bounces at r-
> project.org] On Behalf Of Steve Candy
> Sent: Wednesday, May 20, 2015 13:14
> To: r-sig-mixed-models at r-project.org
> Subject: Re: [R-sig-ME] : estimating AR1 parameters of level one error
> using lme
>
> I question whether this model of dependency between residuals in
> repeated measures analysis is sensible
>
> > > /RANDOM=INTERCEPT Time | SUBJECT(Subject)
>
> corresponds to a random coefficients approach which implies a
> correlation between time points within subjects which varies with time
> (also called "the growth curve model" cf: Diggle et al 2002 pg 98-99)
> while
>
> > > /REPEATED=Time | SUBJECT(Subject)COVTYPE(AR1)
>
> also implies a correlation between time points within subjects which
> varies with time (if the Phi1 is positive it implies a positive serial
> correlation exponentially decaying to zero as the time lag increases).
>
> Therefore these two error models compete with each other in explaining
> correlation that varies with time which is very messy (i.e. what does
> the theoretical semivariogram look like?) and possibly
over-parameterised.
>
> However, it makes sense to combine random intercepts with an AR1
> process (Diggle et al. 2002, Section 5.2.3, Figure 5.4)
>
> > > /RANDOM=INTERCEPT | SUBJECT(Subject)
> > > /REPEATED=Time | SUBJECT(Subject)COVTYPE(AR1).
>
> My understanding is that the above SPSS error model is the same as the
> lme error model below
>
> > lme(
> > fixed=conc~Time,
> > random=~1|Subject,
> > method="REML",
> > data=fGlucose,
> > na.action="na.omit",
> > correlation=corAR1(form=~Time|Subject))
>
> *Diggle, D. J., P. J. Heagerty, K. Y. Liang, and S. L. Zeger. 2002.
> Analysis
> of Longitudinal Data. . Oxford University Press, Oxford, England.
>
> Dr Steven G. Candy
> Director/Consultant
> SCANDY STATISTICAL MODELLING PTY LTD
> (ABN: 83 601 268 419)
> 70 Burwood Drive
> Blackmans Bay, TASMANIA, Australia 7052
> Mobile: (61) 0439284983
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
------------------------------
Message: 3
Date: Sun, 17 May 2015 22:43:57 -0400
From: Alberto Gallano <alberto.gc8 at gmail.com>
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] MCMCglmm phylogenetic model with polymorphic
binary outcome
Message-ID:
<CAO+b4j8uh04nPGkCHh=7nm-ty4tsHNx9LjjhW-2iVp8Sc+h+xA at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
I'm using MCMCglmm to construct phylogenetic mixed models with binary
outcomes (see code below). I have 106 species and between n=3 and n=110
individuals per species. My predictor variable (ratio of incisor size to
molar size) is split, using the van der Pol and Wright (2009) method, into
species-mean and within-species terms. I have several "binary.outcome"
variables. Some of these outcome variables are at the species level (i.e.,
all individuals within a species have the same outcome), while others
exhibit polymorphism (i.e., individuals within a species have different
outcomes).
My question is, is the model specification below appropriate for both
species-specific outcomes and those that vary within species? If not, what
would be appropriate for these two types of binary outcome? I'm ultimately
concerned with interpreting the between species slope of my predictor
variable.
prior1 <- list(
B = list(mu = rep(0, 3), V = diag(3) * (1 + pi^2/3)),
G = list(G1 = list(V = 1, nu = 1, alpha.mu = 0, alpha.V = 1000),
G2 = list(V = 1, nu = 1, alpha.mu = 0, alpha.V = 1000)),
R = list(V = 1, fix = 1)
)
inv_phylo_mat <- inverseA(tree, nodes = "TIPS", scale = TRUE)
set.seed(1234)
fit <- MCMCglmm(
fixed = binary.outcome ~ I2.M1.species.mean + I2.M1.within.species,
random = ~ phylo + species,
rcov = ~ units,
data = incisor.dat,
family = "categorical",
ginverse = list(phylo = inv_phylo_mat$Ainv),
prior = prior1,
pr = TRUE,
pl = TRUE,
nitt = 1.1e+7, thin = 2000, burnin = 1e+5,
verbose = FALSE,
slice = TRUE
)
best,
Alberto
[[alternative HTML version deleted]]
------------------------------
Subject: Digest Footer
_______________________________________________
R-sig-mixed-models mailing list
R-sig-mixed-models at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
------------------------------
End of R-sig-mixed-models Digest, Vol 101, Issue 27
More information about the R-sig-mixed-models
mailing list