similar to: problem with ci for lmer

Displaying 20 results from an estimated 2000 matches similar to: "problem with ci for lmer"

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
2006 Oct 18
1
lmer- why do AIC, BIC, loglik change?
Hi all, I am having issues comparing models with lmer. As an example, when I run the code below the model summaries (AIC, BIC, loglik) differ between the summary() and anova() commands. Can anyone clear up what's wrong? Thank you! Darren Ward library(lme4) data(sleepstudy) fm1<-lmer(Reaction ~ Days + (1|Subject), sleepstudy) summary(fm1) fm2<-lmer(Reaction ~ Days +
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:
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
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 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
2004 May 15
1
Again some questions about multilevelanalysis
Dear list, I asked some questions about multilevelanalysis a couple of months ago. In the meantime I did some reading about the subject. Now I'd like to check, if I understood it all correctly. If you think my questions are not appropriate for this list, please tell me so and i will immediatly stop asking them. I have a dataset with one predicted variable (y), two explanatory variables
2009 Apr 15
2
AICs from lmer different with summary and anova
Dear R Helpers, I have noticed that when I use lmer to analyse data, the summary function gives different values for the AIC, BIC and log-likelihood compared with the anova function. Here is a sample program #make some data set.seed(1); datx=data.frame(array(runif(720),c(240,3),dimnames=list(NULL,c('x1','x2','y' )))) id=rep(1:120,2); datx=cbind(id,datx) #give x1 a
2006 Mar 29
1
Lmer BLUPS: was(lmer multilevel)
Paul: I may have found the issue (which is similar to your conclusion). I checked using egsingle in the mlmRev package as these individuals are strictly nested in this case: library(mlmRev) library(nlme) fm1 <- lme(math ~ year, random=~1|schoolid/childid, egsingle) fm2 <- lmer(math ~ year +(1|schoolid:childid) + (1|schoolid), egsingle) Checking the summary of both models, the output is
2013 Aug 28
1
named lmer.models in do.call(anova,models)
Hi, For some reason do.call on anova fails if the models are named lmer objects. Consider the following example: library(lme4) models <- list( lmer(Reaction ~ Days + (1| Subject), sleepstudy), lmer(Reaction ~ Days + (Days | Subject), sleepstudy)) # # models is an unnamed list, do.call works (although with warning): do.call(anova, models) # # after labeling the models, do.call gives an
2007 Dec 27
2
Problem of lmer under FreeBSD
I encounter such problem with lmer under FreeBSD, but not under Windows. Anyone knows why? Thanks. > example(lmer) lmer> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) Error in UseMethod("as.logical") : no applicable method for "as.logical" > traceback() 9: as.logical(EMverbose) 8: as.logical(EMverbose) 7: lmerControl() 6:
2010 Jun 03
2
lmer() with no intercept
Hi, I am wondering how I can specify no intercept in a mixed model using lmer(). Here is an example dataset attached ("test.txt"). There are 3 workers, in 5 days, measured a response variable "y" on independent variable "x". I want to use a quadratic term (x2 in the dataset) to model the relationship between y and x.
2012 Oct 03
1
Difficulties in trying to do a mixed effects model using the lmer function
Dear people of the help list I am drying to analyze my data using the 'lmer' function and I keep having problems. This is the model: > fm1<-lmer(dbh~spec+scheme+(1|Plot),data=d, REML=FALSE). I analyse tree size (dbh) of 3 different species (spec) and 3 planting schemes (scheme). I have 5 plots, which I hope to model as a random factor. (However, the subsequent output is based on
2007 Jan 23
0
New lmer: How to recode random effect ?
Dear all, I ran the following model without any problem previously to the update of lme4: fm2<-lmer(data=NGud,family=poisson, seed~hab*seedtray +(1|site)+(1|site:hab)) I have 25 sites, 2 habitats ("hab") per site, 8 seedtrays per habitat (4 as control, and 4 as treatment), and I'm interested in comparing the number of seed in seedtrays as a function of the treatment and its
2011 Feb 19
0
lmer, MCMCsamp and ranef samples?
I really hope sombody could help me with the following, I'm having problems accessing the random effect samples following the example on MCMCsamp: (fm1 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy)) set.seed(101); samp0 <- mcmcsamp(fm1, n = 1000, saveb=TRUE) str(samp0) Formal class 'merMCMC' [package "lme4"] with 9 slots ..@ Gp :
2006 Dec 10
0
lmer, gamma family, log link: interpreting random effects
Dear all, I'm curious about how to interpret the results of the following code. The first model is directly from the help page of lmer; the second is the same model but using the Gamma family with log link. The fixed effects make sense, because y = 251.40510 + 10.46729 * Days is about the same as log(y) = 5.53613298 + 0.03502057 * Days but the random effects seem quite
2010 Jun 21
1
Contrast interaction effects in lmer object for reciprocal transplant experiment
Dear All: I am using lmer() {lme4} to analyze results from a reciprocal transplant experiment where the response variable is modeled as a function of two fixed effects and their interaction. Example data follow: #library(lme4) #library(gmodels)
2007 Nov 12
0
Resid() and estimable() functions with lmer
Hi all, Two questions: 1. Is there a way to evaluate models from lmer() with a poisson distribution? I get the following error message: library(lme4) lmer(tot.fruit~infl.treat+def.treat+(1|initial.size),family=poisson)->model plot(fitted(model),resid(model)) Error: 'resid' is not implemented yet Are there any other options? 2. Why doesn't the function estimable() in gmodels
2007 Jun 27
1
error message from lmer
Hi, I've begun to use the lme4 package, rather than nlme, for more flexibility during modelling, and running the examples in lmer I receive this error message: ---<---------------cut here---------------start-------------->--- R> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) Error in printMer(object) : no slot of name "status" for this object of class
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