similar to: Need advises on mixed-effect model ( a concrete example)

Displaying 20 results from an estimated 200 matches similar to: "Need advises on mixed-effect model ( a concrete example)"

2009 Apr 01
3
How to prevent inclusion of intercept in lme with interaction
Dear friends of lme, After so many year with lme, I feel ashamed that I cannot get this to work. Maybe it's a syntax problem, but possibly a lack of understanding. We have growth curves of new dental bone that can well be modeled by a linear growth curve, for two different treatments and several subjects as random parameter. By definition, newbone is zero at t=0, so I tried to force the
2007 Apr 11
0
Error with corCompSymm and lme fit for repeated measures
Dear R Friends, I need help with an error associated with corCompSymm in an lme fit. I am using a mixed effects model to analyze a split-plot with repeated measures and would like to fit with the compound symmetry correlation structure. This problem doesn't occur when using corAR1 or any of the other structures. I would greatly appreciate help on how to solve this issue. Here's my
2010 Sep 16
1
Help for an absolutely r-noob
Hello together, I am an absolute noob in R and therefore I need help urgently. I have received a script from my tutor with plot functions in it. However, I can' manage to adapt these plots. The hole script is as follows: setwd("E:/") ##### (1) Read data ### dat <- read.table("Komfort_Tatsaechliche_ID_Versuchsreihe_1.txt", header=TRUE, sep="\t",
2012 Sep 14
1
linear mixed-effects models with two random variables?
Dear R users, Does anyone knows how to run a glmm with one fixed factor and 2 random numeric variables (indices)? Is there any way to force in the model a separate interaction of those random variables with the fixed one? I hope you can help me. #eg. Reserve <- rep(c("In","Out"), 100) fReserve <- factor(Reserve) DivBoulders <- rep
2007 May 24
4
Function to Sort and test AIC for mixed model lme?
Hi List I'm running a series of mixed models using lme, and I wonder if there is a way to sort them by AIC prior to testing using anova (lme1,lme2,lme3,....lme7) other than by hand. My current output looks like this. anova (lme.T97NULL.ml,lme.T97FULL.ml,lme.T97NOINT.ml,lme.T972way.ml,lme.T97fc. ml, lme.T97ns.ml, lme.T97min.ml) Model df AIC BIC logLik
2004 Aug 11
1
Fwd: Enduring LME confusion… or Psychologists and Mixed-Effects
In my undertstanding of the problem, the model lme1 <- lme(resp~fact1*fact2, random=~1|subj) should be ok, providing that variances are homogenous both between & within subjects. The function will sort out which factors & interactions are to be compared within subjects, & which between subjects. The problem with df's arises (for lme() in nlme, but not in lme4), when
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.
2008 Jan 28
0
(no subject)
Hi all I am trying to generate a normal unbalanced data to estimate the coefficients of LM, LMM, GLM, and GLMM and their standard errors. Also, I am trying to estimate the variance components and their standard errors. Further, I am trying to use the likelihood ratio test to test H0: sigma^2_b = 0 (random effects variance component), and the t-test to test H0:mu=0 (intercept of the model Yij = mu
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 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
2011 Mar 18
0
predict.nlme
Hi folks, I am having trouble to plot a mixed model analysis of covariance (ANCOVA). To do so I use the function predict in nlme but the line that is being drawn is totally out of control!!! here is my script (where MASS_S is dry mass and MASS_F is fresh mass): MEN<-read.table("Mentha_lme2.txt", h=T) attach(MEN) lme1<-lme(log(MASS_S)~log(MASS_F)*TREAT, random=~1|INDIV)
2012 May 02
0
MCMCglmm priors including phylogeny
Hi all, I'm hoping I might be able to get some help with some issues specifying priors for MCMCglmm. I'm trying to fit a gaussian glmm using MCMCglmm to a data set with two (correlated) response variables. The response variables are both logit-transformed proportions (there are a few reasons why I've chosen these with gaussian error over binomal glmm, which I won't go into).
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 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
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 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
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
2003 Apr 08
2
Basic LME
Hello R Users, I am investigating the basic use of the LME function, using the following example; Response is Weight, covariate is Age, random factor is Genotype model.lme <- lme (Weight~Age, random=~ 1|Genotype) After summary(model.lme), I find that the estimate of Age is 0.098 with p=0.758. I am comparing the above model with the AOV function; model.aov <- aov (Weight~Age + Genotype)
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
2009 Jul 01
1
Average of data files in a directory
Dear all, I know it is as simple as c <- (a + b)/2 to compute the average (element-wise) of two data vectors. However, I can't work out to compute the average when you have many data vectors in a directory. I have done this: ------------------------------------ setwd("/.../data/") listfiles <- list.files(pattern=".pre") # list all datafiles in the directory