William A. Niskanen Jr., 78, a blunt-spoken economist who served as an adviser to the Ford Motor Co. and President Ronald Reagan before becoming chairman at the Cato Institute think tank, died Oct. 26 at the Washington Hospital Center.

He had complications from a stroke, said his wife, Kathryn Washburn.

Dr. Niskanen was an authority on trade, regulation and subsidies whose opinions were sought in corporate board rooms and the Oval Office.

In a career spanning a half-century, he was an economist for the Rand Corp., the Department of Defense and the Office of Management and Budget.

He served as chairman of the libertarian Cato Institute for 23 years before becoming chairman emeritus in 2008.

Dr. Niskanen was a professor of economics at the University of California at Berkeley when he was recruited by Ford in 1975. At the time, the car manufacturer was run by Henry Ford II, the imperious chief executive, and Lee Iacocca, the company’s president.

Working at Ford under two of the auto industry’s biggest egos was a heady and intimidating experience for Dr. Niskanen, the company’s lead economist.

On one Friday, Dr. Niskanen told the New York Times in 1984, he chose to wear a blazer and trousers to work.

Observing his less formal dress, one of Dr. Niskanen’s bosses said to him: “Starting the weekend a little early, Bill?”

Dr. Niskanen told the Times he “never wore that blazer to work again.”

At Ford, Dr. Niskanen found, conformity was key. But it was a lesson Dr. Niskanen did not learn until 1980, when he was fired for breaking ranks with the executives.

During the 1970s, the nation’s car industry was battered by rising gas prices. For Japanese manufacturers, touting smaller cars with fuel-sipping engines, American sales took off.

In late 1979, Ford begged for a government intervention, asking the International Trade Commission to impose quotas on Japanese cars.

Ford officials said Japanese car makers were siphoning American money away from the domestic manufacturers. Tens of thousands of American jobs could be lost if the foreign competition prevailed.

Dr. Niskanen told Ford executives that the government could not cure the company’s ills. Japan was not the problem, Dr. Niskanen told his bosses; they were.

He maintained that in the previous few years, cars imported from Japan made up only one-eighth of lost business for Ford, whose cars lacked the kind of fuel economy that consumers sought.

Ford’s real issue, Dr. Niskanen said, was “bad product decisions.”

Upon hearing his advice, Ford executives dismissed Dr. Niskanen.

“I was told, ‘Bill, in general, people who do well in this company wait until they hear their superiors express their view and then contribute something in support of that view,’ ” Dr. Niskanen said in an 1980 interview with the Wall Street Journal. “That wasn’t, and isn’t, my style.”

William Arthur Niskanen Jr. was born March 13, 1933, in Bend, Ore.

He was a 1954 Harvard University graduate. He earned a master’s degree in 1955 and a doctorate in 1962 from the University of Chicago, where his thesis concerned an in-depth economic study of the sale of alcoholic beverages.

During the 1970s, Dr. Niskanen served on an economic task force for Reagan when he was governor of California.

After Dr. Niskanen was fired from Ford in 1980, Reagan named him to the Council of Economic Advisers.

The CEA, a three-member panel, was formed in 1946 as an independent body to “assist and advise” the White House on economic policy decisions.

Dr. Niskanen’s freely given opinions occasionally rankled the Reagan administration. Reagan flirted with dismantling the group because he said the advisers didn’t always provide useful analysis.

“If they don’t want us in the position of evaluating and criticizing proposals that come from Treasury or Commerce or State or Agriculture or wherever, then there isn’t any reason for the council,” Dr. Niskanen told the Times in 1985. “I think if you probe some people in this administration, they’ll say, ‘Yes, Bill sometimes does irritate me because he doesn’t agree with me but I think he makes a valuable contribution.’ ”

When Reagan did not name Dr. Niskanen CEA chairman in 1985, he resigned and joined the Cato Institute.

His marriages to Helen Barr, Anne Pardee and Judith Michaels ended in divorce.

Survivors include his wife, Kathryn Lafler Washburn, of the District; a daughter from his first marriage, Lia Niskanen, of Brooklyn; two daughters from his second marriage, Pamela Niskanen of West Winfield, N.Y., and Jamie Brunetti of Berkeley, Calif.; and two brothers.