Displaying 20 results from an estimated 600 matches similar to: "how to fix the level-1 variances in lme()?"
2009 Apr 29
1
meta regression in R using lme function
Dear all,
We are trying to do a meta regression in R using the lme function. The
reason for doing this with lme function is that we have covariates and
studies within references. In S-Plus this is possible by using the
following command:
lme(outcome ~ covars, random = ~1 | reference/study, weights =
varFixed(~var.outcome), data = mydata, control = lmeControl(sigma = 1))
This means that the
2017 Aug 09
3
Plotting log transformed predicted values from lme
Hi,
I am performing meta-regression using linear mixed-effect model with the
lme() function that has two fixed effect variables;one as a log
transformed variable (x) and one as factor (y) variable, and two nested
random intercept terms.
I want to save the predicted values from that model and show the log curve
in a plot ; predicted~log(x)
mod<-lme(B~log(x)+as.factor(y),
2013 Jan 23
1
mixed effects meta-regression: nlme vs. metafor
Hi,
I would like to do a meta-analysis, i.e., a mixed-effects regression,
but I don't seem to get what I want using both the nlme or metafor packages.
My question: is there indeed no way to do it?
And if so, is there another package I could use?
Here are the details:
In my meta-analysis I'm comparing different studies that report a
measure at time zero and after a certain followup
2009 Jan 22
1
convergence problem gamm / lme
Hope one of you could help with the following question/problem:
We would like to explain the spatial
distribution of juvenile fish. We have 2135 records, from 75 vessels
(code_tripnr) and 7 to 39 observations for each vessel, hence the random effect
for code_tripnr. The offset (‘offsetter’) accounts for the haul duration and
sub sampling factor. There are no extreme outliers in lat/lon. The model
2006 Jul 23
3
Making a patch
Dear R developers,
is there a preferred format or strategy for making a patch to
contribute to a package that is maintained by R-core? Berwin Turlach
and I have written a very minor extension to lmeControl to allow it to
pass an argument to nlminb for the maximum number of evaluations of
the objective function. I've edited the nlme/R/lme.R and
nlme/man/lmeControl.Rd files. I can diff the
2017 Aug 10
0
Plotting log transformed predicted values from lme
Dear Alina
If I understand you correctly you cannot just have a single predicted
curve but one for each level of your factor.
On 09/08/2017 16:24, Alina Vodonos Zilberg wrote:
> Hi,
>
> I am performing meta-regression using linear mixed-effect model with the
> lme() function that has two fixed effect variables;one as a log
> transformed variable (x) and one as factor (y)
2017 Aug 10
1
Plotting log transformed predicted values from lme
Thank you Michael,
Curves for each level of the factor sounds very interesting,
Do you have a suggestion how to plot them?
Thank you!
Alina
*Alina Vodonos Zilberg*
On Thu, Aug 10, 2017 at 7:39 AM, Michael Dewey <lists at dewey.myzen.co.uk>
wrote:
> Dear Alina
>
> If I understand you correctly you cannot just have a single predicted
> curve but one for each level of your
2004 Jul 04
2
doubly multivariate analysis in R
20 subjects were measured in 5 conditions (thus repeated measures) and
for each subject in each condition there are 4 response measures (thus
multivariate as it is a combined score that needs to be compared across
the conditions).
So, using a multivariate approach to repeated measures this is a doubly
multivariate analysis.
I would appreciate any suggestions as to the best way to do such a
2009 Feb 12
1
Setting optimizer in lme
I am using R 2.7.0 on a linux platform.
I am trying to reproduce a 2002 example using lme from the nlme library.
I want to change the otimizer from the default (nlminb) to optim.
Specifically, this is what I am trying to do:
R> library(nlme)
R> library(car) # for data only
R> data(Blackmoor) # from car
R> Blackmoor$log.exercise <- log(Blackmoor$exercise + 5/60, 2)
R>
2006 May 26
2
lme, best model without convergence
Dear R-help list readers,
I am fitting mixed models with the lme function of the nlme package.
If I get convergence depends on how the method (ML/REM) and which (and
how much) parameters will depend randomly on the cluster-variable.
How get the bist fit without convergence?
I set the parameters msVerbose and returnObject to TRUE:
lmeControl(maxIter=50000, msMaxIter=200, tolerance=1e-4,
2005 Mar 01
3
packages masking other objects
hello all,
I am trying to use the function getCovariateFormula(nlme) in conjunction with the library lme4. When I load both packages I get the following message and the getCovariateFormula function no longer works:
library(nlme)
library(lme4)
Attaching package 'lme4':
The following object(s) are masked from package:nlme :
contr.SAS getCovariateFormula
2017 Mar 07
0
Potential clue for Bug 16975 - lme fixed sigma - inconsistent REML estimation
Dear list,
I was trying to create a VarClass for nlme to work with Fay-Herriot
(FH) models. The idea was to create a modification of VarComb that
instead of multiplying the variance functions made their sum (I called
it varSum). After some fails etc... I found that the I was not getting
the expected results because I needed to make sigma fixed. Trying to
find how to make sigma fixed I run into
2007 Feb 28
1
LME without convergence
Dear R-help list readers,
I am fitting a mixed model using the lme function (R V 2.3.1 for
Windows). This is an example:
dep<-c(25,40,33.33,60,70.83,72,71.43,50,40,53.33,64,54.17,60,53.57)
yes<-c(0,1,2,3,4,5,6,0,1,2,3,4,5,6)
treat<-c(1,1,1,1,1,1,1,0,0,0,0,0,0,0) #factor
If I now fit a model with random slopes as well as intercepts:
model1<-lme(dep~yes,random=yes|treat)
R
2007 Nov 01
1
A question about lme object
I have a question about the lme function in R. My question is: After I got
the object from function lme, why the numIter value of the object is always
NULL? Following is my code:
jjww<-lme(y~x*zz,data=simul,random=~x|group,
control=lmeControl(returnObject=TRUE))
attributes(jjww)
jjww$numIter
the first 20 observation of data simul are:
> simul
y
2001 Dec 05
1
how to obtain EM-estimates of cov(b) and var(e) from lme
Hi,
I have a simple random-coefficients model for m subjects:
y = b0 + b1 x + r0 + r1 x + e
where b0 and b1 are fixed parameters, r0 and r1 are random,
e ~ N(0,s2 I) and R' = [r0, r1] ~ N(0,T).
I try to obtain the EM-estimates of s2 and the elements of T by
lme(y~x,data=mydata,random= list(group=~x),
control=lmeControl(maxIter = 0, niterEM=100,msVerbose = TRUE))
Does
2012 Feb 07
1
lme, lmer, convergence
Hello, all,
I am running some simulations to estimate power for a complicated epidemiological study, and am using lme and lmer to get these estimates. I have to run a few thousand iterations, and once in a great while, an iteration will create fake data such that the model won't converge. I see from Google searches that this is not an uncommon situation.
My question: is there a way to
2006 Jun 28
3
lme convergence
Dear R-Users,
Is it possible to get the covariance matrix from an lme model that did not converge ?
I am doing a simulation which entails fitting linear mixed models, using a "for loop".
Within each loop, i generate a new data set and analyze it using a mixed model. The loop stops When the "lme function" does not converge for a simulated dataset. I want to
2011 Jun 22
1
lme convergence failure within a loop
Hi R-users,
I'm attempting to fit a number of mixed models, all with the same
structure, across a spatial grid with data points collected at various
time points within each grid cell. I'm trying to use a 'for' loop to try
the model fit on each grid cell. In some cells lme does not converge,
giving me the error:
Error message: In lme.formula(logarea ~ year + summ_d, data =
2004 Aug 19
2
glmmPQL in R and S-PLUS 6 - differing results
Greetings R-ers,
A colleague and I have been exploring the behaviour of glmmPQL in R
and S-PLUS 6 and we appear to get different results using the same
code and the same data set, which worries us. I have checked the
behaviour in R 1.7.1 (MacOS 9.2) and R. 1.9.0 (Windows 2000) and the
results are the same, but differ from S-PLUS 6 with the latest Mass
and nlme libraries (Windows XP).
Here
2004 Nov 23
2
Convergence problem in GLMM
Dear list members,
In re-running with GLMM() from the lme4 package a generalized-linear mixed
model that I had previously fit with glmmPQL() from MASS, I'm getting a
warning of a convergence failure, even when I set the method argument of
GLMM() to "PQL":
> bang.mod.1 <- glmmPQL(contraception ~ as.factor(children) + cage + urban,
+ random=~as.factor(children) + cage +