[R] SpreadLevelPlot for more than one factor
jfox at mcmaster.ca
Sun Jan 7 15:35:15 CET 2018
Try spreadLevelPlot(breaks ~ interaction(tension, wool), data=warpbreaks) .
I hope this helps,
John Fox, Professor Emeritus
Hamilton, Ontario, Canada
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Ashim
> Sent: Sunday, January 7, 2018 12:08 AM
> To: r-help at r-project.org
> Subject: [R] SpreadLevelPlot for more than one factor
> Dear All,
> I want a transformation which will make the spread of the response at all
> combinations of 2 factors the same.
> See for example :
> boxplot(breaks ~ tension * wool, warpbreaks)
> The closest I can do is :
> spreadLevelPlot(breaks ~tension , warpbreaks) spreadLevelPlot(breaks ~ wool ,
> I want to do :
> spreadLevelPlot(breaks ~tension * wool, warpbreaks)
> But I get :
> > spreadLevelPlot(breaks ~tension * wool , warpbreaks)
> Error in spreadLevelPlot.formula(breaks ~ tension * wool, warpbreaks) :
> right-hand side of model has more than one variable
> What is the corresponding appropriate function for 2 factors ?
> Many thanks,
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help