Error reports "Residual sum squares is 0" in ANOVA analysis in R 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
 A: The car:::ANOVA.lm function tests if the model's deviance (its residual sum of squares) is below a precision limit:
input <- read.table(text = "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", header = TRUE)

mod.1 <- lm( data ~ fraction * treatment, input )
Anova( mod.1, type=2 )
#Error in Anova.lm(mod.1, type = 2) : 
#  residual sum of squares is 0 (within rounding error)

deviance(mod.1) < sqrt(.Machine$double.eps)
#[1] TRUE

This test is probably done to avoid numeric issues due to floating point precision.
I suggest you simply rescale your dependent variable. This also rescales the residuals and the resulting sum of squares.
mod.2 <- lm( I(data * 1e6) ~ fraction * treatment, input )
library(car)
Anova( mod.2, type=2 )
#Anova Table (Type II tests)
#
#Response: I(data * 1e+06)
#                   Sum Sq Df F value  Pr(>F)  
#fraction            360.1  2  0.3605 0.70697  
#treatment          2375.6  1  4.7566 0.05709 .
#fraction:treatment  229.9  2  0.2302 0.79891  
#Residuals          4495.0  9                  
#---
#Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

