similar to: How to test for significance of random effects?

Displaying 20 results from an estimated 1000 matches similar to: "How to test for significance of random effects?"

2006 May 03
1
qu: predict with lmer (lme4) or other ways to get classification accuracy
Hi, I am using lmer (from the package lme4) to predict a binary response variable (REL) from a bunch of fixed effects and two random effects (Speaker_ID and NPhead_lemma): fit <- lmer(REL ~ SPEAKER_GENDER + log(SPEECHRATE) + SQSPEECHRATE + ..... + (1|Speaker_ID) + (1|NPhead_lemma), family="binomial", data=data.lmer, method="Laplace", model=T, x=T) I
2005 Apr 16
1
help on extract variance components from the fitted model by lm
Hey, all: Do we have a convenient command(s) to extract the variance components from a fitted model by lm (actually it's a nexted model)? e.g.: using the following codes we could get MSA,MSB(A) and MSE. How to get the variance component estimates by command in R rather than calculations by hand? A<-as.vector(rep(c(rep(1,5), rep(2,5), rep(3,5), rep(4,5), rep(5,5)),2))
2006 Oct 08
2
latex and anova.lme problem
Dear R-helpers, When I try > anova(txtE2.lme, txtE2.lme1) Model df AIC BIC logLik Test L.Ratio p-value txtE2.lme 1 10 8590 8638 -4285 txtE2.lme1 2 7 8591 8624 -4288 1 vs 2 6.79 0.0789 > latex(anova(txtE2.lme, txtE2.lme1)) Error: object "n.group" not found I don't even see n.group as one of the arguments of latex() I checked to see >
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
2009 Nov 03
1
lmer and estimable
Hi everyone, I'm using lmer and estimable (from packages lme4 and gmodels respectively) and have the disconcerting happening that when I run exactly the same code, I get different results! In checking this out by running the code 50x, it seems to be that answers may be randomly deviating around those which I get from another stats package (GenStat, using the linear mixed models functionality
2005 Apr 05
1
nlme & SASmixed in 2.0.1
I assigned a class the first problem in Pinheiro & Bates, which uses the data set PBIB from the SASmixed package. I have recently downloaded 2.0.1 and its associated packages. On trying library(SASmixed) data(PBIB) library(nlme) plot(PBIB) I get a warning message Warning message: replacing previous import: coef in: namespaceImportFrom(self, asNamespace(ns)) after library(nlme) and a
2006 Jan 31
1
lme in R (WinXP) vs. Splus (HP UNIX)
R2.2 for WinXP, Splus 6.2.1 for HP 9000 Series, HP-UX 11.0. I am trying to get a handle on why the same lme( ) code gives such different answers. My output makes me wonder if the fact that the UNIX box is 64 bits is the reason. The estimated random effects are identical, but the fixed effects are very different. Here is my R code and output, with some columns and rows deleted for space
2008 Jul 30
1
Mixed effects model where nested factor is not the repeated across treatments lme???
Hi, I have searched the archives and can't quite confirm the answer to this. I appreciate your time... I have 4 treatments (fixed) and I would like to know if there is a significant difference in metal volume (metal) between the treatments. The experiment has 5 blocks (random) in each treatment and no block is repeated across treatments. Within each plot there are varying numbers of
2005 Oct 28
2
Random effect models
Dear R-users, Sorry for reposting. I put it in another way : I want to test random effects in this random effect model : Rendement ~ Pollinisateur (random) + Lignee (random) + Pollinisateur:Lignee (random) Of course : summary(aov(Rendement ~ Pollinisateur * Lignee, data = mca2)) gives wrong tests for random effects. But : summary(aov1 <- aov(Rendement ~ Error(Pollinisateur * Lignee), data =
2004 Oct 08
1
Bug in nlme under version 2.0.0
Dear all, Under version 2.0.0, I get the error below when calling summary() on a lme-object, whereas it works under version 1.9.1 (well, it did last week, before I upgraded). Any help on this? Thx in advance S??ren > library(nlme) > mf <- formula(Weight~Cu*(Time+I(Time^2)+I(Time^3))) > lme1 <- lme(mf, data = dietox, random=~1|Pig) > summary(lme1) Linear mixed-effects model fit
2005 Jul 18
1
Nested ANOVA with a random nested factor (how to use the lme function?)
Hi, I am having trouble using the lme function to perform a nested ANOVA with a random nested factor. My design is as follows: Location (n=6) (Random) Site nested within each Location (n=12) (2 Sites nested within each Location) (Random) Dependent variable: sp (species abundance) By using the aov function I can generate a nested ANOVA, however this assumes that my nested
2013 Mar 18
1
try/tryCatch
Hi All, I have tried every fix on my try or tryCatch that I have found on the internet, but so far have not been able to get my R code to continue with the "for loop" after the lmer model results in an error. Here is two attemps of my code, the input is a 3D array file, but really any function would do.... metatrialstry<-function(mydata){ a<-matrix(data=NA, nrow=dim(mydata)[3],
2003 Jul 30
2
Comparing two regression slopes
Hello, I've written a simple (although probably overly roundabout) function to test whether two regression slope coefficients from two linear models on independent data sets are significantly different. I'm a bit concerned, because when I test it on simulated data with different sample sizes and variances, the function seems to be extremely sensitive both of these. I am wondering if
2005 Mar 09
1
multiple comparisons for lme using multcomp
Dear R-help list, I would like to perform multiple comparisons for lme. Can you report to me if my way to is correct or not? Please, note that I am not nor a statistician nor a mathematician, so, some understandings are sometimes quite hard for me. According to the previous helps on the topic in R-help list May 2003 (please, see Torsten Hothorn advices) and books such as Venables &
2006 Nov 30
1
data.frame within a function (PR#9294) (cont'd)
This continues the message "data.frame within a function (PR#9294)" that was posted on 2006/10/12. Duncan Murdoch kindly replied. I'm using the current version R 2.4.0, but the same issue exists. Just copy and paste the following code under R, and compare the output of f1() and f2() and the output of f3() and f4(). Does anybody have any idea? Thanks.
2008 Oct 15
2
Network meta-analysis, varConstPower in nlme
Dear Thomas Lumley, and R-help list members, I have read your article "Network meta-analysis for indirect treatment comparisons" (Statist Med, 2002) with great interest. I found it very helpful that you included the R code to replicate your analysis; however, I have had a problem replicating your example and wondered if you are able to give me a hint. When I use the code from the
2008 Sep 17
2
Command Prompt Question
Could someone please tell me how to stop the package/function name from being included before the command prompt? This started happening today after I made some changes to my Rprofile.site file and I don't know why. For example: if I enter example(AIC), instead of just getting the regular '>' before each output line, I get 'AIC>' instead. I only want the '>'
2001 Dec 23
1
aov for mixed model (fixed and random)?
I'm starting to understand fixed and random effects, but I'm puzzled a bit. Here is an example from Hays's textbook (which is great at explaining fixed vs. random effects, at least to dummies like me), from the section on mixed models. You need library(nlme) in order to run it. ------ task <- gl(3,2,36) # Three tasks, a fixed effect. subj <- gl(6,6,36) # Six subjects, a random
2004 Aug 10
4
Enduring LME confusion… or Psychologists and Mixed-Effects
Dear ExpeRts, Suppose I have a typical psychological experiment that is a within-subjects design with multiple crossed variables and a continuous response variable. Subjects are considered a random effect. So I could model > aov1 <- aov(resp~fact1*fact2+Error(subj/(fact1*fact2)) However, this only holds for orthogonal designs with equal numbers of observation and no missing values.
2005 May 09
1
bootstap and lme4
Hi, I am trying to get bootstrap confidence intervals on variance components and related statistics. To calculate the variance components I use the package lme4. > off.fun <- function(data, i){ d <- data[i,] lme1<- lmer(y ~ trt + (trt-1|group), d) VarCorr(lme1)@reSumry$group[2,1] #just as an example } > off.boot <- boot(data=data.sim, statistic=off.fun, R=100) If