The University of California at Berkeley, followed by Stanford, Harvard and Yale, have the highest ranked graduate programs in the United States, according to a new analysis of the nation's graduate schools.

The composite ratings were compiled from a massive $500,000 study by the National Academy of Sciences that rated research and doctoral programs at 228 universities in 32 scholarly fields.

Some 5,000 faculty members across the country participated in the project.

David S. Webster, an assistant professor at the University of Pennsylvania, prepared the new analysis for the April-May issue of Change, a magazine on higher education.

Webster said the ranking was based on how many departments at each university placed in the top one-sixth in the survey for the quality of its faculty, with a bonus point given to those in the top 2 1/2 percent.

"You can divide up institutions into department stores or boutiques," said Webster, who specializes in the study of higher education. "The department stores, like Berkeley or Michigan, have everything. The boutiques, like MIT or Princeton, don't have as much, but they're very good in what they do."

Webster said that the composite ratings favor the large schools.

In 1970, the last time that such an evaluation was made, the same universities were listed in the top ten: the top four and the Massachusetts Institute of Technology, Princeton, the University of Chicago, the University of California/Los Angeles and the Universities of Wisconsin and Michigan. But Webster said that there have been some substantial changes elsewhere in those ranked among the top 30.

The only universities in the Washington area on the new list of the top 30 are the University of Virginia in Charlottesville, which tied for 28th place, and Johns Hopkins in Baltimore, which tied for 30th.

The University of Maryland at College Park had eight departments that rated strong, but none that was outstanding.

Graduate programs at the five major universities in Washington--American, Catholic, George Washington, Georgetown and Howard--were rated mediocre or worse.