statistics-0.12.0.0: A library of statistical types, data, and functions

Safe HaskellNone

Statistics.Regression

Description

Functions for regression analysis.

Synopsis

Documentation

olsSource

Arguments

:: Matrix

A has at least as many rows as columns.

-> Vector

b has the same length as columns in A.

-> Vector 

Compute the ordinary least-squares solution to A x = b.

rSquareSource

Arguments

:: Matrix

Predictors (regressors).

-> Vector

Responders.

-> Vector

Regression coefficients.

-> Double 

Compute R², the coefficient of determination that indicates goodness-of-fit of a regression.

This value will be 1 if the predictors fit perfectly, dropping to 0 if they have no explanatory power.