Hi,
The "Trendline" utility does minimize the SSR to optimize the paramters.
You can accomplish the same task with the "Solver" Add-in in Excel, where
minimization of the SSR is more explicit. Please note that the Add-in should
have been installed in Excel for invoking it (for that, "Tools" -->
"Add-Ins", check "Solver Add-In...--> "OK"; Excel might ask for the Microsoft
Excel or Office CD)
Have two helper cells (say E1 and F1) to place the values for A
(y-intercept) and B (slope) respectively. You could just enter 1.0 as
initial guess values for A and B.
In C1, enter the formula =$E$1+$F$1*A1 [This formula calculates Y based on
the guess values of A and B and the X-value in cell A1]. Fill-in the formula
down column to C100 [Thus Column C1:C100 contains calculated y values].
In D1 enter the formula, =SUMXMY2(B1:B100,C1:C100) [This formula calculates
the SSR]
Now, "Tools" --> "Solver" --> for 'Set Target Cell', click on D1 (it would
show up as $D$1), check the "Min" button, and for 'By Changing Cells', select
E1 and F1 (it would show up as $E$1:$F$1), click "Solve" button. Solver
would perform iterations and optimize E1 and F1 to minimize D1 (SSR).
If you want, you can modify the optimization preferences (e.g., making the
convergence criterion more stringent) by clicking on "Options" before
clicking "Solve". If you want to see the outcome of each iteration, check
"Show Iteration Results". Solver would pause after each iteration, and you
can see the updated values of the slope and the y-intercept vis-a-vis the SSR.
Regards,
B. R. Ramachandran
bioyyy said:
B.R.,
Thanks for replying, but it's not what I am looking for is to minimise the
sum of squared residuals (SSR) of y after the initial slope and intercept are
determined. So that more reliable slope and intercept estimations are
obtained. Usually it takes about 3-5 iterations. BUT I really don't know how
to this. Thanks again,