| Search Locate Previous Next | Contents |
This property provides a template to allow RainPro to produce a readable equation from the results of a fitted line or curve.
chSet 'epic' 'Time = C0 + C1speed'
Simple Regression
The template is scanned for the strings C0,C1,C2 and so on, depending on the order of fit used. In the example, if the intercept was 2.3 and the slope was 0.42 the equation would read Time = 2.3 + 0.42speed. The + symbol in the template is a placeholder for the sign, so a negative slope would give a - sign here.
If a coefficient is zero, the matching term is omitted completely, so the above template could read Time = 0.5speed if the line went exactly through the origin.
The formatted equation may be written on the fitted line, positioned according to the equation style, or recovered after the line has been drawn by referencing the Equation property. This may then be used as part of a note, or placed in the key. To have it work correctly in the key, you should make an explicit call to chWriteKey (setting the key property) as this ensures the value of the key is set after the chart has been run.
Multiple Regression
Note that for multiple regressions (Cloud charts and Scatterplots with the contour option) the coefficients are generated in the order Int,x1,x2,...,y1,y2,...,y4 depending on the order of fit chosen for x and y. Set the equationstyle to forcezero to cut out the constant term and force the fit through the origin. In this case, the only way to display the equation is by referencing the equation property and using this in a note or as part of the key.
See also ...
chWriteKey output key at given location
Annotate model
Equation formatted result of modelfit
EquationStyle placement of modelfit results
Modelfit