Displaying 20 results from an estimated 1000 matches similar to: "lmer- why do AIC, BIC, loglik change?"
2006 Dec 11
2
How to write a two-way interaction as a random effect in a lmer model?
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 how I
could incorporate an interaction between the random effect and one of
the fixed effects.
I tried to express the interaction in:
2007 Jun 25
1
conflict between lme4 and RMySQL packages (PR#9753)
Full_Name: Dale Barr
Version: 2.5.1 (patched)
OS: Ubuntu linux x86_64
Submission from: (NULL) (138.23.70.108)
When RMySQL is loaded in before lme4, the summary() function for lmer objects in
the lme4 packages produces the following error:
Error in printMer(object) : no slot of name "status" for this object of class
"table"
When RMySQL is loaded AFTER lme4, however, no such
2005 Sep 01
2
VarCorr function for assigning random effects: was Question
If you are indeed using lme and not lmer then the needed function is
VarCorr(). However, 2 recommendations. First, this is a busy list and
better emails subject headers get better attention. Second, I would
recommend using lmer as it is much faster. However, VarCorr seems to be
incompatible with lmer and I do not know of another function to work
with lmer.
Hence, a better email subject header
2007 Mar 09
1
Problem with ci.lmer() in package:gmodels
Dear Friends,
Please note that in the following CI lower > CI higher:
> require(lmer)
> require(gmodels)
> fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject),
sleepstudy)
> ci(fm2)
Estimate CI lower CI upper Std. Error p-value
(Intercept) 251.66693 266.06895 238.630280 7.056447 0
Days 10.52773 13.63372 7.389946 1.646900
2008 Oct 08
1
Suspicious output from lme4-mcmcsamp
Hello, R community,
I have been using the lmer and mcmcsamp functions in R with some difficulty. I do not believe this is my code or data, however, because my attempts to use the sample code and 'sleepstudy' data provided with the lme4 packaged (and used on several R-Wiki pages) do not return the same results as those indicated in the help pages. For instance:
> sessionInfo()
R
2010 May 18
1
BIC() in "stats" {was [R-sig-ME] how to extract the BIC value}
>>>>> "MM" == Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Tue, 18 May 2010 12:37:21 +0200 writes:
>>>>> "GaGr" == Gabor Grothendieck <ggrothendieck at gmail.com>
>>>>> on Mon, 17 May 2010 09:45:00 -0400 writes:
GaGr> BIC seems like something that would logically go into stats
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
2016 Aug 02
0
save/load + all.equal on reference class objects
After I save an object that contains reference class objects in some of
its slots to a file and then re-load it, all.equal() seems to break for
me. Is this a bug in all.equal, or is it likely caused by bad
implementation of methods on my side? (I see that "'all.equal()' gains
methods for 'environment's and 'refClass'es" for R 3.2.0, but that was a
little while
2006 Jul 04
1
lmer print outs without T
Hi,
I have been having a tedious issue with lmer models with lots of
factors and lots of levels. In order to get the basic information at
the beginning of the print out I also have to generate these enormous
tables as well. Is there a method command to leave off all of the
effects and correlations? Or, do I have to go to string commands?
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
2006 Aug 11
1
help:coerce lmer.coef to matrix
Hi,
Thanks for your response, it nearly worked! But it only wrote one coloumn
of data and not the three columns I need.
Using fixef(m1) doesnt give the same results as coef(m1) when you are
using more than one random effect. I need the coefficients for each
individual so I use coef(m1) to get this which results in an object of
class lmer.coef, 3 columns by 700 rows.
as.data.frame() wont work on
2005 Oct 10
1
lmer / variance-covariance matrix random effects
Hello,
has someone written by chance a function to extract the
variance-covariance matrix from a lmer-object? I've noticed the VarCorr
function, but it gives unhandy output.
Regards,
Roel de Jong
2006 Feb 10
1
Lmer with weights
Hello!
I would like to use lmer() to fit data, which are some estimates and
their standard errors i.e kind of a "meta" analysis. I wonder if weights
argument is the right one to use to include uncertainty (standard
errors) of "data" into the model. I would like to use lmer(), since I
would like to have a "freedom" in modeling, if this is at all possible.
For
2007 Jul 31
1
Extracting random parameters from summary lme and lmer
LS,
I'm estimating multilevel regression models, using the lme-function
from the nlme-package. Let's say that I estimated a model and stored
it inside the object named 'model'. The summary of that model is
shown below:
Using summary(model)$tTable , I receive the following output:
> summary(model)$tTable
Value Std.Error DF t-value
2006 Oct 05
1
lmer BIC changes between output and anova
list,
i am using lmer to fit multilevel models and trying to use anova to compare the models. however, whenever i run the anova, the AIC, BIC and loglik are different from the original model output- as below. can someone help me out with why this is happening? (i'm hoping the output assocaited with the anova is right!).
thank you,
darren
> unconditional<-lmer(log50 ~ 1 + (1 |
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"
2009 May 21
0
problem with ci for lmer
Hi,
I am trying to calculate ci from lmer. However, I have the error message
below:
library(gmodels)
library(lme4)
fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy)
ci(fm2)
Error in as.vector(x, mode) :
cannot coerce type 'S4' to vector of type 'any'
In addition: Warning message:
In mean.default(x, na.rm = na.rm) :
argument is not
2010 Nov 01
3
Mean and individual growth curve trajectories
I'm trying to understand how to plot individual growth curve trajectories,
with the overall mean trajectory superimposed (preferably in a slightly
thicker line, maybe in black) over the individual trajectories. Using the
sleepstudy data in lme4, here is the code I have so far:
library(lme4)
library(lattice)
xyplot(Reaction ~ Days, data = sleepstudy, group = Subject, type = 'l')
2002 Dec 15
2
Interpretation of hypothesis tests for mixed models
My question concerns the logic behind hypothesis tests for fixed-effect
terms in models fitted with lme. Suppose the levels of Subj indicate a
grouping structure (k subjects) and Trt is a two-level factor (two
treatments) for which there are several (n) responses y from each
treatment and subject combination. If one suspects a subject by
treatment interaction, either of the following models seem
2009 Sep 06
3
linear mixed model question
Hello,
I wanted to fit a linear mixed model to a data that is similar in
terms of design to the 'Machines' data in 'nlme' package except that
each worker (with triplicates) only operates one machine. I created a
subset of observations from 'Machines' data such that it looks the
same as the data I wanted to fit the model with (see code below).
I fitted a model in