The federal government's number mills are in trouble.

At a time when the U.S. economy never has been more complex, federal statisticians are losing the ability to track the changes.

The official statistics report that the nation is in the midst of a period of unsurpassed prosperity -- a peacetime record of 7 1/2 years without a recession.

But private economists say many of the statistics spewed by the government each month that purport to track the economy are seriously flawed. Some are so suspect that analysts ignore them in preparing forecasts rather than face embarrassment when the government totally revises its original report.

''History is being rewritten on a monthly basis,'' said Allen Sinai, chief economist of the Boston Co. ''It makes it very hard for private-sector analysts and public policy makers to come to correct conclusions.''

Take the chagrin caused last year with the monthly report on retail sales. The government first reported retail sales fell by 0.1 percent in May 1989 only to discover belatedly that the survey had overlooked $1.4 billion in sales. Thus, a small decline turned into a sizable 0.8 percent increase.

But the problem didn't stop there. The initial erroneous report was picked up in the government's broadest measure of economic activity -- the gross national product -- which originally showed an anemic 1.7 percent growth rate during the spring.

After the error in retail sales was caught, the GNP report was revised to show the economy growing at a much more respectable 2.5 percent. But the correction came too late to stop policy makers at the Federal Reserve from acting to cut interest rates for fear the economy was headed into recession.

A number of economists believe the Fed has been forced to keep interest rates higher this year because of that mistaken easing in credit last year.

Bad data triggers more than bad government policy.

Millions of dollars can be lost in seconds on Wall Street based on investors' jittery response to the latest report, even though bad news one month might be revised to look significantly better a month later.

The consumer price index affects the pocketbook of virtually every American in a different way.

The CPI, the government's most closely watched measure of inflation, is used to adjust the monthly payments of 38 million Social Security beneficiaries, 20 million food stamp recipients, 3.5 million federal retirees and at least 8.5 million workers covered by collective bargaining contracts that link wage increases to CPI increases.

Even the amount of taxes we pay is affected because the CPI is used each year to adjust rates to prevent inflation-induced tax increases known as ''bracket-creep.''

In studying government data, everyone from the National Academy of Sciences to the National Association of Business Economists has reached the same conclusion -- there are serious problems regarding the accuracy and usefulness of the statistics.

A survey last year of NABE members found 72 percent were unhappy with the quality of government data, up from 61 percent the year before. Retail sales, GNP and merchandise trade reports were identified as the worst offenders.

Michael Boskin, chairman of the president's Council of Economic Advisers and head of an administration statistics task force exploring the issue, said deteriorating statistics partly reflect a more complex economy.

''When we as a nation produced mostly things like steel and bushels of wheat, output was easy to count,'' Boskin said. ''Tons of steel and bushels of wheat.''

But today, in an economy where 75 percent of the output is in service industries, ranging from banks and hospitals to fast-food franchises and video rental outlets, output is more difficult to measure.

How, for example, Boskin asked, do you assign a value to the increased output and productivity from an innovation such as 24-hour teller machines?

Many economists, however, believe a complex economy is only partly to blame for the slump in data reliability. In their view, the bigger culprit was the Reagan administration. Budget cuts forced staff reductions at the statistics agencies and cut into the research needed to keep sampling techniques current with a changing economy.

Former Commerce Undersecretary Robert Ortner, who oversaw the work at the Census Bureau and the Bureau of Economic Analysis during the Reagan administration, says austere budgets during this time did have an effect.

''Because of the cutbacks, we had to delay some things that we felt strongly we wanted to do,'' said Ortner, who has written a book on economic policy-making during the Reagan years titled ''Voodoo Deficits.''

One of the delayed projects was an effort to modernize U.S. statistics and make them more comparable to the economic bookkeeping done in other countries, Ortner said. The unreliability of the data often is magnified when it comes to tracking economic activity in specific areas of the country, in part because the government does not provide the money to gather large enough samples.

''Within the past decade, we have had much greater diversity in regional performance than we have ever had before, starting with the farm depression and the manufacturing depression in the early 1980s and then the drop in oil prices, which killed Texas,'' said Ben Laden, a private economist who studied the statistics problem for NABE. ''But the federal government is doing very little to track regional differences.''

Paul Getman, head of Regional Financial Associates, a private economic consulting firm in Bala Cynwyd, Pa., agreed, and complained that the government produces few statistics on regional economic activity on a timely basis.

Even the national statistics can mislead because of the huge revisions, Getman said.

The Bush administration has sought money to strengthen the system of reporting economic statistics, but Congress turned down its request for $20 million in additional funds last year, citing budget restraints caused by the Gramm-Rudman deficit reduction law.

The administration managed to salvage part of its rescue program by reshuffling available funds. This year, it came back with an even more ambitious request for $50 million to overhaul 25 statistical areas.

Michael Darby, who took Ortner's post as statistics chief at Commerce, said he hopes Congress will deal more favorably with this year's spending request.

''Everybody loses if we don't have good data and that results in policy errors which cause a recession,'' he said. ''That ruins the budget and ruins politicians' re-election chances.''