[R] need an R-squared from a nls logistic sigmoid fit

James Salsman james at bovik.org
Mon Jun 6 01:49:41 CEST 2005


Why doesn't nls() produce any kind of R-squared value?  In the absence
of such information, how are we supposed to compare one fit to another
when the y-axis scale changes?

> sm <- nls(y ~ SSfpl(x, miny, maxy, midx, grad))
> summary(sm)

Formula: y ~ SSfpl(x, miny, maxy, midx, grad)

Parameters:
      Estimate Std. Error t value Pr(>|t|)
miny  -0.5845     4.6104  -0.127  0.90524
maxy   7.2680     1.5512   4.686  0.00941 **
midx  16.9187     2.2340   7.573  0.00163 **
grad   1.7283     1.9150   0.903  0.41782
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1

Residual standard error: 1.13 on 4 degrees of freedom

Correlation of Parameter Estimates:
         miny    maxy    midx
maxy -0.6654
midx  0.8936 -0.3221
grad -0.9068  0.8477 -0.6865

>




More information about the R-help mailing list