Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12915
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Linear regression notebook won't work in Version 9 |
| Date | 2012-12-21 10:38 +0000 |
| Message-ID | <kb1e72$ovc$1@smc.vnet.net> (permalink) |
| References | <20121220081938.8E3EA68E0@smc.vnet.net> |
| Organization | Time-Warner Telecom |
My guess would be that you had assigned a value to x in your v9
session. Make sure that it has been cleared.
$Version
9.0 for Mac OS X x86 (64-bit) (November 20, 2012)
Clear[x]
linearregressionY={{-16.4438,-180.545},{-20.4477,-182.192},{-20.283,-182.437},{-20.2559,-182.424},{-19.1476,-182.498},{-20.0728,-181.393},{-20.1681,-181.986}};
lm=LinearModelFit[linearregressionY,x,x]
FittedModel[-174.329+0.38862 x]
Bob Hanlon
On Thu, Dec 20, 2012 at 3:19 AM, UMass74 <fhasmith@frankandluann.net> wrote:
> Hi:
>
> I'm a relative newbie to Mathematica.
>
> I wrote a notebook that did linear regression on some data. It worked fine in Version 8.
>
> Here are two lines from the Version 8 notebook which works. I still have Version 8 on my laptop. The data is named linearregressionY
>
> linearregressionY//TableForm (* Prints out data table used in regression*)
>
> {{-16.4438,-180.545},{-20.4477,-182.192},{-20.283,-182.437},{-20.2559,-182.424},{-19.1476,-182.498},{-20.0728,-181.393},{-20.1681,-181.986}}
>
>
> lm=LinearModelFit[linearregressionY,x,x] (* Mathematica computes linear regression model *)
>
> Version 8 computes the model and everything works fine in the rest of the notebook.
>
> However, Version 9 on my desktop chokes with the following error message
>
>
> LinearModelFit::ivar: {7.315,8.239} is not a valid variable. >>
>
> Anyone have an idea what's going on? Nothing changed except for upgrading to Version 9...
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Linear regression notebook won't work in Version 9 Bob Hanlon <hanlonr357@gmail.com> - 2012-12-21 10:38 +0000
csiph-web