Question

Use nonlinear regression to estimate α4 and β4 based on the following data. y= α4Xe^(β4X) x...

Use nonlinear regression to estimate α4 and β4 based on the following data.

y= α4Xe^(β4X)

x    0.1 0.2 0.4 0.6 0.9 1.3 1.5 1.7 1.8

y 0.75 1.25 1.45 1.25 0.85 0.55 0.35 0.28 0.14

If you were to use linear regression to find α4 and β4, how would you make the model linear? Plot the data points, the fit to the data using linear and nonlinear regression. What method produces the better estimate

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

clc
clear all
x=[0.1,0.2,0.4,0.6,0.9,1.3,1.5,1.7,1.8]';
y=[0.75,1.25,1.45,1.25,0.85,0.55,0.35,0.28,0.14]';

disp('Values using non linear regression');
f=@(rx) sum((rx(1)*x.*exp(rx(2)*x)-y).^2);
[S,fval]=fminsearch(f,[1,1]);
al14=S(1)
be14=S(2)
A=[ones(length(x),1) x];
b=log(y./x);
S=A\b;
disp('Values using linear regression');
disp('Alpha4=')
al4=exp(S(1))
disp('Beta4=')
be4=S(2)
xx=0.1:0.01:1.8;
yy=al4*xx.*exp(be4*xx);
yy1=al14*xx.*exp(be14*xx);
plot(xx,yy,xx,yy1,x,y,'o');
legend('Linear regression','Nonlinear regression','data points');
disp('Sum of square of error using non linear is ');
disp(fval)
disp('Sum of square of error using linear is ');
disp(sum((al4*x.*exp(be4*x)-y).^2))

MATLAB R2018a EDITOR Search Documentation Log In Find Files -compare▼ 모¡GoTo▼ CommentLeast Breakpoints Run Run andBAdvance R

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Use nonlinear regression to estimate α4 and β4 based on the following data. y= α4Xe^(β4X) x...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT