Ruth M. Allen, 67, a retired employe of the National Institutes of Health who had lived here for more than 20 years, died Saturday in Montgomery General Hospital in Olney after a heart attack.

Mrs. Allen worked for the government for 15 years. She had recently retired from NIH's National Heart and Lung Institute where she worked on computer projects.

She also was the bibliographer of an institute publication. "Rhythm of the Heart: A Review of Research Grants Supported by the National Heart and Lung Institute, 1949-1970."

She was the widow of Dr. Robert M. Allen, a U.S. Public Health Service doctor, who died in 1955.

Mrs. Allen was president of the U.S. Public Health Service Retired Officers Wives Club, and third vice president of the U.S. Public Health Service Officers Wives Club.

She was a member of the American Association of University Women.

Mrs. Allen belonged to the Little Falls United Presbyterian Church in Arlington.

She was a native of Waverly, ILL., and moved here from Baltimore in 1956. She was a resident of Arlington.

Mrs. Allen earned a bachelor's degree at Grinnel College in Grinnell, Iowa, and a master's degree in music at the University of Michigan.

Survivors include two sons, John R. Allen, of Washington, and Richard M. Allen, of Arlington; two sisters, Mary Shaw, of Kent, Ohio, and Esther Nye, of Tallahassee, Fla., and one grandchild.

The family suggests that expressions of sympathy be in the form of contributions to the American Cancer Society.