我的人口普查数据显示了特定区域的装箱家庭收入:
test_data <- data.frame(region = "Pluto",
low = c(1,7800,15600,20800,26000,33800,41600,52000,65000,78000,91000,104000,156000),
high = c(7799,15599,20799,25999,33799,41599,51999,64999,77999,90999,103999,155999,Inf),
households = c(10674,17768,20497,18413,17261,20529,24754,25286,16704,12847,8654,11170,3480))
test_data <- test_data %>% mutate(bin_interval = paste(low, high, sep = " - "))
“低”和“高”是指容器边缘。我想估算该地区的收入中位数。为此,我需要使分布适合装箱数据。从这个分布中,我可以计算出中间值。有人可以告诉我该怎么做吗?提前谢谢了!
请注意,我有很多地区。示例数据仅适用于一个区域。