bayesplain.core.regression.fit_line

bayesplain.core.regression.fit_line(x, y)[source]

Fit a least-squares line, dropping rows where either value is missing.

Parameters:
x : array_like

Predictor and outcome.

y : array_like

Predictor and outcome.

Returns:

The quantities every posterior below is built from.

Return type:

LineFit

Raises:

ValueError – With fewer than three complete pairs, a constant predictor, or a perfect fit, none of which leave a residual variance to estimate.