Skip to content

cooks distance for repeated measures anova

2 messages · Walker Scott Pedersen, Tom Woolman

#
Hi all,

Is there a way to get cook's distance for a repeated measures anova? Neither cooks.distance or CookD from the predictmeans package seem to allow for this.  For example, if I have the model

data(iris)

mod<-aov(Sepal.Length  ~ Petal.Length + Petal.Width + Error(Species), data=iris)

both

cooks.distance(mod)

and

library(predictmeans)
CookD(mod, group=Species)

give an error saying they don't support an aovlist object.

I would prefer a method to get a cook's distance for each category in my repeated factor (i.e. Species), rather than each observation.

Thanks!


--
Walker Pedersen, Ph.D.
Center for Healthy Minds
University of Wisconsin -- Madison
#
Hi Dr. Pedersen.

I haven't used cook's on an aov object but I do it all the time from  
an lm (general linear model) object, ie.:

mod <- lm(data=dataframe)
cooksdistance <- cooks.distance(mod)



I *think* you might be able to simulate an aov using the lm functon by  
selecting the parameter in lm to calculate the type 1 sum of squares  
error that would be provided by the aov function.


FYI I'm using Cook's in my case as part of an anomaly detection engine  
based on a linear model interaction.




Quoting Walker Scott Pedersen <wsp at uwm.edu>: