Displaying 20 results from an estimated 10000 matches similar to: "lmer and correlation"
2005 Sep 19
1
How to mimic pdMat of lme under lmer?
Dear members,
I would like to switch from nlme to lme4 and try to translate some of my
models that worked fine with lme.
I have problems with the pdMat classes.
Below a toy dataset with a fixed effect F and a random effect R. I gave
also 2 similar lme models.
The one containing pdLogChol (lme1) is easy to translate (as it is an
explicit notation of the default model)
The more parsimonious
2007 Jan 25
1
New version of lme4 and new mailing list R-SIG-mixed-models
Version 0.9975-11 of the lme4 package has been uploaded to CRAN. The
source package should be available on the mirrors in a day or two and
binary packages should follow soon after.
There are several changes in this release of the package. The most
important is the availability of a development version of lmer called,
for the time being, lmer2. At present lmer2 only fits linear mixed
models.
2007 Jan 25
1
New version of lme4 and new mailing list R-SIG-mixed-models
Version 0.9975-11 of the lme4 package has been uploaded to CRAN. The
source package should be available on the mirrors in a day or two and
binary packages should follow soon after.
There are several changes in this release of the package. The most
important is the availability of a development version of lmer called,
for the time being, lmer2. At present lmer2 only fits linear mixed
models.
2007 Sep 19
3
Robust or Sandwich estimates in lmer2
Dear R-Users:
I am trying to find the robust (or sandwich) estimates of the standard error of fixed effects parameter estimates using the package "lmer2". In model-1, I used "robust=TRUE" on the other, in model-2, I used "robust=FALSE". Both models giving me the same estimates. So my question is, does the robust option works in lmer2 to get the robust estimates of
2007 Jun 13
1
lme() doesn't converge on IGF example
Running the Chapter 4 examples in Pinheiro & Bates' "Mixed-Effects
Models in S and S-PLUS" (2000), I get a message that the default
optimizer doesn't converge, but using "optim" for the optimizer
results in convergence:
> > library(nlme)
> > fm1IGF.lis <- lmList(IGF)
> > fm1IGF.lme <- lme(fm1IGF.lis)
> Error in lme.formula(fixed =
2007 Jan 29
1
lmer2 error under Mac OS X on PowerPC G5 but not on Dual-Core Intel Xeon
> (fm1 <- lmer2(Reaction ~ Days + (Days|Subject), sleepstudy))
Error in as.double(start) : Calloc could not allocate (888475968 of
4) memory
*************************
> sessionInfo()
R version 2.4.1 (2006-12-18)
powerpc-apple-darwin8.8.0
locale:
C
attached base packages:
[1] "grid" "datasets" "stats" "graphics" "grDevices"
2007 Aug 15
2
lmer coefficient distributions and p values
I am helping my wife do some statistical analysis. She is a biologist,
and she has performed some measurements on various genotypes of
mice. My background is in applied mathematics and engineering, and I
have a fairly good statistics background, but I am by no means a PhD
level expert in statistical methods.
We have used the lmer package to fit various models for the various
experiments that she
2007 Feb 20
1
Simplification of Generalised Linear mixed effects models using glmmPQL
Dear R users I have built several glmm models using glmmPQL in the
following structure:
m1<-glmmPQL(dev~env*har*treat+dens, random = ~1|pop/rep, family =
Gamma)
(full script below, data attached)
I have tried all the methods I can find to obtain some sort of model fit
score or to compare between models using following the deletion of terms
(i.e. AIC, logLik, anova.lme(m1,m2)), but I
2008 Mar 08
1
analysing mixed effects/poisson/correlated data
I am attempting to model data with the following variables:
timepoint - n=48, monthly over 4 years
hospital - n=3
opsn1 - no of outcomes
total.patients
skillmixpc - skill mix percentage
nurse.hours.per.day
Aims
To determine if skillmix affects rate (i.e. no.of.outcomes/total.patients).
To determine if nurse.hours.per.day affects rate.
To determine if rates vary between
2007 Oct 08
2
estfun & df
Hello EVERYONE,
I need an URGENT help from you please!
How can I see the "estfun" (empirical estimating function) and "df" (degree of freedom) from the following mixed-model please?
(fm1 <- lmer2(Reaction ~ Days + (Days|Subject), sleepstudy))
Many thanks in advance for your kind help.
Sattar
2007 May 16
1
lmer error confusion
Hi All.
I'm trying to run a simple model from Baayan, Davidson, & Bates and getting
a confusing error message. Any ideas what I'm doing wrong here?
# Here's the data.....
Subj <- factor(rep(1:3,each=6))
Item <- factor(rep(1:3,6))
SOA <- factor(rep(0:1,3,each=3))
RT <-
c(466,520,502,475,494,490,516,566,577,491,544,526,484,529,539,470,511,528)
priming
2007 Aug 07
1
lmer() : crossed-random-effects specification
Dear all,
I want to estimate a crossed-random-effects model (i.e., measurements,
students, schools) where students migrate between schools over time.
I'm interested in the fixed effects of "SES", "age" and their
interaction on "read" (reading achievement) while accounting for the
sample design. Based on a previous post, I'm specifying my model as:
fm1 <-
2006 Nov 02
2
correlation argument for lmer?
Dear r-help members,
Can lmer() in the lme4 package fit models that have a specified within-group
correlation structure, as provided, for example, by the correlation argument
to lme() in the nlme package?
Thanks,
John
--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox
2006 Mar 31
1
loglikelihood and lmer
Dear R users,
I am estimating Poisson mixed models using glmmPQL
(MASS) and lmer (lme4). We know that glmmPQL do not
provide the correct loglikelihood for such models (it
gives the loglike of a 'pseudo' or working linear
mixed model). I would like to know how the loglike is
calculated by lmer.
A minor question is: why do glmmPQL and lmer give
different degrees-of-freedom for the same
2010 Feb 16
0
replicating aov results with lmer
I am trying to replicate the results of an aov command with lmer, to understand the syntax, but I can't quite figure it out. I have a dataset from Montgomery p. 520 with a nested and factorial layout. There are 3 fixtures, 2 layouts (the treatments) in a factorial design, but the operators who perform the runs are nest in layouts (4 operators per layout=8 different operators). Thus, each
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
2007 Mar 07
1
Failure to run mcsamp() in package arm
Dear r-helpers,
I can run the examples on the mcsamp help page. For example:
****************************************
> M1 <- lmer (y1 ~ x + (1|group))
> (M1.sim <- mcsamp (M1))
fit using lmer,
3 chains, each with 1000 iterations (first 500 discarded)
n.sims = 1500 iterations saved
mean sd 2.5% 25% 50% 75% 97.5% Rhat n.eff
beta.(Intercept)
2011 Jun 01
1
different results from lme() and lmer()
Hello R-help,
I'm studying an example in the R book.?
The data file is available from the link below.http://www.bio.ic.ac.uk/research/mjcraw/therbook/data/fertilizer.txt
Could you explain Why the results from lme() and lmer() are different in the following case? In other examples, I can get the same results using the two functions, but not here...?
Thank you.Miya
library(lme4)library(nlme)#
2009 Nov 24
2
random effects correlation in lmer
I am having an issue with lmer that I wonder if someone could explain.
I am trying to fit a mixed effects model to a set of longitudinal data
over a set of individual subjects:
(fm1 <- lmer(x ~ time + (time|ID),aa))
I quite often find that the correlation between the random effects is 1.0:
Linear mixed model fit by REML
Formula: x ~ time + (time | ID)
Data: aa
AIC BIC logLik deviance
2007 Apr 12
1
LME: internal workings of QR factorization
Hi:
I've been reading "Computational Methods for Multilevel Modeling" by Pinheiro and Bates, the idea of embedding the technique in my own c-level code. The basic idea is to rewrite the joint density in a form to mimic a single least squares problem conditional upon the variance parameters. The paper is fairly clear except that some important level of detail is missing. For