Documentation

Understanding R²#

GraphX reports R² as a summary of how closely a fitted model predicts the selected observed Y values. For observations yiy_i, fitted values y^i\hat y_i, and their mean yˉ\bar y, GraphX calculates

R2=1−∑i(yi−y^i)2∑i(yi−yˉ)2.R^2 = 1- \frac{\sum_i (y_i-\hat y_i)^2} {\sum_i (y_i-\bar y)^2}.

The numerator is the residual sum of squares: the squared vertical differences between the observed values and the fitted model. The denominator is the total variation of the observed Y values around their mean.

What the value means#

An R² of 1 means the model predicts every selected Y value exactly. Lower values indicate more residual variation relative to the variation already present in the selected observations. R² is calculated only from points in the configured Fit range; it says nothing directly about points excluded from that range or about the displayed extrapolated part of a line.

GraphX does not clamp R² to the interval 0–1. A negative value is mathematically possible when the fitted model has greater squared error than simply predicting the mean Y value for every selected point. A negative result is therefore useful information, not a formatting error.

Constant Y data#

When all selected observed Y values are identical, their total variation is zero and the usual denominator is unavailable. GraphX reports R² as 1 if the model predicts that constant Y exactly; otherwise it displays an unavailable value (—).

R² is not model selection#

R² does not prove that a model is the correct form, establish causation, validate extrapolation, or reveal every systematic residual pattern. A higher-order polynomial can often increase apparent agreement while fitting noise or producing implausible behaviour between points. Compare the curve with the graph, consider measurement uncertainty and the intended use, and prefer a model whose assumptions are appropriate.

Original and transformed spaces#

For Exponential regression and Power-law regression, GraphX fits a linearised logarithmic form to estimate coefficients. It therefore shows a second R² alongside the primary one:

  • Exponential: R² (ln Y)
  • Power: R² (ln X, ln Y)

The primary R² remains in original Y-space, using predictions mapped back through the exponential or power model. The transformed R² describes residuals in the logarithmic space used for the least-squares estimate. They can differ because taking logarithms changes the scale on which errors are measured.

Neither statistic automatically makes a model suitable. Use them to understand different views of agreement, together with the equation, source points, Fit and display ranges, and the scientific or analytical context.