# NOT RUN {
library("data.table")
library("laeken")
data("eusilc")
dataset <- data.table(IDd = paste0("V", 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 = 50L, alpha = 20,
confidence = .95, outp_lin = FALSE,
outp_res = FALSE, type = "linarpt")
aa
# }
# NOT RUN {
# 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, dataset = dataset1,
percentage = 60, order_quant = 50L,
alpha = 20, confidence = .95, outp_lin = FALSE,
outp_res = FALSE, type = "linarpt")
aa2
aa2$all_result
# using dataset1
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, dataset = dataset,
percentage = 60, order_quant = 50L,
alpha = 20, confidence = .95,
outp_lin = TRUE, outp_res = TRUE,
type = "linarpt")
aa4$lin_out[20 : 40]
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab