I come not to praise Tuesday’s census report but to bury it. Or at least question its methodologies.

The Census Bureau’s annual report was, overall, quite encouraging. The median American household saw its income grow 3.2 percent in inflation-adjusted terms, and poverty fell regardless of how it’s measured. It wasn’t quite 2015 — the best year on record for household income growth — but it wasn’t too shabby either.

And all that may be true. But the census income report is a deeply flawed data set, offering a confusing and somewhat inaccurate picture of the American economy.

This doesn’t necessarily undermine the celebrations. The ways in which the census’s data sets are flawed suggests the underlying reality might be even better than Tuesday’s rosy report suggested. But the uncertainty here should be acknowledged when we discuss the report.

Here’s a look at the five main issues:

1) The census definition of income leaves out a lot

If your boss took away your health insurance plan and gave you a nickel raise in exchange, you would probably be unhappy. Conversely, if the government raised taxes on the rich and used the revenue to give free health care to the poor, you would probably say inequality had gone down.

But the census definition of income looks pretty strictly at cash — including wages and salaries, Social Security benefits, and bonuses — and excludes taxes paid, earned income tax credit benefits received, and all kinds of noncash benefits. If you get something from the government that’s not cash — Medicare or Medicaid or SNAP, for example — that’s not income. And if you get something from your job that’s not cash — health insurance, a pension, free M&Ms, whatever — that’s not income either.

The upside to excluding noncash forms of income is that these can be difficult to value precisely.

The downside to excluding them is that while one can debate the exact value of work-provided health insurance, the value clearly isn’t zero. This basic problem has become well-known to consumers of wonkish journalism as a problem with the Census Bureau’s official measurement of poverty, but the problems with the poverty threshold are largely a second-order consequence of the overall problem with the definition of income itself.

This has a few salient consequences:

The Obama administration’s main efforts to curb inequality by raising taxes on the rich and subsidizing health care for poor and middle-class people are invisible to the census — and the Trump administration’s efforts to reverse them, if successful, would be invisible as well.

As health care grows as a share of what people consume, the Census Bureau records this as income stagnation because much of health care is consumed via in-kind health benefits rather than intermediated by household cash.

As the population ages and a larger share of people get Medicare, the value of those benefits is hidden.

The bottom line is that income growth has been stronger than the census reflects, especially for the elderly and for low-income households living in Medicaid expansion states, but rich people are paying higher taxes.

2) The census’s inflation measure is too pessimistic

The Census Bureau adjusts for inflation using the consumer price index rather than either of the two main “chained” price indexes that economists generally regard as more accurate, and which tend to grow less year to year. (If you are interested in the details, read here.)

The reason the bureau still uses CPI is political. Some people want to use a shift to chained CPI and its lower estimation of inflation to reduce Social Security’s cost of living adjustments. Many people do not want to cut Social Security, and therefore resist this change, which in turn prevents a change in the census’s methodology.

In principle, it would be possible (and, in my opinion, desirable) to switch to chained CPI and then reinvest the money in making Social Security more generous to the poorest and oldest seniors. But that kind of political deal is very difficult to pull off in practice, so the easiest way to block Social Security cuts is to block a switch to chained CPI.

The census household data is collateral damage of this fundamentally unrelated political fight.

If the census used the more accurate chained CPI (or the Federal Reserve’s personal consumption expenditure deflator), it would show slightly lower inflation and slightly higher real income growth each year.

Median U.S. income has gone up, still below where it was in 1999 https://t.co/O5dax6Bh29 #FightFor15 pic.twitter.com/aqhvLHrsXG — Fight For 15 (@fightfor15) September 14, 2016

The quantities involved here are relatively small, but it makes a big difference to political rhetoric. Last year, both Donald Trump’s presidential campaign and many left-wing groups made a big deal out of the fact that, adjusted for inflation, median household income was still below its 1999 level. Using a chained inflation measure would show that income is higher today than it was back then. It’s a small dollar difference, but it’s the distinction between two fundamentally different stories:

“The American middle class is richer than it’s been at any previous point in history.” “The American middle class hasn’t gotten a raise in more than 15 years.”

The choice of an inflation index is the difference between them. The first story is correct, and the second story is a knock-on consequence of an important but fundamentally unrelated fight about Social Security spending.

3) Demographic effects make comparisons of median incomes tricky

Baby boomers and millennials ruin everything, including census reports.

Compared with 1999, the current American population contains a greater share of retired people and a greater share of people in their early 20s because the millennial and baby boom generations contain more people than the Silent Generation and Generation X cohorts. (This is, indeed, the meaning of the phrase “baby boom.”)

The flip side is that in 1999, experienced middle-aged workers made up a larger share of our population. Both retired people and inexperienced workers earn less than veteran workers.

Consequently, the demographic shift from millennials being small children to millennials being young workers pushes median household income down. The demographic shift from older boomers being experienced workers to being retirees also pushes median household income down.

This is not an error on the Census Bureau’s part in any way, but ignoring demographics gives you an excessively rosy view of the late ’90s and an excessively pessimistic view of the mid-aughts. Individuals who become adults or enter retirement age are not typically experiencing actual economic hardship; they are just showing up in the numbers differently.

4) Household size is shrinking

If your husband or wife leaves you, you will probably be sad (or maybe not; it’s not my business), and you might even be poorer in some sense, but you likely haven’t lost any of your personal income. Nevertheless, your household income might fall because you are now a one-person household with one income, whereas your household probably previously contained two people who earned income.

Depending on the details of your life (child support, housing arrangements, tax status, etc.), your actual disposable income may go up or down. But the census doesn’t care about disposable income; it’s very simplistically looking at household money income. When household size declines, so does household income.

Mark Perry of the American Enterprise Institute has a neat chart showing that even using the census income concept and sticking with the bad inflation index, income per household member hit an all-time high in 2015:

He also took a look specifically at household income for households that feature two working spouses, and you can see that it’s clearly at an all-time high:

Given that data, it’s likely 2016 was another all-time high.

One might say that declining household size is itself a problem — that Americans should be marrying and having kids at higher rates than they are. But when looking at census data, it’s important to keep in mind that you are seeing growth in income per person that is outpacing growth in income per household.

5) Survey data is hot garbage, and we keep using it even though there’s a better option

Because I am not a criminal, I hand over detailed information about my income to the IRS on an annual basis. You probably do this too. Which means that the government, in the form of the IRS, has really detailed information about every American’s income. That is what’s known as “administrative data” — data derived from the actual functioning of a government program, in this case a big tax-collecting apparatus.

The census report is survey data — basically a big poll. Polls are great when you don’t have better information.

But using a survey to assess Americans’ income in 2015 is a little like running a poll to figure out who won the 2012 election when you could count the votes instead. The problem here is federal privacy laws generally prohibit government statistical agencies from relying on administrative data to produce national economic statistics.

The same applies, of course, to government social programs. Instead of running a poll on how many people get federal housing assistance, we could look at housing agencies’ records. When Bruce Meyer and Nikolas Mittag got access to New York state administrative data, they found massive undercounting in the surveys of the number of people who were getting useful stuff from the government. They found that more than a third of people getting housing assistance, 40 percent of people getting food stamps, and 60 percent of people getting TANF or state-based general assistance didn't say so when surveyed. And even people who said they got assistance underestimated how much they were getting.

In total, the administrative data showed that the poverty rate was about 2.5 percentage points lower than the surveys showed.

We don’t really know what a comprehensive nationwide look at administrative data would show about the overall national income and poverty picture, but directionally the phenomenon of people underreporting government assistance is probably consistent.

America is pretty great

The bottom line of all of this is that as good as the Census report was this year, the reality is probably even better.

Properly measured, the typical household enjoys a higher income than ever before, even though the typical household also contains fewer people and a larger-than-ever share of the population is retired. Those retirees are better off than the income data reflects, because Medicare benefits are increasingly valuable as health care technology improves. Middle-class families, similarly, are better off due to their possession of employer-sponsored insurance.

Lower-income households are also benefiting in ways the census doesn’t count from social assistance programs, including a Medicaid expansion that has pushed the uninsured rate to a record low. Even the main measures we have that do count the use of social aid programs are undercounting how many people they help and how much they are helped by.

None of this is to deny that the United States continues to suffer from any number of social ills that could be improved. But social problems have always been with us. The data shows pretty clearly that despite those problems, we are currently living through the best of times.