I have collapsed the median household income (income_hh_USD) per month of interview, however the median per month is not correct. For several months I get a median of 0, which cannot be correct: When I look at the individual data points for set months there are no negative values in the income data, but several positive incomes. This problem does not occur when using the mean, but because the data is skewed I need to use the median. Why I am I given the wrong median and how can I fix the issue?
Code:
collapse (p50) income_hh_USD (count) number_obervations, by(intv_date_monthly)
(Using stata 17 and updated today to make sure the software isn't the problem)
Code:
collapse (p50) income_hh_USD (count) number_obervations, by(intv_date_monthly)
(Using stata 17 and updated today to make sure the software isn't the problem)

Comment