:: com :: sun :: star :: chart2 ::

interface XRegressionCurveCalculator

Methods' Summary
recalculateRegression recalculates the parameters of the internal regression curve according to the x - and y -values given.  
getCurveValue calculates the value of the regression curve for x .  
getCorrelationCoefficient Returns the value of the correlation coefficient for the given regression. This value is often denoted as r or R .  
getRepresentation Retrieve a string showing the regression curve's function with calculated parameters.  
Methods' Details
recalculateRegression
void
recalculateRegression( [in] sequence< double >  aXValues,
[in] sequence< double >  aYValues );

Description
recalculates the parameters of the internal regression curve according to the x - and y -values given.
Parameter aXValues
All x-values that represent the measurement points on which the regression is based
Parameter aYValues
All y-values that represent the measurement points on which the regression is based
getCurveValue
double
getCurveValue( [in] double  x )
raises( ::com::sun::star::lang::IllegalArgumentException );

Description
calculates the value of the regression curve for x .
Parameter x
The abscissa value for which the value of the regression curve should be calculated. All numbers that are part of the domain of the regression function are valid.
Returns
If x is element of the domain of the regression curve function, the result is its value. @throw com::sun::star::lang::IllegalArgumentException If x is not part of the domain of the regression function.
getCorrelationCoefficient
double
getCorrelationCoefficient();

Description
Returns the value of the correlation coefficient for the given regression. This value is often denoted as r or R .

The value of r is signed. Often r 2 is used instead of r to denote a regression curve's accuray.

Returns
The return value is the fraction of the variance in the data that is explained by the regression.
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" 
.
Top of Page