similar to: Help with lme4 model specification

Displaying 20 results from an estimated 4000 matches similar to: "Help with lme4 model specification"

2012 Jan 24
2
sampling weights in package lme4
Dear All I am trying to include sampling weights in multilavel regression analysis using packege lme4 using following codes print(fm1 <- lmer(DC~sex+age+smoker+alcohol+fruits(1|setting), dataset,REML = FALSE), corr = FALSE) print(fm2 <- lmer(DC~sex+age+smoker+alcohol+fruits(1|setting), dataset,REML = FALSE), corr = FALSE,weights=sweight) The problem is both the
2004 Aug 27
2
degrees of freedom (lme4 and nlme)
Hi, I'm having some problems regarding the packages lme4 and nlme, more specifically in the denominator degrees of freedom. I used data Orthodont for the two packages. The commands used are below. require(nlme) data(Orthodont) fm1<-lme(distance~age+ Sex, data=Orthodont,random=~1|Subject, method="REML") anova(fm1) numDF DenDF F-value p-value (Intercept) 1
2009 Nov 01
1
package lme4
Hi R Users, When I use package lme4 for mixed model analysis, I can't distinguish the significant and insignificant variables from all random independent variables. Here is my data and result: Data: Rice<-data.frame(Yield=c(8,7,4,9,7,6,9,8,8,8,7,5,9,9,5,7,7,8,8,8,4,8,6,4,8,8,9), Variety=rep(rep(c("A1","A2","A3"),each=3),3),
2013 Jul 06
1
(lme4) p-values for single terms in mixed models involved in sig interactions
I am using lme4 to fit a mixed effects model to my data. I have a significant interaction between two variables. My question is what is the correct way to get p-values for single terms involved in that interaction. I have been using stepwise backwards deletion and model comparisons to get p-values,and refitting the model using a REML approach to get estimates.However, presumably to get the p
2013 Apr 30
1
Mixed Modeling in lme4
Hi All, I am trying to shift from running mixed models in SAS using PROC MIXED to using lme4 package in R. In trying to match the coefficients of R output to that of SAS output, I came across this problem. The dataset I am using is this one: http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_mixed_sect034.htm If I run the following code: proc mixed data=rc
2010 Oct 25
3
question in using nlme and lme4 for unbalanced data
Hello: I have an two factorial random block design. It's a ecology experiment. My two factors are, guild removal and enfa removal. Both are two levels, 0 (no removal), 1 (removal). I have 5 blocks. But within each block, it's unbalanced at plot level because I have 5 plots instead of 4 in each block. Within each block, I have 1 plot with only guild removal, 1 plot with only enfa removal,
2006 Nov 21
1
lme4 model with no fixed effects?
Crossed random effects: > lmer( y ~ (1 | i1) + (1|i2) ,data=dta) Linear mixed-effects model fit by REML Formula: y ~ (1 | i1) + (1 | i2) Data: dta AIC BIC logLik MLdeviance REMLdeviance 91.18 94.84 -42.59 85.2 85.18 Random effects: Groups Name Variance Std.Dev. i1 (Intercept) 0.068224 0.26120 i2 (Intercept) 0.463112
2005 Jun 24
1
lme4 extracting individual variance components
Hi, For further calculations I need to extract indivdual Variances of different random effects from a fitted model. I found out how to extract the correlations (VarCorr(m1)@reSumry$group1) but I was not able to find a way to extract the other components individually. To extract the Residuals I tried: (ranef(m1)@ stdErr) which unfortunately did not work. Thank you very much for your help!
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
2012 Sep 02
1
glmulti runs indefinitely when using genetic algorithm with lme4
Dear List, I'm using glmulti for model averaging in R. There are ~10 variables in my model, making exhaustive screening impractical - I therefore need to use the genetic algorithm (GA) (call: method = "g"). I need to include random effects so I'm using glmulti as a wrapper for lme4. Methods for doing this are available here
2003 Sep 11
2
FAST_IPSEC doesn't seem to honor net.key.prefered_oldsa=0
When using the FAST_IPSEC option in the kernel build, the sysctl variable net.key.prefered_oldsa seems to make no difference. The kernel always chooses an old SA. This problem can be easily reproduced. Just wait till the soft limit of the SA is expired and do a setkey -F on the remote and then ping through the tunnel. Because the old SA's are preferred and the remote no longer has the old
2009 Jan 13
1
Converting Factor to Vector
Hi all, How can I convert factor like this: > str(repo) 'data.frame': 1000 obs. of 1 variable: $ AAA: Factor w/ 1000 levels "AAT","AAC",..: 1 2 3 4 5 6 7 8 9 10 ... > print(repo) AAA 1 AAA 2 AAT 3 AAC ... into to simple vector > str(new_repo) chr [1:100] "AAA" "AAT" "AAC" "AAG" "ATA" "ATT"...
2006 Apr 20
1
lmer{lme4}, poisson family and residuals
Hello, I’m trying to fit the following model: Dependent variable: MAXDEPTH (the maximum depth reached by a penguin during a given dive) Fixed effects: SUCCESSMN (an index of the “individual quality” of a bird), STUDYDAY (the day of the study, from -5 to 20, with 0=Dec 20), and the interaction SUCCESSMN*STUDYDAY Random effect: BIRD (the bird id, as each bird is performing several dives)
2006 Apr 20
2
Missing p-values using lmer()
Hello, I’m trying to perform a REML analysis using the lmer() function (lme4 package). Well, it seems to work well, except that I’m not getting any p-value (see example below). Can someone tell me what I did wrong? Thanks for your help, Amélie > library(gdata) > dive <- read.xls("C:/Documents and Settings/Amelie/My Documents/Postdoc/CE 2005-2006/divebydive.xls",
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,
2009 Jan 13
3
Returning Non-Unique Index with Which (alternatives?)
Dear all, I tried to find index in repo given a query with this: > repo <- c("AAA", "AAT", "AAC", "AAG", "ATA", "ATT") > qr <- c("AAC", "ATT", "ATT") > which(repo%in%qr) [1] 3 6 Note that the query contain repeating elements, yet the output of which only returns unique. How can I make it
2012 Jul 03
2
Plugin help Tabbed view in Rails 3
Hi, I am trying to create a tabbed view for my RoR application where I am trying to project the same partial by passing some local variables to it, but I have not been successful so far.Please point to some nice rails plugins for tabbed panels in rails 3.0 as well as some video or written tutorials. Thanks & Regards, Shalini Sah -- You received this message because you are subscribed
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 +
2008 Apr 04
1
lme4: How to specify nested factors, meaning of : and %in%
Hello list, I'm trying to figure out how exactly the specification of nested random effects works in the lmer function of lme4. To give a concrete example, consider the rat-liver dataset from the R book (rats.txt from: http://www.bio.ic.ac.uk/research/mjcraw/therbook/data/ ). Crawley suggests to analyze this data in the following way: library(lme4) attach(rats) Treatment <-
2017 Dec 26
1
identifying convergence or non-convergence of mixed-effects regression model in lme4 from model output
Hi R community! I've fitted three mixed-effects regression models to a thousand bootstrap samples (case-resampling regression) using the lme4 package in a custom-built for-loop. The only output I saved were the inferential statistics for my fixed and random effects. I did not save any output related to the performance to the machine learning algorithm used to fit the models (REML=FALSE).