ustat-var
Python package for computing unbiased variances and sampling variances of teacher means.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.3%) to scientific vocabulary
Repository
Python package for computing unbiased variances and sampling variances of teacher means.
Basic Info
- Host: GitHub
- Owner: jkmulq
- License: mit
- Language: Python
- Default Branch: main
- Size: 919 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
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:
``` python import ustat_var as ustat import numpy as np
Seed and data
np.random.seed(18341) X,Y = ustat.generatetestdata.generatedata(nteachers = 10, ntime = 5, narrays = 2, varfixed = 1, varnoise = 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:
``` python # Base implementation through ustatsampcovar.ustatsampcovar() functions: ustat.ustatsampcovar.ustatsampcovar(X, X, X, X) # Sampling variance of Var(X) ustat.ustatsampcovar.ustatsampcovar(X, Y, X, Y) # Sampling variance of Cov(X, Y)
Faster implementation available in ustatsampcovar.ustatsampcovar_fast() function
ustat.ustatsampcovar.ustatsampcovarfast(X, X, X, X) # Also computes sampling variance of Var(X), but faster than above ustat.ustatsampcovar.ustatsampcovarfast(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.
Owner
- Login: jkmulq
- Kind: user
- Repositories: 1
- Profile: https://github.com/jkmulq
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use the `ustat_var` package, please cite the following paper:"
type: software
title: ustat_var
version: "0.1.0"
authors:
- family-names: Rose
given-names: Evan K.
- family-names: Schellenberg
given-names: Jonathan T.
- family-names: Shem-Tov
given-names: Yotam
- family-names: Mulqueeney
given-names: Jack
repository-code: https://github.com/jkmulq/ustat_var
license: MIT
keywords:
- statistics
- econometrics
- teacher effects
- sampling variance
- covariance estimation
preferred-citation:
type: working-paper
title: "The Effects of Teacher Quality on Adult Criminal Justice Contact"
authors:
- family-names: Rose
given-names: Evan K.
- family-names: Schellenberg
given-names: Jonathan T.
- family-names: Shem-Tov
given-names: Yotam
institution: National Bureau of Economic Research
number: 30274
year: 2022
month: 7
doi: 10.3386/w30274
url: https://www.nber.org/papers/w30274
GitHub Events
Total
- Member event: 1
- Push event: 36
Last Year
- Member event: 1
- Push event: 36
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
pypi.org: ustat-var
Computing unbiased variance estimators
- Documentation: https://ustat-var.readthedocs.io/en/latest/
- License: mit
-
Latest release: 0.3.3
published 6 months ago
Rankings
Maintainers (1)
Dependencies
- numpy *
- scipy *
- sphinx ==7.1.2
- sphinx-copybutton *
- sphinx-rtd-theme ==1.3.0rc1
- numpy *
- scipy *