Computes the estimation of the variance for indicators on social exclusion and poverty.
1 2 3 4 5 6 7 8  varpoord(Y, w_final, age = NULL, pl085 = NULL, month_at_work = NULL,
Y_den = NULL, Y_thres = NULL, wght_thres = NULL,
ID_level1, ID_level2 = NULL, H, PSU, N_h, PSU_sort = NULL,
fh_zero = FALSE, PSU_level = TRUE, sort = NULL, Dom = NULL,
period = NULL, gender = NULL, dataset = NULL, X = NULL, periodX = NULL,
X_ID_level1 = NULL, ind_gr = NULL, g = NULL, q = NULL, datasetX = NULL,
percentage = 60, order_quant = 50, alpha = 20,
confidence = 0.95, outp_lin = FALSE, outp_res = FALSE, type = "linrmpg")

Y 
Study variable (for example equalized disposable income or gross pension income). One dimensional object convertible to onecolumn 
w_final 
Weight variable. One dimensional object convertible to onecolumn 
age 
Age variable. One dimensional object convertible to onecolumn 
pl085 
Retirement variable (Number of months spent in retirement or early retirement). One dimensional object convertible to onecolumn 
month_at_work 
Variable for total number of month at work (sum of the number of months spent at fulltime work as employee, number of months spent at parttime work as employee, number of months spent at fulltime work as selfemployed (including family worker), number of months spent at parttime work as selfemployed (including family worker)). One dimensional object convertible to onecolumn 
Y_den 
Denominator variable (for example gross individual earnings). One dimensional object convertible to onecolumn 
Y_thres 
Variable (for example equalized disposable income) used for computation and linearization of poverty threshold. One dimensional object convertible to onecolumn 
wght_thres 
Weight variable used for computation and linearization of poverty threshold. One dimensional object convertible to onecolumn 
ID_level1 
Variable for level1 ID codes. One dimensional object convertible to onecolumn 
ID_level2 
Optional variable for unit ID codes. One dimensional object convertible to onecolumn 
H 
The unit stratum variable. One dimensional object convertible to onecolumn 
PSU 
Primary sampling unit variable. One dimensional object convertible to onecolumn 
N_h 
Number of primary sampling units in population for each stratum (and period if Optional for singlestage sampling design as it will be estimated from sample data. Recommended for multistage sampling design as If If 
PSU_sort 
optional; if PSU_sort is defined, then variance is calculated for systematic sample. 
fh_zero 
by default FALSE; fh is calculated as division of n_h and N_h in each strata, if true, fh value is zero in each strata. 
PSU_level 
by default TRUE; if PSU_level is true, in each strata fh is calculated as division of count of PSU in sample (n_h) and count of PSU in frame(N_h). if PSU_level is false, in each strata fh is calculated as division of count of units in sample (n_h) and count of units in frame(N_h), which calculated as sum of weights. 
sort 
Optional variable to be used as tiebreaker for sorting. One dimensional object convertible to onecolumn 
Dom 
Optional variables used to define population domains. If supplied, variables is calculated for each domain. An object convertible to 
period 
Optional variable for survey period. If supplied, variables is calculated for each time period. Object convertable to 
gender 
Numerical variable for gender, where 1 is for males, but 2 is for females. One dimensional object convertible to onecolumn 
dataset 
Optional survey data object convertible to 
X 
Optional matrix of the auxiliary variables for the calibration estimator. Object convertible to 
periodX 
Optional variable of the survey periods. If supplied, residual estimation of calibration is done independently for each time period. Object convertible to 
X_ID_level1 
Variable for level1 ID codes. One dimensional object convertible to onecolumn 
ind_gr 
Optional variable by which divided independently X matrix of the auxiliary variables for the calibration. One dimensional object convertible to onecolumn 
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 
datasetX 
Optional survey data object in household level convertible to 
percentage 
A numeric value in range [0,100] for p in the formula for poverty threshold computation: p/100 * Z(α/100). For example, to compute poverty threshold equal to 60% of some income quantile, p should be set equal to 60. 
order_quant 
A numeric value in range [0,100] for α in the formula for poverty threshold computation: p/100 * Z(α/100). For example, to compute poverty threshold equal to some percentage of median income, α should be set equal to 50. 
alpha 
a numeric value in range [0,100] for the order of the income quantile share ratio (in percentage). 
confidence 
Optional positive value for confidence interval. This variable by default is 0.95. 
outp_lin 
Logical value. If 
outp_res 
Logical value. If 
type 
a character vector (of length one unless several.ok is TRUE), example "linarpr","linarpt", "lingpg", "linpoormed", "linrmpg", "lingini", "lingini2", "linqsr", "linarr", "linrmir", "all_choices". 
A list with objects are returned by the function:
lin_out 
A 
res_out 
A 
all_result 
A

Eric Graf and Yves Tille, Variance Estimation Using Linearization for Poverty and Social Exclusion Indicators, Survey Methodology, June 2014 61 Vol. 40, No. 1, pp. 6179, Statistics Canada, Catalogue no. 12001X,
URL http://www.statcan.gc.ca/pub/12001x/12001x2014001eng.pdf
Guillaume Osier and Emilio Di Meglio. The linearisation approach implemented by Eurostat for the first wave of EUSILC: what could be done from the second wave onwards? 2012
Guillaume Osier (2009). Variance estimation for complex indicators of poverty and inequality. Journal of the European Survey Research Association, Vol.3, No.3, pp. 167195, ISSN 18643361, URL http://ojs.ub.unikonstanz.de/srm/article/view/369.
Eurostat Methodologies and Working papers, Standard error estimation for the EUSILC indicators of poverty and social exclusion, 2013, URL http://ec.europa.eu/eurostat/documents/3859598/5927001/KSRA13029EN.PDF.
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.
Eurostat Methodologies and Working papers, Handbook on precision requirements and variance estimation for ESS household surveys, 2013, URL http://ec.europa.eu/eurostat/documents/3859598/5927001/KSRA13029EN.PDF.
MATTI LANGEL  YVES TILLE, Corrado Gini, a pioneer in balanced sampling and inequality theory. METRON  International Journal of Statistics, 2011, vol. LXIX, n. 1, pp. 4565, URL ftp://metron.sta.uniroma1.it/RePEc/articoli/201113.pdf.
Morris H. Hansen, William N. Hurwitz, William G. Madow, (1953), Sample survey methods and theory Volume I Methods and applications, 257258, Wiley.
Yves G. Berger, Tim Goedeme, Guillame Osier (2013). Handbook on standard error estimation and other related sampling issues in EUSILC, URL https://ec.europa.eu/eurostat/cros/content/handbookstandarderrorestimationandotherrelatedsamplingissuesver29072013_en
Working group on Statistics on Income and Living Conditions (2004) Common crosssectional EU indicators based on EUSILC; the gender pay gap. EUSILC 131rev/04, Eurostat.
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94  data(eusilc)
dataset < data.table(IDd = 1 : nrow(eusilc), eusilc)
dataset1 < dataset[1 : 1000]
# use dataset1 by default without using fh_zero (finite population correction)
aa<varpoord(Y = "eqIncome", w_final = "rb050",
Y_thres = NULL, wght_thres = NULL,
ID_level1 = "db030", ID_level2 = "IDd",
H = "db040", PSU = "rb030", N_h = NULL,
sort = NULL, Dom = NULL,
gender = NULL, X = NULL,
X_ID_level1 = NULL, g = NULL,
q=NULL, datasetX = NULL,
dataset = dataset1, percentage = 60,
order_quant = 50, alpha = 20,
confidence = .95, outp_lin = FALSE,
outp_res = FALSE, type = "linarpt")
aa
## Not run:
# use dataset1 by default without using fh_zero (finite population correction)
aa1 <varpoord(Y = "eqIncome", w_final = "rb050",
Y_thres = NULL, wght_thres = NULL,
ID_level1 = "db030", ID_level2 = "IDd",
H = "db040", PSU = "rb030", N_h = NULL,
fh_zero = FALSE, sort = NULL, Dom = "db040",
gender = NULL, X = NULL,
X_ID_level1 = NULL, g = NULL,
datasetX = NULL,
q = rep(1, if (is.null(datasetX))
nrow(as.data.frame(H)) else nrow(datasetX)),
dataset = dataset1, percentage=60, order_quant=50,
alpha = 20, confidence = .95, outp_lin = FALSE,
outp_res = FALSE, type="linarpt")
aa1
aa1$all_result
# use dataset1 by default with using fh_zero (finite population correction)
aa2 <varpoord(Y = "eqIncome", w_final = "rb050",
Y_thres = NULL, wght_thres = NULL,
ID_level1 = "db030", ID_level2 = "IDd",
H = "db040", PSU = "rb030", N_h = NULL,
fh_zero = TRUE, sort = NULL, Dom = "db040",
gender = NULL, X = NULL,
X_ID_level1 = NULL, g = NULL,
datasetX = NULL,
q = rep(1, if (is.null(datasetX))
nrow(as.data.frame(H)) else nrow(datasetX)),
dataset = dataset1, percentage = 60,
order_quant = 50, alpha = 20,
confidence = .95, outp_lin = FALSE,
outp_res = FALSE, type = "linarpt")
aa2
aa2$all_result
# using dataset1
aa3 <varpoord(Y = "eqIncome", w_final = "rb050",
Y_thres = NULL, wght_thres = NULL,
ID_level1 = "db030", ID_level2 = "IDd",
H = "db040", PSU = "rb030", N_h = NULL,
sort = NULL, Dom = "db040",
gender = NULL, X = NULL,
X_ID_level1 = NULL, g = NULL,
datasetX = NULL,
q = rep(1, if (is.null(datasetX))
nrow(as.data.frame(H)) else nrow(datasetX)),
dataset = dataset1, percentage = 60, order_quant = 50,
alpha = 20, confidence = .95, outp_lin = FALSE,
outp_res = FALSE, type = "all_choices")
aa3
aa3$all_result[type == "ARPT"]
# using dataset
aa4 < varpoord(Y = "eqIncome", w_final = "rb050",
Y_thres = NULL, wght_thres = NULL,
ID_level1 = "db030", ID_level2 = "IDd",
H = "db040", PSU = "rb030", N_h = NULL,
sort = NULL, Dom = "db040",
gender = NULL, X = NULL,
X_ID_level1 = NULL, g = NULL,
datasetX = NULL,
q = rep(1, if (is.null(datasetX))
nrow(as.data.frame(H)) else nrow(datasetX)),
dataset = dataset, percentage = 60,
order_quant = 50, alpha = 20,
confidence = .95, outp_lin = TRUE,
outp_res = TRUE, type = "all_choices")
aa4$all_result[type == "ARPT"]
aa4$lin_out[20 : 40]
aa4$res_out[20 : 40]
## End(Not run)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.