jackknife: Jackknife covariance calculation In mrc-ide/demogsurv: Demographic analysis of DHS and other household surveys

Description

Calculate the covariance matrix for a vector of estimates of the form fn(L * x/n) using unstratified (JK1) or stratified (JKn) jackknife calculation removing a single cluster at a time. The calculation assumes infinite population sampling.

Usage

 1 jackknife(x, n, strataid = NULL, L = diag(nrow(x)), fn = function(x) x)

Arguments

 x v x k matrix specifying weighted numerator for each of k PSUs (across columns) n v x k matrix specifying weighted denominator for each PSU (across columns) strataid integer or factor vector consisting of id for each strata. Optional, length should be number of columns of x if supplied. L q x v matrix defining a linear transform fn function to transorm ratio x/n.

Details

If strataid is provided, then the stratified (JKn) covariance is calculated, while if strataid = NULL then the unstratified (JK1) covariance is calculated. The latter corresponds to the unstratified jackknife covariance reported in DHS survey reports. The calculations are equivalent for strataid = rep(1, ncol(x)).

Value

a data frame with q rows consisting of estimates calculated as fn(L * rowSums(x) / rowSums(n) ), standard error, and 95% CIs calculated on the untransformed scale and then transformed. The covariance matrix is returned as the "var" attribute and can be accessed by vcov(val).

References

Pedersen J, Liu J (2012) Child Mortality Estimation: Appropriate Time Periods for Child Mortality Estimates from Full Birth Histories. PLoS Med 9(8): e1001289. https://doi.org/10.1371/journal.pmed.1001289.

mrc-ide/demogsurv documentation built on Nov. 21, 2021, 2:05 p.m.