Hello, i try to get the equation of a regression curve in StarBasic. The situation is:
in a calc sheet is a diagramm and when i mark the diagram and mark the regression curve (in the diagram) too, then i can see, in the status line, the equation and the correlation coefficient: "Regressionskurve f(x) = 4 . x - 5.333 mit Genauigkeit R2 = 0.8714 markiert" (OOo 2.3.1 german) How can i get the equation of the regression curve in StarBasic? i use this: '... chart=Thiscomponent.sheets(0).charts(0).embeddedobject msgbox chart.Diagram.DataRegressionProperties.getCalculator.getRepresentation '... and i get (in the messagebox): "f(x) = 1.#NAN . x + 1.#NAN" but (imho) this must be: f(x) = 4 . x - 5.333 What can i do? In the idl-reference i see this: '========================================== getRepresentation string getRepresentation(); ------------------------------------------------------------------------ -------- Description Retrieve a string showing the regression curve's function with calculated parameters. Returns The string returned contains the regression curve's formula in a form "f(x) = ..." , where the calculated parts are filled out. For a linear regression you might get "f(x) = 0.341 x + 1.45" '========================================== greetings Jörg note: It is a german OOo 2.3.1 and a it is a bar-chart whith a linear regression --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
