Displaying 20 results from an estimated 400 matches similar to: "How to mimic pdMat of lme under lmer?"
2012 Mar 09
0
pdMat class in LME to mimic SAS proc mixed group option? Group-specific random slopes
I would like to be able to use lme to fit random effect models In which some but not all of the random effects are constrained to be independent. It seems as thought the pdMat options in lme are a promising avenue. However, none of the existing pdMat classes seem to allow what I want.
As a specific example, I would like to fit a random intercept/slope mixed model to longitudinal observations in
2006 Apr 25
1
lme: how to compare random effects in two subsets of data
Dear R-gurus,
I have an interpretation problem regarding lme models.
I am currently working on dog locomotion, particularly on some variation
factors.
I try to figure out which limb out of 2 generated more dispersed data.
I record a value called Peak, around 20 times for each limb with a record.
I repeat the records during a single day, and on several days.
I tried to build two models, one
2003 Feb 13
1
fixed and random effects in lme
Hi All,
I would like to ask a question on fixed and random effecti in lme. I am
fiddlying around Mick Crawley dataset "rats" :
http://www.bio.ic.ac.uk/research/mjcraw/statcomp/data/
The advantage is that most work is already done in Crawley's book (page 361
onwards) so I can check what I am doing.
I am tryg to reproduce the nested analysis on page 368:
2003 Nov 25
1
using pdMAT in the lme function?
Hello. I want to specify a diagonal structure for the covariance matrix
of random effects in the lme() function.
Here is the call before I specify a diagonal structure:
> fit2<-lme(Ln.rgr~I(Ln.nar-log(0.0011)),data=meta.analysis,
+ random=~1+I(Ln.nar-log(0.0011)|STUDY.CODE,na.action=na.omit)
and this works fine. Now, I want to fix the covariance between the
between-groups slopes
2010 Dec 29
2
as.object: function doesn't exist but I wish it did
I seem to come to this problem alot, and I can find my way out of it with a
loop, but I wish, and wonder if there is a better way. Here's an example
(lmer1-5 are a series of lmer objects):
bs=data.frame(bic=BIC(lmer1,lmer2,lmer3,lmer4,lmer5)$BIC)
rownames(bs)=c('lmer1','lmer2','lmer3','lmer4','lmer5')
best=rownames(bs)[bs==min(bs)]
> best
[1]
2007 Jan 20
1
aov y lme
Dear R user,
I am trying to reproduce the results in Montgomery D.C (2001, chap 13,
example 13-1).
Briefly, there are three suppliers, four batches nested within suppliers
and three determinations of purity (response variable) on each batch. It is
a two stage nested design, where suppliers are fixed and batches are random.
y_ijk=mu+tau_i+beta_j(nested in tau_i)+epsilon_ijk
Here are the
2010 Apr 14
3
pdMat
Alguien tiene experiencia en escribir una pdMat. Para aquellos que no lo
recuerden son las matrices de covarianzas de los efectos aleatorios que
ajusta la función lme de la librería nlme
Estas matrices tiene especial importancia en aplicaciones de genética de
poblaciones y en particular en mapeo de asociación. Pinheiro y Bates dicen
que el usuario puede crear sus propias pdMat y sugiere como
2004 Jul 12
2
lme unequal random-effects variances varIdent pdMat Pinheiro Bates nlme
How does one implement a likelihood-ratio test, to test whether the
variances of the random effects differ between two groups of subjects?
Suppose your data consist of repeated measures on subjects belonging to
two groups, say boys and girls, and you are fitting a linear mixed-effects
model for the response as a function of time. The within-subject errors
(residuals) have the same variance in
2005 Jul 18
1
Nested ANOVA with a random nested factor (how to use the lme function?)
Hi,
I am having trouble using the lme function to perform a nested ANOVA
with a random nested factor.
My design is as follows:
Location (n=6) (Random)
Site nested within each Location (n=12) (2 Sites nested within each
Location) (Random)
Dependent variable: sp (species abundance)
By using the aov function I can generate a nested ANOVA, however this
assumes that my nested
2003 Jun 17
1
lme() vs aov(y ~ A*B + Error(aa %in% A + bb %in% B)) [repost]
I've posted the following to R-help on May 15.
It has reproducible R code for real data -- and a real
(academic, i.e unpaid) consultion background.
I'd be glad for some insight here, mainly not for myself.
In the mean time, we've learned that it is to be expected for
anova(*, "marginal") to be contrast dependent, but still are
glad for advice if you have experience.
Thank
2010 Sep 16
1
Help for an absolutely r-noob
Hello together,
I am an absolute noob in R and therefore I need help urgently. I have
received a script from my tutor with plot functions in it. However, I can'
manage to adapt these plots.
The hole script is as follows:
setwd("E:/")
##### (1) Read data ###
dat <- read.table("Komfort_Tatsaechliche_ID_Versuchsreihe_1.txt",
header=TRUE,
sep="\t",
2011 Feb 03
0
Need advises on mixed-effect model ( a concrete example)
Dear R-help members,
I'm trying to run LME model on some behavioral data and need
confirmations about what I'm doing...
Here's the story...
I have some behavioral reaction time (RT) data (participants have to
detect dome kind of auditory stimuli). the dependant variable is RT
measured in milliseconds. 61 participants were tested separated in 4 age
groups (unblanced groups,
2001 Dec 23
1
aov for mixed model (fixed and random)?
I'm starting to understand fixed and random effects, but I'm
puzzled a bit. Here is an example from Hays's textbook (which is
great at explaining fixed vs. random effects, at least to dummies
like me), from the section on mixed models. You need
library(nlme) in order to run it.
------
task <- gl(3,2,36) # Three tasks, a fixed effect.
subj <- gl(6,6,36) # Six subjects, a random
2008 Oct 15
2
Network meta-analysis, varConstPower in nlme
Dear Thomas Lumley, and R-help list members,
I have read your article "Network meta-analysis for indirect treatment
comparisons" (Statist Med, 2002) with great interest. I found it very
helpful that you included the R code to replicate your analysis;
however, I have had a problem replicating your example and wondered if
you are able to give me a hint. When I use the code from the
2009 May 20
1
Extracting correlation in a nlme model
Hi R users:
Is there a function to obtain the correlation within groups
from this very simple lme model?
> modeloMx1
Linear mixed-effects model fit by REML
Data: barrag
Log-restricted-likelihood: -70.92739
Fixed: fza_tension ~ 1
(Intercept)
90.86667
Random effects:
Formula: ~1 | molde
(Intercept) Residual
StdDev: 2.610052 2.412176
Number of Observations: 30
Number
2009 Apr 01
3
How to prevent inclusion of intercept in lme with interaction
Dear friends of lme,
After so many year with lme, I feel ashamed that I cannot get this to work.
Maybe it's a syntax problem, but possibly a lack of understanding.
We have growth curves of new dental bone that can well be modeled by a
linear growth curve, for two different treatments and several subjects as
random parameter. By definition, newbone is zero at t=0, so I tried to force
the
2012 Dec 29
1
AIC values with lmer and anova function
Dear colleagues,
I have a data from a repeated measures design that I'm analysing through a
mixed model. Nine independent sampling units (flasks with culture medium
with algae) were randomly divided into 3 groups ("c", "t1", "t2"). There is
no need for inclusion of the random effect of the intercept, because the
nine sample units are homogeneous among each other
2002 Dec 17
1
lme invocation
Hi Folks,
I'm trying to understand the model specification formalities
for 'lme', and the documentation is leaving me a bit confused.
Specifically, using the example dataset 'Orthodont' in the
'nlme' package, first I use the invocation given in the example
shown by "?lme":
> fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
Despite the
2007 May 24
4
Function to Sort and test AIC for mixed model lme?
Hi List
I'm running a series of mixed models using lme, and I wonder if there
is a way to sort them by AIC prior to testing using anova
(lme1,lme2,lme3,....lme7) other than by hand.
My current output looks like this.
anova
(lme.T97NULL.ml,lme.T97FULL.ml,lme.T97NOINT.ml,lme.T972way.ml,lme.T97fc.
ml, lme.T97ns.ml, lme.T97min.ml)
Model df AIC BIC logLik
2004 Sep 21
2
Bootstrap ICC estimate with nested data
I would appreciate some thoughts on using the bootstrap functions in the
library "bootstrap" to estimate confidence intervals of ICC values
calculated in lme.
In lme, the ICC is calculated as tau/(tau+sigma-squared). So, for instance
the ICC in the following example is 0.116:
> tmod<-lme(CINISMO~1,random=~1|IDGRUP,data=TDAT)
> VarCorr(tmod)
IDGRUP = pdLogChol(1)