variance_est(Y, H, PSU, w_final, N_h=NULL, fh_zero=FALSE,
PSU_level=TRUE, period=NULL, dataset=NULL)dataset
is not NULL) a character string, an integer or a
logical vector (length is the same as 'dataset' column dataset is not NULL) a character string,
an integer or a logical vector (length is the same as 'datasetdataset is not NULL)
a character string, an integer or a logical vector (length is the
same as 'dataset' column count) specifying the codataset is not
NULL) a character string, an integer or a logical vector
(length is the same as 'dataset' column count) spdataset is not NULL) character strings,
integers or a logical vectors (length is the same as
'dataset' column coundata.frame.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_othstrYs <- 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