I have an income distribution dataset which I am attempting to manipulate in Stata (or SAS).

From this dataset I need to extract the number of households at each income level. The income levels are regularly spaced, say at $10,000 intervals for example.

In other words, for i=$30,000, I want to know the number of households H_i receiving between $20,000 and $30,000.

H_i=\int_{i-10000}^{i}f(x)\: dx

(where f(x) is the underlying density function and x is income level)

Does anyone know the Stata (or SAS) command that would give me this info? In Stata I can get the income at each percentile of the population using the "centile" command, but this doesn't quite give me what I want.

Thanks