Download the PHP package touilelhadj/biostat-php without Composer

On this page you can find all versions of the php package touilelhadj/biostat-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package biostat-php

biostat-php

A pure-PHP biostatistics library implementing descriptive, bivariate and multivariate methods for survey-based epidemiological studies — including logistic regression, VIF, Box–Tidwell, GLMM, GEE, MICE and Rubin's pooling.

License: MIT PHP Version Packagist CI Status DOI


📖 Overview

biostat-php brings the analytic side of a cross-sectional epidemiological study to PHP. It implements, in pure PHP and without external dependencies, the same family of statistical methods normally available only in R (stats, car, lme4, geepack, mice) or SPSS.

The library was extracted from a real research instrument — a trilingual data-collection platform used to study adolescent overweight in the Wilaya of Chlef, Algeria — where it ran the 48 pre-registered hypotheses of the underlying master thesis on a low-cost shared-hosting environment that did not allow R or Python.

Every method is cross-checked against R 4.x and IBM SPSS 25; the quantitative comparison is documented in docs/validation-tables.md and exercised by the PHPUnit suite in tests/.


🚀 Installation

Requirements:


⚡ Quick start

More examples — including GLMM and MICE — are in examples/. A complete per-method walkthrough with R-equivalent commands is in docs/usage-examples.md.


🧪 Method catalogue

Family Methods
Descriptive mean, std, median, quantile
2 × 2 tables chi2Test2x2 (with Yates), oddsRatio (with Haldane–Anscombe)
Means tTest (Welch), anova
Correlation pearson, spearman
Binomial binomialTest
Logistic regression logisticRegression, logisticRegressionMulti, hosmerLemeshow
Multiple testing benjaminiHochberg (FDR)
Multicollinearity vif
Logit linearity boxTidwell
Mixed / clustered glmmLogistic (PQL), geeLogistic (Liang–Zeger sandwich)
Missing data mice (PMM + chained Gibbs), rubinPool (Rubin's rules)

Mathematical formulations and bibliographic references for every method are in docs/statistical-methods.md.


✅ Verification

Reference values for every method were computed independently in R 4.3.0 and IBM SPSS 25. The tolerances used in the test suite are:

Family Tolerance
p-values ± 0.01
Odds ratios ± 0.01
Correlation coefficients ± 0.001
Regression coefficients ± 0.05
Variance components (GLMM) ± 0.05

A complete numerical comparison table — R command, R value, PHP value, |Δ| — lives in docs/validation-tables.md.


🧰 Running the tests


📁 Repository layout


📚 Citation

If you use this library in a research publication, please cite it. A machine-readable citation file is provided in CITATION.cff.

Recommended citation

TOUIL, E. (2026). biostat-php: a pure-PHP biostatistics library for survey-based epidemiological studies. Version 1.0.0. https://github.com/Touil-Elhadj/biostat-php

BibTeX


🌍 Real-world use

biostat-php is the analytic engine of the chlef-touilelhadj platform, a trilingual web instrument used to enrol 1 220 adolescents (14–19 years) in the Wilaya of Chlef, Algeria, during the 2025–2026 academic year. All statistical results of the underlying master thesis were produced by this library and independently verified against R 4.x and SPSS 25.


🤝 Contributing

Contributions are welcome — see CONTRIBUTING.md for the development workflow and the statistical-contribution checklist (every new method must ship with a closed-form reference value from R or SPSS plus a PHPUnit assertion).


🛡 Security

To report a vulnerability please follow the procedure in SECURITY.md.


📄 License

Released under the MIT License — © 2026 TOUIL Elhadj.


All versions of biostat-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package touilelhadj/biostat-php contains the following files

Loading the files please wait ...