hth,
Tats
"Lory Chalfoun" <lo...@generation.net> wrote in message
news:v5r1ms7...@corp.supernews.com...
Thanks again.
Okey Laboratory <N/A> wrote in message
news:u24AGSh3...@TK2MSFTNGP11.phx.gbl...
Good luck,
Tats
"Lory Chalfoun" <lo...@generation.net> wrote in message
news:v5r67qd...@corp.supernews.com...
The numerics underlying the XY Chart are far more accurate on
numerically difficult problems than LINEST, so if you see any
discrepancies between the trendline equation and LINEST, then go back to
copying the coefficients from the chart (formatted to scientific with 14
decimal places to avoid rounding)
For a package that is so notoriously bad numerically for probability and
statistics functions the chart trendline is amazingly good. It is much
better numerically than SAS and slightly better numerically than R and
S. Minitab is the only program I have tested that is (barely) better
numerically than Excel's polynomial trendline (Origin 7 may also be, but
I have not been able to get it to display enough figures to tell.
The obvious questions are:
- Why did MS program 2 different solutions for the same problem?
- Why don't they replace the lousy solutions with the better ones that
already exist in the package?
Jerry
<<snip>>
> The obvious questions are:
> - Why did MS program 2 different solutions for the same problem?
LOL. Why did MS program *at least 2* solutions to so many problems?!?
Basic uniform(0,1) variate generation is done, poorly, in three
different ways (at least) within Excel.
> - Why don't they replace the lousy solutions with the better ones that
> already exist in the package?
Now you are getting a little "Zen" on us, my friend.
Regards,
Dave Braden
--
ROT13 e-mail: qoe...@ebpurfgre.ee.pbz
Use what Jerry posted to get you started with LINEST, if you choose. But
please consider what he is telling you: the Chart trendline is
top-notch. You can use a VBA routine to extract the trendline info back
into your cells. Why settle for less than the best, especially when you
have folks here that will walk you through it?
FWIW, Jerry has a PhD in statistics. IMHO, no one in these groups knows
the area better than he. You lucked out.
Regards,
Dave Braden
Microsoft MVP
In article <v5r67qd...@corp.supernews.com>,
"Lory Chalfoun" <lo...@generation.net> wrote:
--
ROT13 e-mail: qoe...@ebpurfgre.ee.pbz
Thanks again to all
Lory
Lory Chalfoun <lo...@generation.net> wrote in message
news:v5r1ms7...@corp.supernews.com...
Is that ever a good idea? :-)
Anyway, as others have pointed out, you can get the trendline equation in a
VBA macro. For example you could put a button or menu item in your workbook
that would automatically put the equation coefficients into the worksheet
where you wanted. You could probably even set it up so that whenever the
trendline changed due to addition of data, it would automatically update the
coefficients in your worksheet.
It's a little messy because the equation returned from the chart is a text
string. You need to parse the string to get the coefficients. If you want
VBA solutions, ask and you shall probably receive.
If you want a numerically stable least squares routine, it cannot
involve computing X'X. You might find Kennedy and Gentle's book
"Statistical Computing" or Lawson and Hanson's book "Solving Least
Squares Problems" helpful.
You could get accuracy comparable to R (not quite as good as Excel's
chart trendline) using Algorithms 75 and 274 from Applied Statistics
(Journal of the Royal Statistical Society, Series C) 23:448-454,1974,
25:323-324,1975, 31:340,1982, 41:458-478,1992, and 43:678,1994. Fortran
code is available on-line at
http://lib.stat.cmu.edu/apstat/75
http://lib.stat.cmu.edu/apstat/274
Alternately, you could download R (free and open source) from
If you are clever, you might be able to pass the data to the R dll from
Excel and return the coefficients back from R to Excel.
Jerry
If you want a numerically stable least squares routine, it cannot
involve computing X'X. You might find Kennedy and Gentle's book
"Statistical Computing" or Lawson and Hanson's book "Solving Least
Squares Problems" helpful.
You could get accuracy comparable to R (not quite as good as Excel's
chart trendline) using Algorithms 75 and 274 from Applied Statistics
(Journal of the Royal Statistical Society, Series C) 23:448-454,1974,
25:323-324,1975, 31:340,1982, 41:458-478,1992, and 43:678,1994. Fortran
code is available on-line at
http://lib.stat.cmu.edu/apstat/75
http://lib.stat.cmu.edu/apstat/274
Alternately, you could download R (free and open source) from
If you are clever, you might be able to pass the data to the R dll from
Excel and return the coefficients back from R to Excel.
You should consider whether you might be overfitting your data.
Jerry