Issue 7998

Summary: display equations for regression lines
Product: General Reporter: timmit981 <tmtcomputers>
Component: chartAssignee: kla <thomas.klarhoefer>
Status: CLOSED FIXED QA Contact: issues@graphics <issues>
Severity: Trivial    
Priority: P3 CC: IngridvdM, issues, jbf.faure, myr0ch, robert.pollak, tony.galmiche.ooo
Version: 3.3.0 or older (OOo)Keywords: ms_interoperability, rfe_eval_ok
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
URL: http://specs.openoffice.org/chart/DisplayTrendLineEquations.odt
Issue Type: FEATURE Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Testcasespec for Equations for regression none

Description timmit981 2002-10-01 13:10:05 UTC
I enjoy using the OpenOffice.org suite of utilities, but I have been having
difficulty with the Chart capabilities.  What I would like to see is the ability
to display the equation of the line(linear, logarithmic, or otherwise) when
doing a regression analysis of inputted data.  

I believe that this would enhance the openoffice.org spreadsheet capabilities,
and allow Microsoft Excel users to be better able to analyze their data.  It
would at the least save me from having to use another computer for that purpose
anyway.

If this feature is already implemented please let me know the steps to take to
accomplish this task.

Thank you

Tim Jacox
Comment 1 kla 2002-10-22 09:17:03 UTC
Hi Falko,
one for you.
Comment 2 gmorse 2002-11-15 19:15:32 UTC
This seems to be a duplicate of issue 5289
Comment 3 eric.savary 2003-04-16 15:45:14 UTC
Set to "NEW"
Comment 4 eric.savary 2003-04-16 15:45:51 UTC
Set to "NEW"
Comment 5 falko.tesch 2003-10-08 09:31:12 UTC
Re-assigned to Matthias Müller-Prove for further evaluation.
Comment 6 matthias.mueller-prove 2003-10-08 17:35:24 UTC
to Bettina, our central dispatcher for RFEs
Comment 7 bettina.haberer 2004-11-29 18:01:31 UTC
Reassigned to Björn.
Comment 8 bjoern.milcke 2005-01-28 17:09:35 UTC
->IHA: Sending you these issues so that all unconfirmed enhancements and
features are at one place.
Comment 9 IngridvdM 2005-04-14 14:35:18 UTC
This is a missing feature which we should introduce.
iha -> bm: please take care of this one.
Comment 10 IngridvdM 2005-04-15 14:20:05 UTC
*** Issue 20633 has been marked as a duplicate of this issue. ***
Comment 11 IngridvdM 2005-04-25 13:44:51 UTC
*** Issue 33883 has been marked as a duplicate of this issue. ***
Comment 12 Regina Henschel 2005-06-19 21:49:37 UTC
*** Issue 50963 has been marked as a duplicate of this issue. ***
Comment 13 ap78 2005-07-29 22:35:02 UTC
Any news on the development of this feature?
It's lack is no longher acceptable in a professional tool like OpenOffice. It's
not an enhancement, it's an essential fuctionality for scientific purposes!

When it will be added? Will be the graphics creation be modified to make it more
usable?

Regards
Comment 14 lohmaier 2005-08-27 15:05:24 UTC
*** Issue 39537 has been marked as a duplicate of this issue. ***
Comment 15 enmane 2005-09-04 23:51:02 UTC
Good luck getting a reply from these yahoos of developers.  They work on what
they want, when they want and they wouldn't know an essential piece of code if
it came and stomped on their head.  I've given up and gone back to MSO.  Maybe
in another 10 yrs we'll have the functionality that was common among
spreadsheets 15 yrs ago.  Heck, I'd like the functions to work that worked 6 yrs
ago before Sun bought StarDivision.   Those guys probably laughed all the way to
the bank when they were purchased but they have got to be shaking their heads at
what these rookies are doing with the package now.
Comment 16 bobharvey 2005-09-05 06:41:01 UTC
enmane:
I have some sympathy with what you say.  In a recent discussion on the user
forums there was a wide consensus that the graphing module badly lets down the
suite.  Ther eare big problems with graphical editing too because too many
"modes" of selection with different functions are available.  After all, by the
21st Century there is no shortage of past products to act as "prototypes" for an
improved experience.

I do not know that I would have used such colourful language. It is never good
to alienate ones friends.   But I do think that there is an issue of culture
here, and perhaps it is a model for the general decline of Sun in the hardware
and customer base as well.  If I were in corporate control I think that I would
want to re-establish the focus on users rather than developers.  But the malaise
is also in the marketing and specification.  Between 1.0 and 2.0 we have seen
the rise of the "me too" style of marketing, trying ever harder to emulate a
competing product.  There is no attempt to go beyond what the market already has
and create a new impetus to switch because of innovation.  

So, SUn, here is a metaphor for your whole operation.  Remember the slogan:
Innovate or die!
Comment 17 timmit981 2005-09-10 17:54:42 UTC
Wow, I did not realize until today that it has been 3 years since I reported
this.  It is quite surprising to me that this has still not been implemented
into the OpenOffice suite, which is one of the main reasons why I still use
Microsoft Office as my main office software program.

This is quite a big let down considering OpenOffice is much easier to use than
MSOffice, in my opinion at least, and could be a competitor in the world market
if more functionality of this sort was implemented.

It is a shame that I am no longer recommending OpenOffice to my fellow
classmates at my college because of this one issue, but it severly limits my,
and their, ability to complete scientific analyses of the data we have gathered.

Maybe this will be fully implemented before another 3 years have passed?
Comment 18 kla 2005-09-21 12:20:22 UTC
*** Issue 44072 has been marked as a duplicate of this issue. ***
Comment 19 kla 2005-09-22 07:52:58 UTC
*** Issue 53250 has been marked as a duplicate of this issue. ***
Comment 20 IngridvdM 2005-09-26 14:35:39 UTC
I am sorry that this Issue will not be fixed in OOo 2.0. The chart team is
concentrating on a complete redo of the chart module, which will allow us to fix
more bugs and introduce important new features in future. But in the meanwhile
only very little will happen at the old chart - I am sorry.
Comment 21 kipfer 2005-11-19 17:52:07 UTC
I also enjoy using this suite, but I agree with the comments coming here. 
Linear regression is essential, and no viewable parameters on that regression is
unacceptable.

What makes it worse is that you cannot even identify the method of regression. 
You COULD use the spreadsheet functions to create an equation of best-fit, but
then you are hard pressed to add it as another data series.  While being a bit
cumbersome and onerous for the point-and-click crowd, it at least gives you
flexibility.  At this point, I cannot even find a way to insert a second series
into the chart.

I was doing labs in spreadsheets for Physics over 10 years ago now.  At the
time, we used Quattro Pro.. for DOS.  While there weren't "Wizards" back then,
at least the tool was generic enough to allow us to do just about anything we
needed, and a lot more than any spreadsheet these days does.

Last point on this issue is that while this Issue was first raised here in 2002,
there was an earlier reference on mailing.comp.open-office which received the
same "we're redesigning the chart module" response:  

http://groups.google.com/group/mailing.comp.open-office/browse_thread/thread/66c18445ec2383be/923ef7369b31d651?lnk=st&q=openoffice+calc+regression+line&rnum=1#923ef7369b31d651

Over 4 years and no activity?  A competitor could come and go in that amount of
time.
Comment 22 lars 2006-03-11 17:38:51 UTC
*** Issue 63050 has been marked as a duplicate of this issue. ***
Comment 23 lars 2006-03-25 11:41:13 UTC
*** Issue 63609 has been marked as a duplicate of this issue. ***
Comment 24 bjoern.milcke 2006-03-27 09:35:00 UTC
*** Issue 23909 has been marked as a duplicate of this issue. ***
Comment 25 tybo 2006-05-18 14:52:11 UTC
I agree with that issue, this feature is needed by many users. I hope that this 
issue hasn't be forgotten by developpers.
Expecting the feature in OOo.
Tybo
Comment 26 brendel 2006-11-07 10:54:03 UTC
Also coming  from the scientific community I have to say that I agree with all
of the users comments on this issue. It is unacceptable to be able to calculate
a regression (even logarithmic etc) and not even show the equation that goes
with it. As the equation has been calculated to estimate the fit, the data is
availabe, so it's just a case of adding a button "Show regression equation" and
then add a text field with the equation. This is probably a lot less difficult
than redesigning the whole thing and adding bells and whistles of exotic
options. When I talk to colleagues about using OO, they just laugh and say "
have you had a look at the graphics capabilities. We'll have a look in another
10 years" ....
Comment 27 tybo 2006-11-24 15:03:17 UTC
Could please some developpers take this issue seriously, this one is important 
for many companies and associations, and as said brendel, it is nothing but 
adding a checkbox !
Comment 28 IngridvdM 2006-11-24 15:23:24 UTC
Sorry a checkbox alone does not do anything. The regression parameters have to
be displayed. When they should be displayed in the chart the layout automatism
must reserve the correct place for it. And maybe you want to be able to indicate
a number formatter for the variables and want to be able to manipulate the text
properties like font etc. Move that thing around in the chart. This all needs
then to be saved thus we need to extend the fileformat.
Comment 29 brendel 2006-11-27 08:13:58 UTC
Displaying the equation should not be a problem : it could just be inserted as a
subtitle. And as the subtitle is just a textbox, it can be moved around, the
font can be changed etc. 
By the way, even more professional statistic programs use the subtitle to insert
the regression equation, significance levels and R2. 
Comment 30 IngridvdM 2006-11-27 10:40:13 UTC
That is no solution, as more than one regression curve could be generated.
Comment 31 purveschris 2006-12-05 21:41:11 UTC
I don't expect that adding this feature would be easy, otherwise I'm sure it 
would already be done; however, this really is a make or break feature for a 
lot of people.  iha, would you be willing to set a target milestone for this 
issue item?
Comment 32 IngridvdM 2006-12-05 22:25:34 UTC
Yes, I set this to 2.x as I am willing to do it. But still not sure whether I
can manage it before 3.0.
Comment 33 ap78 2007-01-13 19:55:31 UTC
This feature has been requested many times (since OOo 1.0.1!) because it is
really necessary both for compatibility with Excel, and also to increase the
adoption of OpenOffice.org.

Actually I was expecting this feature to be included in the new Chart module by
default, considering how many times it was requested, but I understand it's not
easy to implement it.

However I'd really prefer to see even an ugly temporary solution instead of
nothing. I work on Linux and each time I've to do regressions, I have to switch
to grace to do them, with a significant time loss.

I really don't understand why it wasn't added before by companies which develop
a personalised edition of OOo like Novell. Maybe some help could come from them.

So...my votes to this request with the hope to see it soon implemented ;-)
Comment 34 gmorehouse 2007-02-23 01:56:40 UTC
Guess what, guys?  You've alienated an entire community by dropping the ball on this mod for nigh on 
*five* years.  I'm a scientist who was until now interested in participating in the open-source revolution.  
However, the lack of this essential functionality cripples this application for anyone doing graphical (read 
scientific) data analysis.  Please get to it sometime soon.  It can't be that hard to display the equation of 
the line if the application is computing the damn line anyway.  If Microsoft can do it....

Please get to this.
Comment 35 gmorehouse 2007-02-23 01:57:29 UTC
Guess what, guys?  You've alienated an entire community by dropping the ball on this mod for nigh on 
*five* years.  I'm a scientist who was until now interested in participating in the open-source revolution.  
However, the lack of this essential functionality cripples this application for anyone doing graphical (read 
scientific) data analysis.  Please get to it sometime soon.  It can't be that hard to display the equation of 
the line if the application is computing the damn line anyway.  If Microsoft can do it....

Please get to this.
Comment 36 jhqpinto 2007-03-25 17:51:58 UTC
The equation for linear regression is available somewhere because it was used
for drawing the regression line... 

What a shame it is currently impossible to see the equation parameters... The
tool I use for getting the equation is called Bill's Excel, by Bill Gates. Oh joy!
Comment 37 bobharvey 2007-03-25 18:05:08 UTC
I have to agree.  5 years is a rather poor response to a sensible request, and
to 44 votes.  Oh, and there are another 46 votes on 5289 as well, reading which
suggests that it is still not in the new chart module.

Look lads, much as I like the product, I need to do this.  It matters.
Comment 38 Regina Henschel 2007-05-03 16:53:43 UTC
*** Issue 76913 has been marked as a duplicate of this issue. ***
Comment 39 bjoern.milcke 2007-05-10 17:30:45 UTC
*** Issue 77177 has been marked as a duplicate of this issue. ***
Comment 40 s1b 2007-05-13 16:25:04 UTC
This is a show stopper for me.  When this is fixed I will be one step closer to
uninstalling MSO.  If OOo were to one-up MS Excel on this feature and improve
the flexibility and functionality of regression curves and equations, the
science and engineering community would have reason to choose Open Office OVER
MS Excel.
Comment 41 brendel 2007-05-16 08:22:15 UTC
I think one could go even further : if OpenOffice could integrate (or serve as a
graphical frontend and data supplier) with an opensource statistical packeg such
as "R", many scientists would rapidly choose OO over MS Office
Comment 42 dudson 2007-05-28 15:09:44 UTC
In an equalation of the regression line please make them movable and also an R 
and R^2 that shows how close the regression line is to the data pointed out. 
Also option to make the regression line start on zero like in word would be 
much appreciated.
Comment 43 Regina Henschel 2007-05-30 13:33:12 UTC
*** Issue 77931 has been marked as a duplicate of this issue. ***
Comment 44 vabijou 2007-06-01 06:36:05 UTC
I'd like to suggest that when regressions are performed, a new sheet (possibly 
named "regression data" could be automatically added to the file that states 
the worksheet/chart/data series the regression is performed on as well as the 
regression type, regression constants, and R^2 value.  Each new regression that 
is performed could add a new section to the "regressions sheet".  If a 
regression is deleted from a chart, its corresponding information on 
the "regressions sheet" should also be deleted.  This should mitigate most or 
all of iha's comments from Fri Nov 24 15:23:24 +0000 2006 in Issue 7998.  While 
it falls short of the ideal solution in which these values are displayed on the 
chart, it would at least be a major step in the right direction.
Comment 45 dudson 2007-06-04 17:35:52 UTC
That is very good and accuratelly brought under words.

Plus that it is possible to tell the regression line to go through the point 
where the two axes of a graph cut eachother. I think it's called origin, not 
sure because English isn't my native language.


(in my last post: I meant like in MS excel not in MS word)
Comment 46 bjoern.milcke 2007-06-14 11:05:32 UTC
Currently, there seems to be a quite easy enhancement at hand: we could show the
regression formula and the R^2 value in the quick help and the status bar for a
selected curve. This, howevver, does not help for print-outs or copying the
formula to the clipboard. See Issue 78442 for this enhancement. There is a
screen shot attached to show how it looks like.
Comment 47 bjoern.milcke 2007-07-23 14:36:36 UTC
Planned for OOo 2.4
Comment 48 dudson 2007-08-02 17:48:28 UTC
Also  R^1 please, it's useful for comparing the R and R^2 in education and 
research
Comment 49 IngridvdM 2007-08-02 18:00:07 UTC
*** Issue 79996 has been marked as a duplicate of this issue. ***
Comment 50 bjoern.milcke 2007-08-03 09:49:15 UTC
R^2 is the value of interest. R^1 would be the square root of R^2, you can
calculate that yourself, and why would you want to compare those values? The
only additional information of R would be a sign, but is that really relevant?

BTW., R^1 is what you get from the API function
XRegressionCurveCalculator::getCorrelationCoefficient(), so you can get this via
a Basic macro.
Comment 51 dudson 2007-08-03 11:10:32 UTC
Oh,if this is possible by a small macro like you 've just described than I 
don't mind not having it in OpenOffice natively.
Comment 52 bjoern.milcke 2007-09-13 15:34:09 UTC
I am currently working on this feature, so I browsed through the huge number of
comments in this issue. It is really amazing that there is not a SINGLE useful
hint about how to implement this. Well, one statement talks about a check-box,
yes that's a start.

This issue also sometimes make me think that I should close it an open a new
one. There are two people working on a complete re-write of a module which took
very look, admittedly, but which was necessary to do this feature. Obvisouly it
is hard to understand, that first things have to come first.  Instead people are
ranting about ignoring users. Just want to remind everybody:

1. OOo is for free, it is open-source. Everybody can participate in its
development. I admit that getting started with OOo development is not easy, but
it is possible, and there have been patch submissions for bugs and features in
the chart already. And nobody who wrote anything into this issue can blame us
for not dealing with this feature for five years. If this was important to you,
you would have had five years to implement this yourself. Should be no problem
(according to those people).

2. OOo is developed in a community. That means that there is no "us" and "you".
"We" do not have the duty to do anything "you" want. "We all" have to work
together in a constructive way. As long as all the (two) developers for the
chart are payed by Sun Microsystems, it should also be clear that the influence
of this company to decide what features are implemented in which order, is quite
high.

3. Most of the people in the world are not scientists. Most of the people
working with OOo don't know what a regression curve is. Even more people don't
know what R^2 is. Just keep this in mind, when thinking about priorities of
features.

->tonygalmiche: Thanks tony for you help with the specification, which actually
is a competetive analysis to Excel.  I am not sure if it is wise to always just
copy Excel, but it gives ideas of how other people do it at least.
Comment 53 ap78 2007-09-13 19:57:34 UTC
@bm

First of all, thanks for working on this issue. :-)

>1. OOo is for free, it is open-source. Everybody can participate in its
>development. I admit that getting started with OOo development is not easy, but
>it is possible, and there have been patch submissions for bugs and features in
>the chart already. And nobody who wrote anything into this issue can blame us
>for not dealing with this feature for five years. If this was important to you,
>you would have had five years to implement this yourself. Should be no problem
>(according to those people).

The fact that OpenOffice.org is free doesn't count much. SUN decided to
distribute it for free, and it is not a justification for lack of feature or
slow development.

Telling that if nobody added this feature, the feature is not important is not
exact. Many users have not enough knowledge nor time to learn to add features to
OOo, but an expert coder should not have many issues. The algorithms are out
there in all languages, and efficiently implemented in various libraries, among
which there's GSL.

>2. OOo is developed in a community. That means that there is no "us" and "you". 
>"We" do not have the duty to do anything "you" want. "We all" have to work
>together in a constructive way. As long as all the (two) developers for the
>chart are payed by Sun Microsystems, it should also be clear that the influence
>of this company to decide what features are implemented in which order, is
>quite high.

There evidently is a "you" (developers) and a "us" (users). And a lot of OOo
users can't code, but you are right, we should work together. To do this
however, it is necessary to communicate. And if it's true no one suggested how
to implement this feature, no one asked for ideas and tried to communicate with
users' community, so the responsibility is on both sides.

I can understand that SUN influence is high, but if they ignored the chart
module for such a long time, they clearly have some issues in their decision
process. Just consider these two points:

- The XY plot is the most used in schools, and in a XY plot usually sets have
different number of elements. Trend lines and error bars are widely used too.
The lack of these functionalities directly excluded OOo from the adoption in
schools and universities, but also in labs and scientific institutes.

- Having functionalities required in schools is having a product which probably
will be adopted on a wider scale, because if people use it at school, they will
use it for their work too.

>3. Most of the people in the world are not scientists. Most of the people
>working with OOo don't know what a regression curve is. Even more people don't
>know what R^2 is. Just keep this in mind, when thinking about priorities of
>features.

Right. But most people go to school. Most people, at least once in their life
plays with plots, curves, analytical geometry, experimental data. It's quite
common to do lab experiments in high school for example, and to have to process
small amount of data, plot them to compare their trends and so on. A good
spreadsheet can be used in various ways for educational purposes.

With kind regards.
Comment 54 stair 2007-09-26 21:38:17 UTC
Just looked at the new charts in ooo2.3, much better, good job guys.

Now some thoughts on trend line plots and equations, I hate to say it but excel
functionality is a very good place to start although there is more it could do.

Key for me that is missing altogether in ooo is polynomial fit, I use it a lot!
 It would also be very good to be able to user define an arbitrary form of the
equation to fit to.

In addition to printing the equation on the chart it would be extremely useful
to be able to output the co-efficients to cells in the worksheet so that they
can be used directly elsewhere.

Finally if the chart module ever supports plotting surfaces (is there an issue
for this request?) then extend the trend line plots to cover that case as well
although I do understand that this is a rather more difficult problem.

A final thought, please don't look at excel and think that that is enough,
always strive to make ooo better and offer that extra bit that excel is never
likely to have but can make all the difference to certain users

Stair
Comment 55 jimplante 2007-09-29 15:16:44 UTC
I'm sorry you developers got flamed by people who profess to study statistics and who don't appear 
know how to substitute the slope and intercept into Y=mX+b in a text cell to one side of the graph. 
Hell, it can even be automated to a certain extent using the text, slope, and intercept functions already 
in Calc. Like so: ="Y=" & ROUND(SLOPE(A2:A22;B2:B22),2) & " X + " & 
ROUND(INTERCEPT(A2:A22;B2:B22),2). For R^2, use this: ="R-square 
="&ROUND(INDEX(LINEST(A2:A22;B2:B22;1;1);3;1);2)

For me, that equation box would be nice to have, but it's not a deal killer. Seems to me that there are a 
few scientists commenting here who need to broaden their horizons and learn to use the rest of their 
spreadsheet formulas.

But, as others have said, I'd like to have the means to display more than one regression line on the 
graph.


Comment 56 camcorder 2007-10-15 16:46:27 UTC
jimplante: linest function won't generate correct regression equation. For same
data values I get y=281.7812 x + 79.1733 value from oo.o 2, but excell's
equation is y = 0.0368x - 0.0935. 

It's not linest works differently on excell (same formule in excell's cell gives
same regression equation as oo.o), but problem is drawing of regression line for
oo.o. Linest are different for excell and oo.o as well. Excell's regression line
is much more accurate than oo.o's regression line. 

So it's not only calculation also problem relies on oo.o's regression line
drawing as well. 
Comment 57 bjoern.milcke 2007-10-25 14:02:28 UTC
Fixed in CWS chart17 :-)

Specification is approved by user-experience.
Comment 58 bjoern.milcke 2007-10-31 17:29:54 UTC
*** Issue 83124 has been marked as a duplicate of this issue. ***
Comment 59 stair 2007-11-01 20:49:10 UTC
Bjorn,  I am really glad that this function has found its way into the chart in
a more serious way

Please look at my comments from 26 September for general thoughts.  While some
of  the suggested features are perhaps a bit ambitious I do think that the
polynomial fit is essential, please make sure it makes it on to the road map
even if it needs to wait for a later release

Stair
Comment 60 bjoern.milcke 2007-11-06 13:42:05 UTC
Please verify in CWS chart17
Comment 61 kla 2007-11-16 14:26:18 UTC
Created attachment 49695 [details]
Testcasespec for Equations for regression
Comment 62 kla 2007-11-16 14:27:01 UTC
seen ok in cws -> verified
Comment 63 Regina Henschel 2007-11-25 22:17:13 UTC
*** Issue 83937 has been marked as a duplicate of this issue. ***
Comment 64 IngridvdM 2008-01-31 20:25:13 UTC
*** Issue 5289 has been marked as a duplicate of this issue. ***
Comment 65 kla 2008-04-21 14:50:51 UTC
closed