[R] Ajusts in nls

Ronaldo Reis Jr. chrysopa at insecta.ufv.br
Fri Mar 28 19:00:51 CET 2003


Hi,

I make an ajust using NLS.

The ajust is:

> library(nls)
> modelo <- nls(y~a-b*exp(-c*x),start=list(a=100,b=90,c=0.1609))
> summary(modelo)

Formula: y ~ a - b * exp(-c * x)

Parameters:
  Estimate Std. Error t value Pr(>|t|)    
a 115.2527     2.9139   39.55  < 2e-16 ***
b 118.6876     7.8925   15.04  < 2e-16 ***
c   0.1235     0.0171    7.22 2.44e-09 ***
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 

Residual standard error: 13.21 on 51 degrees of freedom

Correlation of Parameter Estimates:
        a      b
b  0.0784       
c -0.6587 0.4612


My doubt is about the model significance, I read in list some questions about 
the nonsense of this, but I need of the model significance and the R^2.

I make this:

modelonulo <- lm(y~1)

> anova(modelo,modelonulo,test="F")
Analysis of Variance Table

Model 1: y ~ a - b * exp(-c * x)
Model 2: y ~ 1
  Res.Df Res.Sum Sq Df Sum Sq F value    Pr(>F)    
1     51       8897                                
2     53      59008 -2 -50111  143.62 < 2.2e-16 ***
---
Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 

And the R^2 is:

> 50111/59008
[1] 0.8492238

It is """correct"""?

Thanks
Ronaldo
-- 
Sutil como gato que vai pegar passarinho.
--
|   // | \\   [*****************************][*******************]
|| ( õ   õ )  [Ronaldo Reis Júnior          ][PentiumIII-600     ]
|      V      [UFV/DBA-Entomologia          ][HD: 30 + 10 Gb     ]
||  /     \   [36571-000 Viçosa - MG        ][RAM: 128 Mb        ]
|  /(.''`.)\  [Fone: 31-3899-2532           ][Video: SiS620-8Mb  ]
||/(: :'  :)\ [chrysopa at insecta.ufv.br      ][Modem: Pctel-onboar]
|/ (`. `'` ) \[ICQ#: 5692561                ][Kernel: 2.4.18     ]
||  ( `-  )   [*****************************][*******************]
||| _/   \_Powered by GNU/Debian W/Sarge D+ || Lxuser#: 205366



More information about the R-help mailing list