Displaying 20 results from an estimated 7000 matches similar to: "Syntax for lme function to model random factors and interactions"
2006 Oct 05
2
treatment effect at specific time point within mixedeffects model
Hi David:
In looking at your original post it is a bit difficult to ascertain
exactly what your null hypothesis was. That is, you want to assess
whether there is a treatment effect at time 3, but compared to what. I
think your second post clears this up. You should refer to pages 224-
225 of Pinhiero and Bates for your answer. This shows how to specify
contrasts.
> -----Original Message-----
2012 Nov 20
2
Controlling the number of interactions of a lme
Hello everybody,
i'm trying to run a lme but am having a problem.
My model have many response variables and when i run the anova, the number
of interactions (up to six) is great and the p-values of all variables not
appear.
I wanted to know if i could to control the number of interactions of the
model, or if this method is the most advisable for so many variables.
Thanks in advance!
2005 Apr 24
1
random interactions in lme
Hi All,
I'm taking an Experimental Design course this semester, and have spent
many long hours trying to coax the professor's SAS examples into
something that will work in R (I'd prefer that the things I learn not
be tied to a license). It's been a long semester in that regard.
One thing that has really frustrated me is that lme has an extremely
counterintuitive way for
2005 Oct 26
1
syntax for interactions in lme
Hello,
I am trying to make the switch from SAS, and I have a fairly elemental
problem with syntax using the nlme package for analyzing mixed models.
There was a previous question on this topic posted to this list, so I
apologize for redundancy, but I didn't understand the advice given to
that inquiry. The model I want to run has the following factors:
Host (fixed)
Sire (random)
Dam
2005 Jan 18
1
Randoms interactions in lme
In lme, what's the difference between "random = ~ 1 | x / y" and "random = ~
y | x" ?
Thanks
Julien
[[alternative HTML version deleted]]
2012 May 26
1
Plotting interactions from lme with ggplot
I'm fitting a lme growth curve model with two predictors and their
interaction as predictors. The multilevel model is nested so that level 1 is
time within the individual, and level 2 is the individual. I would like to
plot the mean group-level trajectories at plus and minus 1 SD from the mean
of the main effects composing the interaction term. Thus, the plot should
have 4 lines (mean
2007 Apr 30
2
Independent contrasts from lme with interactions
Hi All,
I've been searching the help archives but haven't found a workable
solution to this problem.
I'm running an lme model with the following call:
>lme.fnl <- lme(Max ~ S + Tr + Yr + Tr:Yr, random = ~1 |TID)
> anova(lme.fnl)
numDF denDF F-value p-value
(Intercept) 1 168 19255.389 <.0001
S 1 168 5.912 0.0161
Tr
2009 Aug 17
1
Multiple comparison on lme model with 2 fixed factors
Hi!
I'm a bit lost while performing multiple comparisons on a lme model of that
type:
lmeglu=lme(glucose~Ath*tim,random=~1|Vol,na.action=na.omit,data=data)
multc = glht(lmeglu, linfct = mcp(Ath = "Tukey", tim = "Tukey"))
This works fine for identifying the effect of each factor. However, when I
look for their interactions, l only obtain error messages.
For example this
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 ~
>
2006 Apr 22
1
Partially crossed and nested random factors in lme/lmer
Hi all,
I am not a very proficient R-user yet, so I hope I am not wasting people?s
time. I want to run a linear mixed model with 3 random factors (A, B, C)
where A and B are partially crossed and C is nested within B. I understand
that this is not easily possible using lme but it might be using lmer. I
encountered two problems when trying:
Firstly, I can enter two random factors in lmer but
2010 Apr 05
1
use of random and nested factors in lme
Dear all,
I've read numerous posts about the random and nested factors in lme,
comparison to proc Mixed in SAS, and so on, but I'm still a bit confused by
the notations. More specifically, say we have a model with a fixed effect F,
a random effect R and another one N which is nested in R.
Say the model is described by Y~F
Can anyone clarify the difference between :
random = ~1|R:N
random
2010 Oct 13
2
LME with 2 factors with 3 levels each
Hello. I am new to R and new to linear mixed effects modeling. I am trying to model some data which has two factors. Each factor has three levels rather than continuous data. Specifically, we measured speech at Test 1, Test 2 and Test 3. We also had three groups of subjects: RepTP, RepNTP and NoRepNTP.
I am having a really hard time interpreting this data since all the examples I have seen
2003 Oct 31
1
cross-classified random factors in lme without blocking
On page 165 of Mixed-Effects Models in S and S-Plus by Pinheiro and Bates
there is an example of using lme() in the nlme package to fit a model with
crossed random factors. The example assumes though that the data is
grouped. Is it possible to use lme() to fit crossed random factors when the
data is not grouped?
E.g., y <- rnorm(12); a=gl(4,1,12); b=gl(3,4,12). Can I fit an additive
model
2007 Jan 12
1
Within-subject factors in lme
Dear R-users
I'm considering a repeated measures experiment where two
within-subject factors A (2 levels) and B (3 levels) have been
measured for each of 14 subjects, S. I wish to test the effect of
factor A. I know that a variance component model with random effects
S, S:A, S:B and S:A:B can be fitted using aov:
aov( y ~ A*B + Error(S/(A*B)) )
If there is no significant interaction, the
2003 Sep 25
0
mixing nested and crossed factors using lme
Hi all,
I have an experiment where 5 raters assessed the quality of 24 web sites. (each rater rated each site once). I want to come up with a measure of reliability of the ratings for the web sites ie to what extent does each rater give the same (or similar) rating to each web site. My idea was to fit a random effects model using lme and from that, calculate the intraclass correlation as a
2011 Jan 14
0
Crossed random factors in lme
Dear all,
I am quite new at R and have a question about using lme with crossed random
factors. I followed the instructions of Pinheiro & Bates, but that did not
work because of the non grouping of my data. Reading prior threads (
http://www.mail-archive.com/r-help@stat.math.ethz.ch/msg10849.html), I found
a solution to deal with non grouped data and crossed random factors in lme,
by defining
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
2007 Apr 03
2
the numimum number of fixed factors lme package can deal with
Hello,
In my study, mixed effects model is required and the number of fixed
effects is very large. When lme package is employed, a model error is
displayed once the number of fixed factors in the formula reaches 200. Is
this the maximum number of fixed factors can be handled by lme package?
If not, what is possible reason of the error message?
Thanks
Yongxiang
2004 Sep 01
1
lme: howto specify covariance structure between levels of grouping factors
Dear all,
I am studying the possibility of using the nlme package in R to analyse
field trials of agricultural crops. I have a problem with the syntax for the
modelling of variance covariance structures. I can model the within-group
covariance structure using the correlation argument and the covariance
structure between different random effects of the same grouping level using
2007 Jun 21
1
Result depends on order of factors in unbalanced designs (lme, anova)?
Dear R-Community!
For example I have a study with 4 treatment groups (10 subjects per group) and 4 visits. Additionally, the gender is taken into account. I think - and hope this is a goog idea (!) - this data can be analysed using lme as below.
In a balanced design everything is fine, but in an unbalanced design there are differences depending on fitting y~visit*treat*gender or