The statistics-linreg package

[Tags: library, mit]

Provides functions to perform a linear regression between 2 samples, see the documentation of the linearRegression functions. This library is based on the statistics package.

Code sample:

 import qualified Data.Vector.Unboxed as U

 test :: Int -> IO ()
 test k = do
   let n = 10000000
   let a = k*n + 1
   let b = (k+1)*n
   let xs = U.fromList [a..b]
   let ys = U.map (\x -> x*100 + 2000) xs
   -- thus 100 and 2000 are the alpha and beta we want
   putStrLn "linearRegression:"
   print $ linearRegression xs ys

The r-squared and Total-Least-Squares versions work the same way.


Properties

Versions0.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.3
Dependenciesbase (==4.*), MonadRandom (>=0.1), random (>=1.0), random-shuffle (>=0.0.4), safe (>=0.3), statistics (>=0.5), vector (>=0.5)
LicenseMIT
Copyright2010-2013 Alp Mestanogullari
AuthorAlp Mestanogullari <alpmestan@gmail.com>, Uri Barenholz <uri.barenholz@weizmann.ac.il>
MaintainerAlp Mestanogullari <alpmestan@gmail.com>
StabilityExperimental
CategoryMath, Statistics
Home pagehttp://github.com/alpmestan/statistics-linreg
Bug trackerhttps://github.com/alpmestan/statistics-linreg/issues
Source repositoryhead: git clone http://github.com/alpmestan/statistics-linreg.git
Upload dateThu May 23 11:43:55 UTC 2013
Uploaded byAlpMestanogullari
Downloads582 total (52 in last 30 days)

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees