MathGroup Archive 1997

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

Search the Archive

Re: NonlinearFit in the Mma on-line book

  • To: mathgroup at smc.vnet.net
  • Subject: [mg6373] [mg6373] Re: [mg6336] NonlinearFit in the Mma on-line book
  • From: "Preferred Customer" <sherman.reed at worldnet.att.net>
  • Date: Fri, 14 Mar 1997 14:54:16 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Laura,

<< Statistics`NonlinearFit`

data = {{1.0, 1.0, .126}, {2.0, 1.0, .219},
{1.0, 2.0, .076}, {2.0, 2.0, .126}, {.1, .0, .186}};

NonlinearFit[data,
theta1 theta3 x1 / (1 + theta1 x1 + theta2 x2),
{x1, x2}, {theta1, theta2, theta3}]

BestFitParameters /. NonlinearRegress[data,
theta1 theta3 x1 / (1 + theta1 x1 + theta2 x2),
{x1, x2}, {theta1, theta2, theta3},
RegressionReport -> BestFitParameters]

Try the following code.  It worked for me.

I think you did not have the data statement with numbers.

If trouble send me the code you used and I will
look at it.

Sherman Reed
----------
> From: Laura Thompson <lthompso at s.psych.uiuc.edu>
To: mathgroup at smc.vnet.net
> To: mathgroup at smc.vnet.net
> Subject: [mg6373] [mg6336] NonlinearFit in the Mma on-line book
> Date: Tuesday, March 11, 1997 12:29 AM
> 
> 
> Hello
> When I loaded StatisticsNonlinearFit, I got the msg that NonlinearFit 
> was used by many packages so some commands or such might be shadowed by
> more global terms.  Then when I tried to reproduce the example in the Mma
> book on-line (3.0), nothing evaluates, even when I tried it inside the 
> example.
> 
> The example has:
> 
> << Statistics`NonlinearFit`
> data = {{x1,x2,y},...}  THIS IS PROBABLY THE MISTAKE
> 
> NonlinearFit[data, theta1 theta3 x1 / (1 + theta1 x1 + theta2 x2),
> {x1,x2}, {theta1, theta2, theta3}]
> 
> The helpfile prints an expression in x1 and x2..what you would expect to
> happen, but if you actually activate the cells, you get the NonlinearFite
> fcn printed again, with nothing evaluated.
> 
> Is it caused by the first msg I got?
> How can I get NonlinearFit to work?
> 
> Thank you,
> Laura


  • Prev by Date: system of equations
  • Next by Date: Re: Plot bug?
  • Previous by thread: NonlinearFit in the Mma on-line book
  • Next by thread: Directing graphics output