Displaying 20 results from an estimated 10000 matches similar to: "Possible bug in lmer nested analysis with factors"
2006 Aug 30
1
lmer applied to a wellknown (?) example
Dear all,
During my pre-R era I tried (yes, tried) to understand mixed models by
working through the 'rat example' in Sokal and Rohlfs Biometry (2000)
3ed p 288-292. The same example was later used by Crawley (2002) in his
Statistical Computing p 363-373 and I have seen the same data being used
elsewhere in the litterature.
Because this example is so thoroughly described, I thought
2006 Apr 22
1
Partially crossed and nested random factors in lme/lmer
Hi all,
I am not a very proficient R-user yet, so I hope I am not wasting people?s
time. I want to run a linear mixed model with 3 random factors (A, B, C)
where A and B are partially crossed and C is nested within B. I understand
that this is not easily possible using lme but it might be using lmer. I
encountered two problems when trying:
Firstly, I can enter two random factors in lmer but
2006 Oct 20
1
Translating lme code into lmer was: Mixed effect model in R
This question comes up periodically, probably enough to give it a proper
thread and maybe point to this thread for reference (similar to the
'conservative anova' thread not too long ago).
Moving from lme syntax, which is the function found in the nlme package,
to lmer syntax (found in lme4) is not too difficult. It is probably
useful to first explain what the differences are between the
2006 Apr 13
3
Penalized Splines as BLUPs using lmer?
Dear R-list,
I?m trying to use the lmer of the lme4 package to fit a linear mixed model
of the form
Y = Xb + Zu + e
and I can?t figure out how to control the covariance structure of u. I want
u ~ N(0,sigma^2*I).
More precisely I?m trying to smooth a curve through data using the
"Penalized Splines as BLUPs" method as described in Ruppert, Wand &
Carroll (2003).
So I have Z = [Z1
2006 May 06
2
How to test for significance of random effects?
Dear list members,
I'm interested in showing that within-group statistical dependence is
negligible, so I can use ordinary linear models without including random
effects. However, I can find no mention of testing a model with vs.
without random effects in either Venable & Ripley (2002) or Pinheiro and
Bates (2000). Our in-house statisticians are not familiar with this,
either,
2005 Sep 08
1
FW: Re: Doubt about nested aov output
Your response nicely clarifies a question that I've had for a long time,
but which I've dealt
with by giving each subject a unique label. Unless I'm missing something,
both techniques should
work as the toy example below gives exactly the same output in all 3 cases
below (forgetting
about the convergence problem). Would there be a reason to prefer
labeling the levels
one way or
2006 May 03
1
qu: predict with lmer (lme4) or other ways to get classification accuracy
Hi,
I am using lmer (from the package lme4) to predict a binary response
variable (REL) from a bunch of fixed effects and two random effects
(Speaker_ID and NPhead_lemma):
fit <- lmer(REL ~
SPEAKER_GENDER +
log(SPEECHRATE) +
SQSPEECHRATE +
.....
+ (1|Speaker_ID) + (1|NPhead_lemma),
family="binomial",
data=data.lmer,
method="Laplace", model=T, x=T)
I
2006 Jul 25
1
how to fit with "lme" function
Hi everone,
I have a question on using lme on a mixed effects model.
The linear mixed model is in the form of:
y = bX +Zu + e
where "X" and "Z" are the matrices, "b" is the coefficient vector of fixed
effects, "u" is the coefficient vector of random effects, and e is an error
vector.
I would like to use "lme" function to fit the model and
2006 Jul 28
3
random effects with lmer() and lme(), three random factors
Hi, all,
I have a question about random effects model. I am dealing with a
three-factor experiment dataset. The response variable y is modeled
against three factors: Samples, Operators, and Runs. The experimental
design is as follow:
4 samples were randomly chosen from a large pool of test samples. Each
of the 4 samples was analyzed by 4 operators, randomly selected from a
group of
2006 Nov 28
3
Predicted values in lmer modeling
Dear All,
I am working with linear mixed-effects models using the lme4 package in
R. I created a model with the lmer function including some main effects,
a two-way interaction and a random effect. Now I am searching for a way
to save the predicted values for this model.
As far as I can see, there is no command in lme4 to save the predicted
values (like the predict(model) function in e.g.
2008 Sep 14
2
Help please! How to code a mixed-model with 2 within-subject factors using lme or lmer?
Hello,
I'm using aov() to analyse changes in brain volume between males and
females. For every subject (there are 331 in total) I have 8 volume
measurements (4 different brain lobes and 2 different tissues
(grey/white matter)). The data looks like this:
Subject Sex Lobe Tissue Volume
subect1 1 F g 262374
subect1 1 F w 173758
subect1 1 O g 67155
subect1 1 O w 30067
subect1 1 P g 117981
2006 Oct 24
1
Variance Component/ICC Confidence Intervals via Bootstrap or Jackknife
I'm using the lme function in nmle to estimate the variance components
of a fully nested two-level model:
Y_ijk = mu + a_i + b_j(i) + e_k(j(i))
lme computes estimates of the variances for a, b, and e, call them v_a,
v_b, and v_e, and I can use the intervals function to get confidence
intervals. My understanding is that these intervals are probably not
that robust plus I need intervals on the
2006 Mar 29
1
lmer multilevel
My question relates to problems that I'm having matching lme and lmer
examples in P&B.
using Matix 0.995
In the Oxide example in p167-170 I can't get the level 2 coefficient
estimates to match
the fm1Oxide model in lme is
data(Oxide,package="nlme")
lme(Thickness~1,Oxide)
which I translate in Lmer syntax to
fm3Oxide<-lmer(Thickness~
2010 Oct 26
1
lme vs. lmer results
Hello,
and sorry for asking a question without the data - hope it can still
be answered:
I've run two things on the same data:
# Using lme:
mix.lme <- lme(DV ~a+b+c+d+e+f+h+i, random = random = ~ e+f+h+i|
group, data = mydata)
# Using lmer
mix.lmer <- lmer(DV
~a+b+c+d+(1|group)+(e|group)+(f|group)+(h|group)+(i|group), data =
mydata)
lme provided an output (fixed effects and random
2005 Jul 12
2
testing for significance in random-effect factors using lmer
Hi, I would like to know whether it is possible to obtain a value of
significance for random effects when aplying the lme or related
functions. The default output in R is just a variance and standard
deviation measurement.
I feel it would be possible to obtain the significance of these random
effects by comparing models with and without these effects. However,
I'm not used to perform
2012 Feb 06
1
lmer with spatial and temporal random factors, not nested
Hi, I am new to this list.
I have a question regarding including both spatial and temporal random
factors in lmer. These two are not nested, and an example of model I
try to fit is
model1<-lmer(Richness~Y+Canopy+Veg_cm+Treatment+(1|Site/Block/Plot)+(1|Year),
family=poisson, REML=FALSE),
where
richness = integer
Y & Treatment = factor
Canopy & Veg_cm = numerical, continous
2005 Oct 24
3
lme and lmer syntax
Hi,
I have this:
lme(y~x1+x2,random=~1|x1/x2)
How to make this random effect using lmer?
I try this:
lmer(y~x1+x2+(1|x1/x2)
But it dont work.
Any idea?
Thanks
Ronaldo
--
System halted!
--
|> // | \\ [***********************************]
| ( ?? ?? ) [Ronaldo Reis J??nior ]
|> V [UFV/DBA-Entomologia ]
| / \ [36570-000 Vi??osa -
2006 Jan 05
1
Understanding and translating lme() into lmer() model
I am newbie in R, trying to understand and compare syntax in nlme and
lme4. lme() model from the nlme package I am interested in is:
lme.m1.1 = lme(Y~A+B+C,random=~1|D/E,data=data,method="ML")
(for simplicity reason, I am giving generic names of factors)
If I understand well, there are three fixed factors: A, B and C, and two
random factors: D and E. In addition to that, E is nested in
2010 Sep 10
2
lme vs. lmer, how do they differ?
windows Vista
R 2.10.1
What is the difference (or differences) between lme and lmer? Both appear to perform mixed effects regression analyses.
Thanks
John
John David Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
University of Maryland School of Medicine Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
(Phone)
2005 Apr 25
2
residuals in lmer
Does anyone know how to extract residuals in lmer?
Here's the error I get:
>
crop.lme=lmer(response~variety*irrigation*pesticide+(1|rep)+(1|rep:
pesticide)+(1|rep:pesticide:irrigation), crop.data)
> qqnorm(crop.lme)
Error in qqnorm.default(crop.lme) : y is empty or has only NAs
> resid(crop.lme)
NULL
Thanks!
--Jake