search for: logwl

Displaying 1 result from an estimated 1 matches for "logwl".

Did you mean: logl
2008 Jun 13
1
nls() vs lm() estimates
...trace = TRUE, algorithm = "default", model = TRUE) summary(WL.nls) ## Scatterplot with fitted model plot(L, W) lines(L, predict(WL.nls), col = "blue", lwd = 2) ## Finding "log(a)" and "b" for log transformed model: log(W) = log(a)+ b*log(L) logWL.lm <- lm(log10(W) ~ log10(L)) summary(logWL.lm) ## Adding model to plot lines(L, 10^coef(logWL.lm)[1]*L^coef(logWL.lm)[2], col="red", lwd=2) ## R-squared for W = a*L^b Rsq.nls <- sum((predict(WL.nls) - mean(W))^2) / sum((W - mean(W))^2) ## R-squared for W = a*L^b with coefs f...