Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2555 > unrolled thread
| Started by | Darren Glosemeyer <darreng@wolfram.com> |
|---|---|
| First post | 2011-05-21 10:46 +0000 |
| Last post | 2011-05-21 10:46 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Re: Question about DurbinWatsonD Darren Glosemeyer <darreng@wolfram.com> - 2011-05-21 10:46 +0000
| From | Darren Glosemeyer <darreng@wolfram.com> |
|---|---|
| Date | 2011-05-21 10:46 +0000 |
| Subject | Re: Question about DurbinWatsonD |
| Message-ID | <ir8565$bcv$1@smc.vnet.net> |
On 5/20/2011 5:37 AM, Gilmar Rodriguez-pierluissi wrote:
> In:
>
> http://reference.wolfram.com/mathematica/RegressionCommon/ref/DurbinWatsonD.html
>
> it says that:
>
> "As of Version 7.0, DurbinWatsonD has become a property of LinearModelFit".
>
> But, when I evaluate:
>
> data = {{0.05, 90}, {0.09, 95}, {0.14, 110}, {0.17, 125}, {0.2, 140}, {0.21, 150}, {0.23, 175}, {0.25, 190}, {0.3, 210}, {0.35, 255}};
>
> LinearModelFit[data, {1, x^2}, x, RegressionReport -> {DurbinWatsonD}]
>
> the above line will not produce the DurbinWatsonD value of 1.14 shown in the example on that web page.
>
> How can I then get the DurbinWatsonD value?
>
> Thank you!
>
> Gilmar Rodriguez Pierluissi
>
LinearModelFit operates differently than the Regress function did.
LinearModelFit generates a FittedModel object from which results such as
"DurbinWatsonD" can be obtained, so you could do the following:
data={{0.05, 90}, {0.09, 95}, {0.14, 110}, {0.17, 125}, {0.2, 140},
{0.21, 150}, {0.23, 175}, {0.25, 190}, {0.3, 210}, {0.35, 255}};
lm=LinearModelFit[data, {1, x^2}, x]
lm["DurbinWatsonD"]
The main advantage of this object-based approach over the way Regress
operated is that you can get additional results after the fitting
without having to re-fit the model.
http://reference.wolfram.com/mathematica/ref/LinearModelFit.html
contains a number of examples and the list of properties available for
linear models.
Darren Glosemeyer
Wolfram Research
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web