# NOT RUN {
library("data.table")
library("laeken")
data("eusilc")
dataset1 <- data.table(IDd = paste0("V", 1 : nrow(eusilc)), eusilc)
dataset1$pl085 <- 12 * trunc(runif(nrow(dataset1), 0, 2))
dataset1$month_at_work <- 12 * trunc(runif(nrow(dataset1), 0, 2))
# Full population
d <- linarr(Y = "eqIncome", Y_den = "eqIncome",
id = "IDd", age = "age",
pl085 = "pl085", month_at_work = "month_at_work",
weight = "rb050", Dom = NULL,
dataset = dataset1, order_quant = 50L)
d$value
# }
# NOT RUN {
# By domains
dd <- linarr(Y = "eqIncome", Y_den = "eqIncome",
id = "IDd", age = "age",
pl085 = "pl085", month_at_work = "month_at_work",
weight = "rb050", Dom = "db040",
dataset = dataset1, order_quant = 50L)
dd
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab