Re: [R] wroung groupedData despite reading Bates and Pinheiro 3 times

From: hpdutra <hpdutra_at_yahoo.com>
Date: Sat, 19 Jul 2008 13:43:04 -0700 (PDT)

Hi Milton, I tried this and it worked.
But the block structure isn't right because when I try to plot this I still get an error message
traps<-groupedData(mice~tree|plotID,outer=~time*fruit*veget|block,data=trap)
> plot(traps,outer=T)

I guess my question is should I try to fit a more simple grouped data structure and leave the formula of my model to deal with it? All I want is to generate a 3 graphs, one for each block, with mice as the response variable, time as the x axis and the different treatments as lines. I know I can do that using lattice. But I want to run my model after that, so I need to get the groupedData correct.

Thank you very much

Humberto Dutra

try

trap$time<-factor(trap$time)
 trap$block<-factor(trap$block)

On 7/19/08, hpdutra <hpdutra_at_yahoo.com> wrote:
>
>
> Hi everyone. I am trying to add a formula to my data using the
> groupedData
> function.
>
> So I tried to fit the following structure to my data.
> >
> traps<-groupedData(mice~tree|plotID,outer=~time*fruit*veget|block,data=trap)
>
> but time and block are still considered to be numeric, while in fact they
> should be factor and ordered, respectively.
> > sapply(traps,data.class)
> mice plotID veget fruit time block tree
> "numeric" "ordered" "factor" "factor" "numeric" "numeric" "numeric"

>
>

-- 
View this message in context: http://www.nabble.com/wroung-groupedData-despite-reading-Bates-and-Pinheiro-3-times-tp18548213p18548416.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
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.
Received on Sat 19 Jul 2008 - 20:47:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 19 Jul 2008 - 22:32:03 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive