Re: [R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-02 Thread Peter Ehlers
On 2010-04-02 11:07, Michael Friendly wrote: This is a nice example; thanks for providing it in this form. I tried to trim it down to show fewer groups, but ran into the following errors that I can't understand: ## keep species 1:6 > dataset <- subset(dataset, species < 7) Warning message: In

Re: [R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-02 Thread RICHARD M. HEIBERGER
Michael and others, Here is my complete ancova example http://astro.ocis.temple.edu/~rmh/HH/hotdog.pdf This example, especially in Figure 6, places them in a context of a Cartesian product of models with the intercept having two levels and slope having three levels. It is based on the ancova c

Re: [R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-02 Thread Michael Friendly
This is a nice example; thanks for providing it in this form. I tried to trim it down to show fewer groups, but ran into the following errors that I can't understand: ## keep species 1:6 > dataset <- subset(dataset, species < 7) Warning message: In Ops.factor(species, 7) : < not meaningful for

Re: [R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-01 Thread Peter Ehlers
Steve, Thanks for providing an example (which does, however need a bit of tweaking; BTW, it's usually not a good idea to cbind your data when what you really want is a data.frame). Your guess about some clever way of using abline() is unfortunately not correct - as the help page indicates, the s

Re: [R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-01 Thread RICHARD M. HEIBERGER
## Steve, ## please use the ancova function in the HH package. install.packages("HH") library(HH) ## windows.options(record=TRUE) windows.options(record=TRUE) # hypothetical data beak.lgth <- c(2.3,4.2,2.7,3.4,4.2,4.8,1.9,2.2,1.7,2.5,15,16.5,14.7,9.6,8.5,9.1, 9.4,17.7,15.6,14,6.8,8.5,9.4,10.5

[R] Adding regression lines to each factor on a plot when using ANCOVA

2010-04-01 Thread Steven Worthington
Dear R users, i'm using a custom function to fit ancova models to a dataset. The data are divided into 12 groups, with one dependent variable and one covariate. When plotting the data, i'd like to add separate regression lines for each group (so, 12 lines, each with their respective individual sl