[R] unbalanced anova with subsampling (Type III SS)

2011-05-21 Thread Sam Chand
Hello R-users, I am trying to obtain Type III SS for an ANOVA with subsampling. My design is slightly unbalanced with either 3 or 4 subsamples per replicate. The basic aov model would be: fit <- aov(y~x+Error(subsample)) But this gives Type I SS and not Type III. But, using the drop() option: dr

[R] abline by groups

2012-01-20 Thread Sam Chand
Hello, I have 2 variables - x and y, that belong to separate groups. I want to plot all the x and y together, but show separate abline for each group. It can be done in ggplot2, but is there a simpler way to draw ablines by group? e.g., mydata <- data.frame(x = 1:20+rnorm(20, -3, 1), y = seq(1,20,

[R] abline by groups

2012-01-20 Thread Sam Chand
Hello, I have 2 variables - x and y, that belong to separate groups. I want to plot all the x and y together, but show separate abline for each group. It can be done in ggplot2, but is there a simpler way to draw ablines by group? e.g., mydata <- data.frame(x = 1:20+rnorm(20, -3, 1), y = seq(1,20,