linear_least_squares_fit_with_stats#

petpal.kinetic_modeling.graphical_analysis.linear_least_squares_fit_with_stats(xdata: numpy.ndarray, ydata: numpy.ndarray) tuple[float, float, float, float, float]#
Fits a line to the data using least squares and explicitly computes:
  • Fit R^2

  • Standard error of the intercept

  • Standard error of the slope

Parameters:
  • xdata (np.ndarray) – X-coordinates of the data.

  • ydata (np.ndarray) – Y-coordinates of the data.

Returns:

tuple – A tuple containing five float values: the intercept of the fitted line, the slope of the fitted line, the r-squared value, the intercept standard error, and the slope standard error.

See: