Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: multiple variable exponential regression
Replies: 1   Last Post: Nov 6, 2013 12:30 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
TARUN REDDY

Posts: 1
Registered: 11/4/13
multiple variable exponential regression
Posted: Nov 4, 2013 2:32 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello,
I was using other nonlinear regression methods but was getting an imaginary solution (a+ib) form

I need to solve y = a0 + (a1*(x1^b1)) + (a2*(x2^b2)) + (a3*(x3^b3))

a0, a1, a2, a3 are known

I have data set for y, x1, x2, x3

I need to calculate b1, b2, b3

I was using following code till (this yields imaginary solutions)

opts = statset ('nlinfit');
opts.RobustWgtFun = 'bisquare';
beta0 = [0, 0, 0, 0];
modelfun
= @(b, x)((100 - 15*(x(2, :).^b(1)))) - (40*((x(3, :).^b(2)))) - (15*((x(4, :).^b(3))))
x = TestData;
y = x(1, :);

[beta, R, J, CovB, MSE] = nlinfit(x, y, modelfun, beta0, opts);
SSresidual=sum(R.^2);
SStotal =sum((y-mean(y)).^2);
rsquare =1-(SSresidual/SStotal);



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.