Overview
This package contains the non-parametric unbiased estimators of the variance of teacher effects described in Rose, Schellenberg, and Shem-Tov (2022). These unbiased estimators are $U$-statistics, which provide minimum-variance unbiased estimators of population parameters for arbitrary probability distributions. The $U$-statistic approach overcomes several issues experienced by Empirical Bayes (EB) techniques when estimating an agent's 'value-added'. This readme is meant to be brief overview of how to install the package and how to use it -- the complete package documentation can be found here.
Authors
- Evan K. Rose (University of Chicago)
- Jonathan T. Schellenberg (Amazon Web Services)
- Yotam Shem-Tov (UCLA)
- Jack Mulqueeney (University of Chicago)
Installation
To install:
python3 -m pip install ustat_var
Usage
The package contains two functions that compute the non-parametric estimators presented in Appendix C of Rose, Schellenberg, and Shem-Tov (2022).
The first, ustat.varcovar estimates the variance-covariance, taking in two matrices as inputs:
import ustat_var as ustat
import numpy as np
# Seed and data
np.random.seed(18341)
X,Y = ustat.generate_test_data.generate_data(n_teachers = 10, n_time = 5, n_arrays = 2, var_fixed = 1, var_noise = 1.0, cov_factor = 0.5)
# Variance-covariance
ustat.varcovar(X, X) # Var(X)
ustat.varcovar(X, Y) # Cov(X, Y)
The second, ustat_samp_covar, estimates the sampling variance/covariance of varcovar. It takes four matrices as inputs, where ustat_samp_covar(A, B, C, D) yields $\hat{Cov}\big(\hat{Cov}(A,B) - Cov(A,B), \hat{Cov}(C,D) - Cov(C,D)\big)$. For example:
# Base implementation through ustat_samp_covar.ustat_samp_covar() functions:
ustat.ustat_samp_covar.ustat_samp_covar(X, X, X, X) # Sampling variance of Var(X)
ustat.ustat_samp_covar.ustat_samp_covar(X, Y, X, Y) # Sampling variance of Cov(X, Y)
# Faster implementation available in ustat_samp_covar.ustat_samp_covar_fast() function
ustat.ustat_samp_covar.ustat_samp_covar_fast(X, X, X, X) # Also computes sampling variance of Var(X), but faster than above
ustat.ustat_samp_covar.ustat_samp_covar_fast(X, Y, X, Y) # Also computes sampling variance of Cov(X, Y), but faster than above
You can find further details about each function in the package documentation.
Metadata
Release files for ustat-var 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ustat_var-0.3.4.tar.gz | 214.8 kB | Without provenance | Details for ustat_var-0.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ustat_var-0.3.4-py3-none-any.whl | Python 3 | none | any | Details for ustat_var-0.3.4-py3-none-any.whl |
Total release size: 228.9 kB
Release files / ustat_var-0.3.4.tar.gz
| Download URL | ustat_var-0.3.4.tar.gz |
|---|---|
| Size | 214.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a65ddda0889012b9447fe48834a514a82c8111013f6b356076323a3b4269443
|
|
BLAKE2b-256 checksum How to use checksums |
95fc281f85d2531e84ab04d67cdf5026cd3fcc9b7f0735c43668d9bd7a30e336
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / ustat_var-0.3.4-py3-none-any.whl
| Download URL | ustat_var-0.3.4-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
36a7d397f96cf618595f403171e6df8c68a3bc7c7f67cc5f9be279f1b15adfa5
|
|
BLAKE2b-256 checksum How to use checksums |
03236dcbdff4d30813b0ee30f634dad19a3476878e35e54a8e02e24a17a86a88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for ustat-var 0.3.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.