In addition, I will indicate that your model
y ~ a + b*(x/305) + c*((x/305)^2) + d*log(305/x) + f*(log(305/x))^2
is linear in a statistical sense linear in coefficients; it should not be linear in x.
You do not need nls for this model, you can use lm ().
But don't forget to look at the function I () to express expressions like (x / 305) ^ 2.
ETA Example:
aDF <- data.frame(x=abs(rnorm(100)), y=rnorm(100)) lm(y ~ 1 + I(x/305) + I((x/305)^2) + log(305/x) + I(log(305/x)^2), data=aDF)
source share