ustat_var.ustat_samp_covar.ustat_samp_covar_fast
- ustat_var.ustat_samp_covar.ustat_samp_covar_fast(Atmp, Btmp, Ctmp, Dtmp, w=None)
Estimates the sampling covariance between the estimate of \(\operatorname{Cov}(a^A, a^B)\) and the estimates of \(\operatorname{Cov}(a^C, a^D)\). Calling ustat_samp_covar_fast(A,B,C,D) is equivalent to, but often faster than, calling ustat_samp_covar(A,B,C,D). Fundamentally, this function calls vcv_samp_covar_XXXX(), vcv_samp_covar_XXXY(), vcv_samp_covar_XXYY(), and vcv_samp_covar_XYXY().
By setting \(A=B=C=D\), for example, one will simply get the sampling variance of a variance estimate.
- Parameters:
Atmp (array) – J-by-\(\operatorname{max}(T_j)\) array containing data/residuals for outcome A
Btmp (array) – J-by-\(\operatorname{max}(T_j)\) array containing data/residuals for outcome D
Ctmp (array) – J-by-\(\operatorname{max}(T_j)\) array containing data/residuals for outcome C
Dtmp (array) – J-by-\(\operatorname{max}(T_j)\) array containing data/residuals for outcome D
w (array) – Row-wise/teacher-level weights (optional). If included, must have the same number of elements as rows of A, B, C, and D, and must be 1-dimensional (e.g. one weight per teacher/row).
- Returns:
a float representing the sampling covariance \(Cov(Cov(a^A, a^B), Cov(a^C, a^D))\)
- Return type:
float