[R] Calculate Total CORRECTED SS for non linear regression
michael.eisenring at gmx.ch
Wed Sep 30 13:57:12 CEST 2015
Thanks for your answer.
I am still a bit confused- So that means that the calculation of the " R2"
for my non-linear model is in fact the formula I used in my eample:
CompoundSS <- sum((dta$Compound - mean(dta$Compound))^2)
R2 <- deviance(dta.nls)/CompoundSS
What's then the difference to the normally calculated R2 used for linear
regression? To me it looks the same.
Von: peter dalgaard [mailto:pdalgd at gmail.com]
Gesendet: Mittwoch, 30. September 2015 01:09
An: Michael Eisenring <michael.eisenring at gmx.ch>
Cc: r-help at r-project.org
Betreff: Re: [R] Calculate Total CORRECTED SS for non linear regression
> On 30 Sep 2015, at 02:08 , Michael Eisenring <michael.eisenring at gmx.ch>
> Can anyone tell me how to calculate the Total Corrected SS in R and
> how it can be implemented in my code?
It is just sum((y-mean(y))^2).
Beware that a fair amount of (somewhat silly) contention is going on in this
area, though. In particular, the formula can give negative values, which is
unfortunate if you try calling it "R^2".
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help