Dr. Wirth F. Ferger, 84, a retired economist with the Internal Revenue Service, died Thursday in the Pine Run Community retirement center in Doylestown, Pa. Dr. Ferger, who lived in Silver Spring, was on a visit to Doylestown when he was stricken.

Dr. Ferger came to Washington in 1935 as associate economic adviser to Secretary of Agriculture Henry Wallace. From 1939 and 1943, he held posts in the Commodity Credit Corporation, the Economic Warfare Board and the War Food Administration, where he was chief of the economics research divsion.

In 1943, he joined the Bureau of Internal Revenue, the predecessor of the IRS, where he became chief of the business and industrial research division. He later was named economic adviser to the commissioner of Internal Revenue. He held this post until retiring from the IRS in the mid-1960s.

He was a member of the Cosmos Club.

Dr. Ferger, who was a native of Chattanooga, Tenn., was a graduate of the University of Wisconsin. He earned a master's degree in education at Columbia University, and then returned to Wisconsin, where he earned master's and doctoral degrees in economics and statistics. He taught economics at the University of North Carolina before moving to Washington.

His wife, the former Abbie N. Parmelee, died in 1972. Dr. Ferger's survivors include a brother, the Rev. H.R. Ferger of New York, and a sister, Margaret Ferger of Silver Spring.