Computes the variance estimation for sample surveys in domain by the two stratification.
1 2 3 4 5 6 
Y 
Variables of interest. Object convertible to 
H 
The unit stratum variable. One dimensional object convertible to onecolumn 
H2 
The unit new stratum variable. One dimensional object convertible to onecolumn 
PSU 
Primary sampling unit variable. One dimensional object convertible to onecolumn 
w_final 
Weight variable. One dimensional object convertible to onecolumn 
id 
Optional variable for unit ID codes. One dimensional object convertible to onecolumn 
Dom 
Optional variables used to define population domains. If supplied, linearization of the atriskofpoverty rate is done for each domain. An object convertible to 
period 
Optional variable for survey period. If supplied, residual estimation of calibration is done independently for each time period. One dimensional object convertible to onecolumn 
N_h 
optional data object convertible to 
N_h2 
optional data object convertible to 
Z 
optional variables of denominator for ratio estimation. Object convertible to 
X 
Optional matrix of the auxiliary variables for the calibration estimator. Object convertible to 
g 
Optional variable of the g weights. One dimensional object convertible to onecolumn 
q 
Variable of the positive values accounting for heteroscedasticity. One dimensional object convertible to onecolumn 
dataset 
Optional survey data object convertible to 
confidence 
Optional positive value for confidence interval. This variable by default is 0.95. 
percentratio 
Positive numeric value. All linearized variables are multiplied with 
outp_lin 
Logical value. If 
outp_res 
Logical value. If 
A list with objects are returned by the function:
lin_out 
A 
res_out 
A 
s2g 
A 
all_result 
A

JeanClaude Deville (1999). Variance estimation for complex statistics
and estimators: linearization and residual techniques. Survey
Methodology, 25, 193203,
URL http://www5.statcan.gc.ca/bsolc/olccel/olccel?lang=eng&catno=12001X19990024882.
M. Liberts. (2004) Nonresponse Analysis and Bias Estimation in a Survey on Transportation of Goods by Road.
domain
, lin.ratio
, residual_est
,
vardomh
, var_srs
, variance_est
,
variance_othstr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  data(eusilc)
# Example 1
eusilc1 < eusilc[1:1000, ]
dataset < data.table(IDd=1:nrow(eusilc1), eusilc1)
N_h2 < dataset[, sum(rb050, na.rm = FALSE), keyby="db040"]
aa<vardom_othstr(Y="eqIncome", H="db040",H2="db040", PSU="db030", w_final="rb050",
id="rb030", Dom = "db040", period=NULL, N_h=NULL, N_h2=N_h2, Z = NULL,
X=NULL, g=NULL, q=NULL, dataset=dataset,
confidence = .95, outp_lin=TRUE, outp_res=TRUE)
## Not run:
# Example 2
dataset < data.table(IDd=1:nrow(eusilc), eusilc)
N_h2 < dataset[, sum(rb050, na.rm = FALSE), keyby="db040"]
aa<vardom_othstr(Y="eqIncome", H="db040",H2="db040", PSU="db030", w_final="rb050",
id="rb030", Dom = "db040", period=NULL, N_h=NULL, N_h2=N_h2, Z = NULL,
X = NULL, g = NULL, dataset = dataset,
q = rep(1, if (is.null(dataset))
nrow(as.data.frame(H)) else nrow(dataset)),
confidence = .95, outp_lin=TRUE, outp_res=TRUE)
## End(Not run)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.