Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12876 > unrolled thread

Linear regression notebook won't work in Version 9

Started byUMass74 <fhasmith@frankandluann.net>
First post2012-12-20 08:19 +0000
Last post2012-12-21 10:37 +0000
Articles 2 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Linear regression notebook won't work in Version 9 UMass74 <fhasmith@frankandluann.net> - 2012-12-20 08:19 +0000
    Re: Linear regression notebook won't work in Version 9 UMass74 <fhasmith@frankandluann.net> - 2012-12-21 10:37 +0000

#12876 — Linear regression notebook won't work in Version 9

FromUMass74 <fhasmith@frankandluann.net>
Date2012-12-20 08:19 +0000
SubjectLinear regression notebook won't work in Version 9
Message-ID<kauhls$iq4$1@smc.vnet.net>
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...

[toc] | [next] | [standalone]


#12907

FromUMass74 <fhasmith@frankandluann.net>
Date2012-12-21 10:37 +0000
Message-ID<kb1e5g$oui$1@smc.vnet.net>
In reply to#12876
Several people suggested clearing the variable, which was indeed my problem.

Thanks to all who took the time to contact me.

Regards

On Thursday, December 20, 2012 3:19:08 AM UTC-5, UMass74 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...

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web