No project description provided
Project description
Dissaggregation under Generalized Proportionality Assumptions
This package disaggregates an estimated count observation into buckets based on the assumption that the rate (in a suitably transformed space) is proportional to some baseline rate.
The most basic functionality is to perform disaggregation under the rate multiplicative model that is currently in use.
The setup is as follows:
Let $D$ be an aggregated measurement across groups $1,\ldots,k$, where the population of each is $p_i,\ldots,p_k$. Let $f_1,\ldots,f_k$ be the baseline pattern of the rates across groups, which could have potentially been estimated on a larger dataset or a population in which have higher quality data on. Using this data, we generate estimates for $D_i$, the number of events in group $g_i$ and $\hat{f_{i}}$, the rate in each group in the population of interest by combining $D$ with $f_1,...,f_k$ to make the estimates self consistent.
Mathematically, in the simpler rate multiplicative model, we find $\beta$ such that
$$D = \sum_{i=1}^{k}\hat{f}_i \cdot p_i $$
Where
$$\hat{f_i} = T^{-1}(\beta + T(f_i)) $$
This yields the estimates for the per-group event count,
$$D_i = \hat f_i \cdot p_i $$
For the current models in use, T is just a logarithm, and this assumes that each rate is some constant muliplied by the overall rate pattern level. Allowing a more general transformation T, such as a log-odds transformation, assumes multiplicativity in the associated odds, rather than the rate, and can produce better estimates statistically (potentially being a more realistic assumption in some cases) and practically, restricting the estimated rates to lie within a reasonable interval.
Current Package Capabilities and Models
Currently, the multiplicative-in-rate model RateMultiplicativeModel with $T(x)=\log(x)$ and the Log Modified Odds model LMOModel(m) with $T(x)=\log(\frac{x}{1-x^{m}})$ are implemented. Note that the LMOModel with m=1 gives a multiplicative in odds model.
A useful (but slightly wrong) analogy is that the multiplicative-in-rate is to the multiplicative-in-odds model as ordinary least squares is to logistic regression in terms of the relationship between covariates and output (not in terms of anything like the likelihood)
Increasing m in the model LMOModel(m) gives results that are more similar to the multiplicative-in-rate model currently in use, while preserving the property that rate estimates are bounded by 1.
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
File details
Details for the file pydisagg-0.6.0.tar.gz
.
File metadata
- Download URL: pydisagg-0.6.0.tar.gz
- Upload date:
- Size: 29.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91af077c736e7cd189d235c998c20308070285ea5534c6c6c47f9d96e01c049f |
|
MD5 | 9d6b44d260768cf86dbb65a1828a9d34 |
|
BLAKE2b-256 | 1a3650b9247033d1fa4981260c4df455aec28e8af95a2cf190ecef69226b5d7a |
File details
Details for the file pydisagg-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: pydisagg-0.6.0-py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c671e96ee90e5f41c241d8dbec1d66f931e7921e7061e01148ebd95f6b749de2 |
|
MD5 | b548f8cf3bf116686a1d81459762cfcf |
|
BLAKE2b-256 | d6d76921294e809f5ce5e84f423d7dcfe1517bc9f4be93b982ce5246a6d7bf01 |