I am using the LIS database in order to calculate the at-risk-of-poverty rate in different countries, broken down by gender. However, the breakdown argument in the syntax does not produce any values, sorted by domain, as intended. I hope it is a mistake of mine and not an error of LISSY. I leave my code below, hopefully someone will be able to help me.
Here is my code:
library(dplyr)
library(laeken)
ro20h <- read.LIS('ro20h')
ro20p <- read.LIS('ro20p')
ro20h$eqscale <- ro20h$nhhmem^0.5
ro20h$equii <- ro20h$hitotal/ro20h$eqscale
ro20h$indweight <- ro20h$hpopwgt*ro20h$nhhmem
Ropdata20 <- merge(ro20h, ro20p, on= "hid")
arpr(
Ropdata20$equii,
weights = Ropdata20$indweight,
sort = Ropdata20$pid,
breakdown = Ropdata20$sex,
data = NULL,
p = 0.5,
threshold = NULL,
na.rm = TRUE)
This is the exact resulting listing:
Value:
[1] 23.29077
Value by domain:
Threshold:
[1] 21117.77
New contributor
Anca Badea is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.