[R] Getting Sphericity Tests for Within Subject Repeated Measure Anova (using "car" package)

Mike Lawrence Mike.Lawrence at dal.ca
Mon Nov 9 21:25:44 CET 2009


Have you tried ezANOVA from the ez pacakge? It attempts to provide a
simple user interface to car's ANOVA (and when that fails, aov).

On Mon, Nov 9, 2009 at 1:44 PM, Sergios (Sergey) Charntikov
<sergioschr at gmail.com> wrote:
> Hello everyone,
>
> I am trying to do within subjects repeated measures anova followed by the
> test of sphericity (sample dataset below).
> I am able to get either mixed model or linear model anova and TukeyHSD, but
> have no luck with Repeated-Measures Assuming Sphericity or Separate
> Sphericity Tests.
> I am trying to follow example from "car" package, but it seems that I am not
> getting something right.
>
>> Dataset$Sessn <- as.factor(Dataset$Sessn)
>
>> LinearModel.1 <- lm(Response ~ Sessn*Trtmt, data=Dataset)
>
>> summary(LinearModel.1)
>
> All, good so far, but I have problem understanding "idata=" and "idesign="
> functions pertaining to my example.  Session is my repeated measure (Sessn 1
> and Sessn 2 = two sessions, in reality I have more) and it is already
> stacked. Any help or guidance on this matter.
>
> Thank you, my mock dataset is below.  Each subject has two levels of
> treatment throughout four calendar days which are recoded to Session 1 and
> Session 2 in order to compare treatments by the first and subsequent days of
> exposure (Treatment x Session; my DV is Response; Session is repeated).
>
>    Subj Trtmt Sessn Response  1 N 1 5  1 D 1 6  1 N 2 4  1 D 2 7  2 N 1 8
> 2 D 1 9  2 N 2 2  2 D 2 1  3 N 1 4  3 D 1 5  3 N 2 6  3 D 2 2  4 N 1 5  4 D
> 1 6  4 N 2 4  4 D 2 7  5 N 1 8  5 D 1 9  5 N 2 2  5 D 2 1  6 N 1 4  6 D 1 5
> 6 N 2 6  6 D 2 2
>
> Sincerely,
>
> Sergios Charntikov (Sergey), MA
>
> Behavioral Neuropharmacology Lab
> Department of Psychology
> University of Nebraska-Lincoln
> Lincoln, NE 68588-0308  USA
>
> sergioschr-at-gmail-dot-com
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>



-- 
Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University

Looking to arrange a meeting? Check my public calendar:
http://tr.im/mikes_public_calendar

~ Certainty is folly... I think. ~




More information about the R-help mailing list