Statistics (vp.stats)
Probability distributions, summary statistics and regression, with the names and results of SciPy, statsmodels and R.
- 19 of SciPy's distributions under the same names and parameters, such as
vp.stats.norm.cdf(x)andvp.stats.t.ppf(q, df) - the special functions under them: log-gamma, digamma, the error function, and the incomplete gamma and beta functions
- summary statistics: the mean, the variance and R's nine kinds of sample quantile
- linear regression by least squares, with statsmodels' summary table
- generalized linear models, fitted the way R's
glmfits them
The special functions are checked against mpmath, the regressions against NIST's certified results, and the GLMs against R.
Part of the distribution vipyr; it runs from a checkout of the
repository. Planned on PyPI as pip install vipyr.
Functions
-
vp.stats.describe - The mean, variance, skewness and kurtosis of a sample, with sums that keep their digits.
-
vp.stats.glm - Generalized linear models by R's IRLS: binomial, Poisson, Gamma and Gaussian, with R's warnings.
-
vp.stats.ols - Least squares with statsmodels' inference table, by pivoted QR, checked against NIST's certified results.
-
vp.stats.quantile - Sample quantiles of Hyndman and Fan's nine types, as R's quantile() computes them.