On Tue, 30 May 2000, Xiao Gang Su wrote:
>
>
> Hi, all,
>
> I was trying to facilitate a repeated measures analysis on a simulated
> data with Splus 2000. And I kept getting the error message as below.
> Is there anyone who can help me with the problem?
>
>
> > data.uni <- cbind(id = rep(1:4, rep(3, 4)),
> time = rep(paste("time",1:3,sep=""), 4),
> group = as.factor(rep(c(1, 2, 2, 3), rep(3, 4))),
> y = rnorm(3 * 4))
> > summary(aov(y ~ group * time + Error(id), data = data.uni))
> Warning messages:
> Numerical expression has 48 elements: only the first used
> Error: Object "id" not found
>
> Thanks in advance for your help.
I think you want data.uni to be a data frame. Replace cbind by data.frame.
Next, I think you mean id to be a factor too.
data.uni <- data.frame(id = factor(rep(1:4, rep(3, 4))),
time = rep(paste("time",1:3,sep=""), 4),
group = factor(rep(c(1, 2, 2, 3), rep(3, 4))),
y = rnorm(3 * 4))
summary(aov(y ~ group * time + Error(id), data = data.uni))
gives sensible reults here.
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|