National LASI GAMLSS/LMS spirometry reference equations for Indian adults aged 45 years and older.
Project description
LASI spirometry reference equations
This folder makes the national LASI GAMLSS/LMS spirometry reference equations usable outside the manuscript.
It contains:
pyproject.tomlandsrc/lasi_spirometry_reference/: a small Python package.r/lasiSpirometryReference/: a small R package.- Bundled LMS data from
gamlss/gamlss_LMS_table.csv. - Tests against the published lookup examples.
The equations apply to Indian adults aged 45-90 years. They should not be extrapolated to younger adults, and they should be externally validated before being treated as a definitive clinical standard.
Formula
For each sex, age, and parameter, the package reads the tabulated GAMLSS/BCCG values:
L: Box-Cox skewness.M: median at the sex-specific reference height.S: coefficient of variation.b: height exponent for FEV1 and FVC.
For FEV1 and FVC:
M(age, height) = M_ref(age) * (height_cm / reference_height_cm)^b
z = ((observed / M)^L - 1) / (L * S)
LLN = M * (1 + L * S * -1.6448536269514722)^(1 / L)
For FEV1/FVC, M is in percent and no height scaling is applied.
Integer ages 45-90 are tabulated. Non-integer ages are linearly interpolated between adjacent LMS rows. Ages outside 45-90 raise an error by default.
Python
Install locally from this folder:
python -m pip install -e .
Example:
from lasi_spirometry_reference import predict, score_spirometry
print(predict("M", 60, 165, "fvc"))
result = score_spirometry(sex="M", age=60, height_cm=165, fev1_l=2.10, fvc_l=2.60)
print(result["classification"])
Run tests:
python -m pytest tests
R
Install from the R package subfolder:
install.packages("r/lasiSpirometryReference", repos = NULL, type = "source")
Example:
library(lasiSpirometryReference)
lasi_predict("M", 60, 165, "fvc")
lasi_score_spirometry("M", 60, 165, fev1_l = 2.10, fvc_l = 2.60)
Citation
Please cite the manuscript:
Siddalingaiah HS. Nationally Representative Spirometry Reference Equations for Middle-Aged and Older Indians: A Cross-sectional Derivation and Validation Study from the Longitudinal Ageing Study in India, and Re-estimated Burden of Restrictive and Preserved-Ratio Impairment.
Release checklist
Before public package release, confirm:
- The manuscript citation and DOI/preprint URL, once available.
- The intended license for code and reference tables.
- Whether package publication should be GitHub-only, PyPI, CRAN, or r-universe.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lasi_spirometry_reference-0.1.0.tar.gz.
File metadata
- Download URL: lasi_spirometry_reference-0.1.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f8bd5193f5720df7b0e186382de4e05ac2d191519226232c5bf0fff26b18475
|
|
| MD5 |
931385e21f6e0d4a5c4eaf20124eb16e
|
|
| BLAKE2b-256 |
c1a6c3791ea2d8b1bad0d58e2971bbc4a0ef5b0c30c4786b310439ff62c0d7cc
|
File details
Details for the file lasi_spirometry_reference-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lasi_spirometry_reference-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db4125dd3efde57bdb3407234fb9835bf30d15e0e33f2004524b820affe9225c
|
|
| MD5 |
399f68894f5e06a0bfc9b1f361d8abd0
|
|
| BLAKE2b-256 |
3a9207ad99fc008dc7204988fe565ae32a39ddb8360b21cbae4857c8ba5869b0
|