Displaying 20 results from an estimated 10000 matches similar to: "specifying repeated measures model in lmer"
2007 May 13
2
Some questions on repeated measures (M)ANOVA & mixed models with lme4
Dear R Masters,
I'm an anesthesiology resident trying to make his way through basic
statistics. Recently I have been confronted with longitudinal data in
a treatment vs. control analysis. My dataframe is in the form of:
subj | group | baseline | time | outcome (long)
or
subj | group | baseline | time1 |...| time6 | (wide)
The measured variable is a continuous one. The null hypothesis in
2008 Dec 17
1
repeated measures aov with weights
Dear R-help,
I'm facing a problem with defining a repeated measures anova with
weighted data.
Here's the code to reproduce the problem:
# generate some data
seed=11
rtrep <- data.frame(rt=rnorm(100),ti=rep(1:5,20),subj=gl
(20,5,100),we=runif(100))
# model with within factor for subjects/repeated measurements, no
problem
aov(rt~ti + Error(subj/ti),data=rtrep)
#model with weights
2008 Feb 05
1
Extracting level-1 variance from lmer()
All,
How does one extract the level-1 variance from a model fit via lmer()?
In the code below the level-2 variance component may be obtained via
subscripting, but what about the level-1 variance, viz., the 3.215072 term?
(actually this term squared) Didn't see anything in the archives on this.
Cheers,
David
> fm <- lmer( dv ~ time.num*drug + (1 | Patient.new), data=dat.new )
2003 Dec 17
1
repeated measures aov problem
Hi all,
I have a strange problem and rigth now I can't figure out a
solution.
Trying to calculate an ANOVA with one between subject factor (group)
and one within (hemisphere). My dependent variable is source
localization (data). My N = 25.
My data.frame looks like this:
> ML.dist.stack
subj group hemisphere data
1 1 tin left 0.7460840
2 2 tin left
2007 May 16
1
lmer error confusion
Hi All.
I'm trying to run a simple model from Baayan, Davidson, & Bates and getting
a confusing error message. Any ideas what I'm doing wrong here?
# Here's the data.....
Subj <- factor(rep(1:3,each=6))
Item <- factor(rep(1:3,6))
SOA <- factor(rep(0:1,3,each=3))
RT <-
c(466,520,502,475,494,490,516,566,577,491,544,526,484,529,539,470,511,528)
priming
2002 Oct 08
3
repeated measures help; disagreement with SPSS
Hi, all.
I have a simple design I'm comparing to output from SPSS.
the design is 1 repeated measure (session) and 1 between measure
(cond). my dependent measure is rl. here is the data I'm using (in a
data.frame):
mig <- data.frame(subj=factor(rep(subj,3)),
cond=factor(rep(cond,3)),
session=factor(c(rep(1,nsubj),rep(2,nsubj),rep(3,nsubj))),
2007 Aug 02
6
Error message in lmer
I do not think anyone has answered this.
> I'm trying to run a simple one-way ANCOVA with the lmer
> function in R package lme4, but have encountered some
> conceptual problem. The data file MyData.txt is like this:
>
> Group Subj Cov Resp
> A 1 3.90 4.05
> A 2 4.05 4.25
> A 3 4.25 3.60
> A 4 3.60 4.20
> A 5 4.20 4.05
> A 6 4.05 3.85
2008 May 28
2
Tukey HSD (or other post hoc tests) following repeated measures ANOVA
Hi everyone,
I am fairly new to R, and I am aware that others have had this
problem before, but I have failed to solve the problem from previous
replies I found in the archives.
As this is such a standard procedure in psychological science, there
must be an elegant solution to this...I think.
I would much appreciate a solution that even I could understand... ;-)
Now, I want to calculate a
2012 May 10
2
Outcome~predictor model evaluation, repeated measurements
Dear all,
I have simple question regarding how to fit a model (i.e. linear) to the
data.
Say I have 10 subjects with different phenotypes (dependent var Y,
identical for a particular subject) and one predictor variable measured 3
times for each subject (X). By other words:
Y Subj X
1 1 1.2
1 1 1.3
1 1 0.7
3 2 2.1
3 2 2.5
3 2 4
5 3 3
5 3 4
5 3 4
...
20 10 12
20 10 13
20 10 12.5
Subj is a
2012 Dec 02
1
Repeated-measures anova with a within-subject covariate (or varying slopes random-effects?)
Dear all,
I am having quite a hard time in trying to figure out how to correctly
spell out a model in R (a repeated-measures anova with a
within-subject covariate, I guess). Even though I have read in the
posting guide that statistical advice may or may not get an answer on
this list, I decided to try it anyway, hoping not to incur in
somebody's ire for misusing the tool.
For the sake of
2007 Apr 13
2
replicates in repeated ANOVA
Hi,
I have sort of a newbie question. I've seriously put a lot of effort into how to handle simple replicates in a repeated ANOVA design, but haven't had much luck.
I really liked reading "Notes on the use of R for psychology experiments and questionnaires", by Jonathan Baron and Yuelin Li ( http://www.psych.upenn.edu/~baron/rpsych/rpsych.html ) but still didn't run across
2010 Mar 01
4
repeated measures anova, car package
Hello list,
I' d very much appreciate some help with a two sample repeated measures
ANOVA.
I did the analysis yielding sign. main effects (between subj.=site, within
subj.=cover) and a sign. interaction:
Univariate Type II Repeated-Measures ANOVA Assuming Sphericity
SS num Df Error SS den Df F Pr(>F)
site 18.7620 1 18.831 10 9.9631 0.010220 *
2007 May 17
2
repeated measures regression
How does one go about doing a repeated measure regression? The
documentation I have on it (Lorch & Myers 1990) says to use linear /
(subj x linear) to get your F. However, if I put subject into glm or
lm I can't get back a straight error term because it assumes
(rightly) that subject is a nominal predictor of some sort.
In looking at LME it seems like it just does the right thing
2004 Aug 08
1
(REPOST) Simple main effects in 2-way repeated measure ANOVA
Hi all
I am running a 2-way repeated measure anova with 1 between-subjects
factor (Group=treatment, control), and 1 within-subject factor (Time of
measurement: time1, time2). I extract the results of the anova with:
summary(aov(effect ~ Group*Time + Error=Subj/Time, data=mydata))
Now, this must be clearly a dumb question, but how can I quickly
extract in R all the post-hoc t-tests for the
2005 Sep 09
2
Discrepancy between R and SPSS in 2-way, repeated measures ANOVA
Dear R community,
I am trying to resolve a discrepancy between the way SPSS and R handle
2-way, repeated measures ANOVA.
An experiment was performed in which samples were drawn before and after
treatment of four groups of subjects (control and disease states 1, 2 and
3). Each group contained five subjects. An experimental measurement was
performed on each sample to yield a
2008 Dec 20
1
How test contrasts/coefficients of Repeated-Measures ANOVA?
Hi all,
I'm doing a Repeated-Measures ANOVA, but I don't know how to test its
contrasts or where to find the p-values of its coefficients. I know
how to find the coefficient estimates of a contrast, but not how to
test these estimates.
First I do something like:
y.aov <- aov(y ~ fac1 * fac2 + Error(subj/(fac1 * fac2)), data=data)
Then, with
coef(y.aov)
I get the coefficients
2011 Sep 23
1
Correlation of variables with repeated measures.
Hello
I have a dataframe that looks like this:
Date Min Subj VAR1 VAR2 VAR3
1 8/30/2011 5min 1 34.41042 126.08490 55.3548387
2 8/30/2011 10min 1 34.53030 133.81343 61.6000000
3 8/30/2011 15min 1 34.66297 118.38193 11.8000000
4 8/30/2011 20min 1 34.82770 110.77767 6.6000000
5 8/30/2011 5min 2 36.36994 116.24861 41.2258065
6 8/30/2011 10min 2
2008 Apr 02
1
interactive rotating graphics
Dear Colleagues,
Seems I had in the past run across the capability to create a
three-dimensional scatterplot where I could use the mouse to "grab"
the plot and rotate the axes with the mouse. I have used RSiteSearch
and found a few things (e.g., TeachingDemos, iplot) but cannot find
the package/function that does the above. There was also the
capability to use the mouse to select and
2004 Aug 05
1
Post-hoc t-tests in 2-way repeated measure ANOVA
Hi all
I am running a 2-way repeated measure anova with 1 between-subjects
factor (Group=treatment, control), and 1 within-subject factor (Time of
measurement: time1, time2). I extract the results of the anova with:
summary(aov(effect ~ Group*Time + Error=Subj/Time, data=mydata))
Now, this must be clearly a dumb question, but how can I quickly extract
in R all the post-hoc t-tests for the
2005 Feb 25
0
Repeated measures MANOVA
Hi,
sorry to bother you again, but I can't figure it out myself and I also
can't find any in-depth documentation about it...
Consider the following SAS code (A1II2... contain the measurements for
40 subjects):
proc glm;
model
A1II2
A1IN2
A1NI2
A1NN2
= /nouni;
repeated CONTEXT 2, TARGET_SATZ 2;
title "A1 500-900 ms";
This produces not only the univariate ANOVAs, but also a