variance_est(Y, H, PSU, w_final, N_h=NULL, fh_zero=FALSE,
PSU_level=TRUE, period=NULL, dataset=NULL)
data.table
or variable names as character, column numbers.data.table
or variable name as character, column number.data.table
or variable name as character, column number.data.table
or variable name as character, column number.data.table
or variable names as character, column numbers.data.table
.data.table
containing the values of the
variance estimation by totals.domain
, lin.ratio
, linarpr
,
linarpt
, lingini
, lingini2
,
lingpg
, linpoormed
, linqsr
,
linrmpg
, residual_est
, vardom
,
vardomh
, varpoord
, variance_othstr
Ys <- rchisq(10, 3)
w <- rep(2, 10)
PSU <- 1:length(Ys)
H <- rep("Strata_1", 10)
# by default without using fh_zero (finite population correction)
variance_est(Y=Ys, H=H, PSU=PSU, w_final=w)
# without using fh_zero (finite population correction)
variance_est(Y=Ys, H=H, PSU=PSU, w_final=w, fh_zero=FALSE)
# with using fh_zero (finite population correction)
variance_est(Y=Ys, H=H, PSU=PSU, w_final=w, fh_zero=TRUE)
Run the code above in your browser using DataLab