I am running a NLS model in R. The residuals are normally distributed, but the mean of the residuals are not zero. How is this possible?
x <- data.frame( height= c(185, 194,166, 187, 181,177),
weight=c(77,67,79,87,65,64),
age=c(76,89,76,43,56,54))
model <- nls(height ~ a*weight + age*c, data=x, start= list(a=0, c=0))
residuals <- x$height - predict(model,x)
sum(residuals)