MathGroup Archive 2005

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

Search the Archive

Re: regress versus fit - force through zero/forceconstant term to zero

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61509] Re: [mg61493] regress versus fit - force through zero/forceconstant term to zero
  • From: Chris Chiasson <chris.chiasson at gmail.com>
  • Date: Thu, 20 Oct 2005 05:01:15 -0400 (EDT)
  • References: <200510200308.XAA12881@smc.vnet.net> <002101c5d532$8e06ab50$0401a8c0@achirana>
  • Sender: owner-wri-mathgroup at wolfram.com

Thank you Dave, that was most timely and informative.
Your reward is:

another question :-[

<< Statistics`LinearRegression`
FAASCalPts = {{1, 0.032`2}, {2, 0.067`2}, {5, 0.183`3}}
FAASCalFit = Fit[FAASCalPts, {ñCaRatio}, ñCaRatio]
FAASCalRegression = Regress[FAASCalPts, {ñCaRatio}, ñCaRatio, \
RegressionReport -> {SummaryReport, BestFit}, IncludeConstant -> False]
FAASCalRegression = Regress[FAASCalPts, {1, ñCaRatio}, ñCaRatio, \
RegressionReport -> {SummaryReport, BestFit}]

The fit points now have their precision specified (well, some of them
do, the integers are assumed to be at infinite precision).

Do you have any thoughts about why Fit seems to give a result that
keeps precision in mind (though it seems to me like there should be
more digits than just 0.4), but Regress is giving out answers as if I
had fed it high precision numbers?

On 10/20/05, David Annetts <davidannetts at aapt.net.au> wrote:
> Hi Chris,
>
> > If I have:
> > <<Statistics`LinearRegression`
> > FAASCalPts={{1,0.032},{2,0.067},{5,0.183}}
> > FAASCalFit=Fit[FAASCalPts,{cCaPos},cCaPos]
> > FAASCalRegression=
> >   Regress[FAASCalPts,{cCaPos},cCaPos,
> >     RegressionReport\[Rule]{SummaryReport,BestFit}]
> >
> > I expect the answer from Fit, but not the one from Regress.
> > Regress seems to be ignoring the fact that I only want the
> > first order (and not the zero/constant order) term.
> >
> > How do I obtain fit diagnostics if I am forcing a 0 for the
> > constant order?
>
> You need IncludeConstant->False as an option for Regress ...
>
>         FAASCalRegression =
>                 Regress[FAASCalPts, {cCaPos}, cCaPos,
>                 RegressionReport -> {SummaryReport, BestFit},
> IncludeConstant -> False
>                 ]
>
> Regards,
>
> Dave.
>


--
Chris Chiasson
http://chrischiasson.com/contact/chris_chiasson


  • Prev by Date: Re: ListSurfacePlot3D
  • Next by Date: Re: Memory use by NMaximize (and NMinimize)
  • Previous by thread: regress versus fit - force through zero/force constant term to zero
  • Next by thread: Re: regress versus fit - force through zero/force constant term to zero