powered by
Compute an estimate of a population unit variance from a complex sample with survey weights.
wtdvar(x,w,na.rm=TRUE)
data vector
vector of survey weights; must be same length as x
x
remove missing values (TRUE or FALSE)
numeric estimate of population unit variance
wtdvar is also used by BW3stagePPSe in estimating relvariance components.
wtdvar
BW3stagePPSe
Valliant, R., Dever, J., Kreuter, F. (2018, chap. 9). Practical Tools for Designing and Weighting Survey Samples, 2nd edition. Springer.
# NOT RUN { x <- c(1:3) wts <- c(4, 6, 8) wtdvar(x=x, w=wts) # }
Run the code above in your browser using DataLab