MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Mathematica calculates RSquared wrongly?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112695] Mathematica calculates RSquared wrongly?
  • From: Lawrence Teo <lawrenceteo at yahoo.com>
  • Date: Mon, 27 Sep 2010 05:47:13 -0400 (EDT)

sbbBN = {{-0.582258428`, 0.49531889`}, {-2.475512593`,
    0.751434565`}, {-1.508540016`, 0.571212292`}, {2.004747546`,
    0.187621117`}, {1.139972167`, 0.297735572`}, {-0.724053077`,
    0.457858443`}, {-0.830992757`, 0.313642502`}, {-3.830561204`,
    0.81639874`}, {-2.357296433`, 0.804397821`}, {0.986610836`,
    0.221932888`}, {-0.513640368`, 0.704999208`}, {-1.508540016`,
    0.798426867`}};

nlm = NonlinearModelFit[sbbBN, a*x^2 + b*x + c, {a, b, c}, x]
nlm["RSquared"]


The RSquared by Mathematica is 0.963173
Meanwhile, Excel and manual hand calculation show that R^2 should be
equal to 0.7622.

Is Mathematica wrong? Thanks!



  • Prev by Date: Re: Row or column?
  • Next by Date: Re: Row or column?
  • Previous by thread: Re: Graphics3D without perspective
  • Next by thread: Re: Mathematica calculates RSquared wrongly?