I have a problem with calculating ANOVA with my data in R. The R reports an error when I run ANOVA, it shows"Residual sum squares is 0". How can I solve this problem? By the way, my data is unbalanced data, so I want to try type II or type III ANOVA. This is my data for your reference.
library(car)
#read data
input <- read.csv("input.csv",sep=",",header=TRUE)
#This is my data for ANOVA
treatment fraction data
trt1 F45 -4.15E-05
trt1 F78 -7.24E-05
trt1 F45 -1.65E-05
trt1 F57 -2.22E-06
trt1 F78 -2.78E-05
trt1 F45 -5.13E-05
trt1 F57 -5.96E-05
trt1 F78 -4.09E-05
control F45 -4.42E-05
control F57 -1.11E-05
control F45 -2.73E-06
control F57 -9.02E-07
control F78 -6.37E-06
control F45 -4.70E-06
control F57 -2.73E-06
mod.1 <- lm( data ~ fraction * treatment, input )
Anova( mod.1, type=3 )
Anova( mod.1, type=2 )
Yes, some cells have only one replication, but I can run successfully in other data columns with the same operation, but it reports an error in this data column. I'm strange about this.
Any leads will be appreciated. Mengying
input
as the output of whatdput(input)
gives you, so we have the exact data you are working with. Check that your code runs in a completely new console (which package doesAnova()
come from?). Thank you! $\endgroup$