Documentation

Power-law regression#

The Power model is

y=axb,y=ax^b,

where aa is a scale coefficient and bb is the exponent. A power-law relationship has a straight-line form on logarithmic X and Y coordinates, but it remains a mathematical model applied to the calibrated numerical data; it does not require the source graph to use logarithmic axes.

Domain#

Every point selected for fitting must satisfy

x>0andy>0.x>0 \qquad\text{and}\qquad y>0.

GraphX rejects the fit if a selected point violates either condition, identifying how many X and/or Y values are incompatible. It does not silently drop invalid in-range points. The Display range must also have a strictly positive lower X limit, because the model is not evaluated at non-positive X values.

The fit range is applied first. This means a non-positive point outside the configured range does not prevent a power fit to the valid selected points, while the same point inside the range does.

Fitting method#

Taking natural logarithms gives

ln⁡(y)=ln⁡(a)+bln⁡(x).\ln(y)=\ln(a)+b\ln(x).

GraphX applies ordinary least squares to this log-log relationship and recovers aa by exponentiating the fitted intercept. The editor identifies the method as Least squares on ln(X) and ln(Y).

Two R² values#

The primary R² measures agreement between observed Y values and predictions after they have been mapped back to original Y-space. R² (ln X, ln Y) measures agreement in the transformed log-log space used to estimate the line.

The two values can differ because a residual changes when values are transformed. Use both as diagnostics in context, rather than treating either one as a universal score. Understanding R² explains the common R² calculation and its limitations.

Interpretation#

The exponent bb describes how the model scales with X: a positive exponent increases with X, while a negative exponent decreases. The scale coefficient aa is the model value at x=1x=1. Check the display range and extrapolation indication before relying on the curve far beyond the observations used to fit it.