[R] Problem with qualitative variables in anova

David Winsemius dwinsemius at comcast.net
Fri Apr 29 22:19:40 CEST 2011


Are you working on the same homework problem as user494766?

http://stackoverflow.com/questions/5835605/1-way-anova-in-r-help

--  
David.

On Apr 29, 2011, at 10:43 AM, katerinaaa wrote:

> Hi,
> I am newbie in R programming and I need some help.
>
> I have two columns the first has 1000 values Y/N/U and the other has  
> f/m.
> Like that :
>
> q7  sex
> ======
> U    m
> U     f
> U    m
> N    f
>
> I want to do one way anova parametric and no parametric.
> But I have some problems.
>
> Code:
>
> frameq7 <- data.frame(q7,sex)
> frameq7
>
> r <- aov(q7 ~ sex, data = frameq7)
> summary(r)
>
> I take
> Error in storage.mode(y) <- "double" :
> invalid to change the storage mode of a factor
> In addition: Warning message:
> In model.response(mf, "numeric") :
> using type="numeric" with a factor response will be ignored
>
> Could you help me please to make it wright ?
>
> And finally how can I present this analysis ? with boxplot ?
>
> Thanks a lot
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Problem-with-qualitative-variables-in-anova-tp3483845p3483845.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.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list