Displaying 20 results from an estimated 7000 matches similar to: "residuals(lme) error message"
2009 Jan 03
1
how specify lme() with multiple within-subject factors?
I have some questions about the use of lme().
Below, I constructed a minimal dataset to explain what difficulties I
experience:
# two participants
subj <- factor(c(1, 1, 1, 1, 2, 2, 2, 2))
# within-subjects factor Word Type
wtype <- factor(c("nw", "w", "nw", "w", "nw", "w", "nw", "w"))
# within-subjects factor
2009 Jan 12
0
Two-way repeated measures anova with lme
Dear R-Users,
I'm trying to set up a repeated measures anova with two within subjects
factors. I tried it by 3 different anova functions: aov, Anova (from car
package) and lme (from nlme package). I managed to get the same results with
aov and Anova, but the results that I get from lme are slightly different
and I don't figure out why. I guess I did not set up the error structure
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
2012 Jan 06
1
lme model specification problem (Error in MEEM...)
Dear all,
In lme, models in which a factor is fully "contained" in another lead to
an error. This is not the case when using lm/aov.
I understand that these factors are aliased, but believe that such
models make sense when the factors are fitted sequentially. For example,
I sometimes fit a factor first as linear term (continuous variable with
discrete levels, e.g. 1,2,4,6), and
2005 Dec 01
1
LME & data with complicated random & correlational structures
Dear List,
This is my first post, and I'm a relatively new R user trying to work out a
mixed effects model using lme() with random effects, and a correlation
structure, and have looked over the archives, & R help on lme, corClasses, &
etc extensively for clues. My programming experience is minimal (1 semester
of C). My mentor, who has much more programming experience, but a comparable
2005 Oct 27
1
aov() and lme()
Sorry for reposting, but even after extensive search I still did not
find any answers.
using:
summary(aov(pointErrorAbs~noOfSegments*turnAngle+Error(subj/(noOfSegments+turnAngle)),
data=anovaAllData ))
with subj being a random factor and noOfSegments and turnAngle being
fixed factors, I get the following results:
----------------------------------------------
Error: subj
Df Sum
2003 May 14
1
Multiple comparison and lme (again, sorry)
Dear list,
As a reply to my recent mail:
> simint and TukeyHSD work for aov objects.
> Can someone point me to similar functions for lme objects?
Douglas Bates wrote
There aren't multiple comparison methods for lme objects because it is
not clear how to do multiple comparisons for these. I don't think the
theory of multiple comparisons extends easily to lme models. One
could
2005 Aug 12
1
as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)
This is a continuing issue with the one on the list a long time ago (I
couldn't find a solution to it from the web):
--------------------------------------------------------------------------
> Using a formula converted with as.formula with lme leads
> to an error message. Same works ok with lm, and with
> lme and a fixed formula.
>
> # demonstrates problems with lme and
2002 Jan 22
1
lme and mixed effects
Dear r-help,
With lme, is there a way to specify multiple fixed factors under one level of grouping?
For example, for a single fixed factor, I use the following:
fm1.lme <- lme(fixed=resp ~ fact1, random=~1|subj/fact1, data=mydata)
I would like to have multiple factors under subj, like the following
for a two-way design, but I get an error:
fm2.lme <- lme(fixed=resp ~ fact1*fact2,
2008 Jan 25
1
Trouble setting up correlation structure in lme
Hi, I'm trying to set up AR(1) as a correlation structure in modeling some
data (attached file data.txt in text format) with lme, but have trouble
getting it to work.
Incent, Correctness, and Oppor are 3 categorical variables, Beta is a
response variable, and Time is an equally-spaced variable with 6 time points
(treated as a categorical variable as well). Basically I want to model the
2009 Oct 19
1
Reposting various problems with two-way anova, lme, etc.
Hi,
I posted the message below last week, but no answers, so I'm giving it
another attempt in case somebody who would be able to help might have missed
it and it has now dropped off the end of the list of mails.
I am fairly new to R and still trying to figure out how it all works, and I
have run into a few issues. I apologize in advance if my questions are a bit
basic, I'm also no
2001 Feb 23
1
as.formula and lme ( Fixed effects: Error in as.vector(x, "list") : cannot coerce to vector)
Using a formula converted with as.formula with lme leads
to an error message. Same works ok with lm, and with
lme and a fixed formula.
# demonstrates problems with lme and as.formula
demo<-data.frame(x=1:20,y=(1:20)+rnorm(20),subj=as.factor(rep(1:2,10)))
demo.lm1<-lme(y~x,data=demo,random=~1|subj)
print(summary(demo.lm1))
newframe<-data.frame(x=1:5,subj=rep(1,5))
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.
2002 Apr 18
1
Help with lme basics
In Baron and Li's "Notes on the use of R for psychology experiments and questionnaires" http://cran.r-project.org/doc/contrib/rpsych.htm they describe a balanced data set for a drug experiment:
"... a test of drug treatment effect by one between-subject factor: group (two groups of 8 subjects each) and two within-subject factors: drug (2 levels) and dose (3 levels). "
2007 Aug 22
4
within-subject factors in lme
I don't think, this has been answered:
> I'm trying to run a 3-way within-subject anova in lme with 3
> fixed factors (Trust, Sex, and Freq), but get stuck with handling
> the random effects. As I want to include all the possible random
> effects in the model, it would be something more or less
> equivalent to using aov
>
> > fit.aov <- aov(Beta ~
>
2002 Oct 09
3
proc mixed vs. lme
Dear All,
Comparing linear mixed effect models in SAS and R, I found the following
discrepancy:
SAS R
random statement random subj(program); random = ~ 1 |
Subj
-2*loglik 1420.8 1439.363
random effects
variance(Intercept) 9.6033 9.604662
2009 Jan 05
0
getResponse(model.lme) yields incorrect number of dimensions error
Dear R experts,
I would like to get an R^2 - like value for a multilevel regression using lme.
I followed an archived suggestion by José
Pinheiro to use the squared correlation between
fitted and observed values, i.e.,
(cor(fitted(model.lme), getResponse(model.lme))^2
but getResponse returns the error message
Error in val[, level] : incorrect number of dimensions
The same happens with
2005 Jun 28
1
How to extract the within group correlation structure matrix in "lme"
Dear R users,
I fitted a repeated measure model without random effects by using lme. I will use the estimates from that model as an initial estimates to do multiple imputation for missing values of the response variable in the model. I am trying to extract the within group correlation matrix or covariance matrix.
here is my code:
f = lme(y ~x0+x1+trt+tim+x1:tim +tim:trt,random=~-1|subj,
2009 Nov 05
1
stepAIC(coxph) forward selection
Dear R-Help,
I am trying to perform forward selection on the following coxph model:
>my.bpfs <- Surv(bcox$pfsdays, bcox$pfscensor)
> b.cox <- coxph(my.bpfs ~ Cbase + Abase + Cbave + CbSD + KPS + gender +
as.factor(eor) + Age)>stepAIC(b.cox, scope=list(upper =~ Cbase + Abase +
Cbave + CbSD + KPS + gender + as.factor(eor) + Age, lower=~1), direction=
c("forward"))
However
2007 Sep 14
0
lme for repeated measurements over time
Hi list
I am just beginning to understand the complexities of linear mixed
effects models. Maybe someone can give advise concerning the following
problem:
I have two groups of surgical patients in which repeated laboratory
measurements were taken over time after surgery. I decided that lme
would be the best model to fit the data.
I already fitted the model
lme(logratio ~ gr*I(pod-10) +