Avoiding what some of his advisers acknowledged could have been "a disaster," President Reagan impressed the other western leaders at the ninth economic summit here with his careful preparation and determination to come away with a statement of support for his approach to nuclear arms control.

West German Chancellor Helmut Kohl, expressing a view reflected by other delegations, said Reagan had been "well prepared and well assisted and managed the whole thing with a sense of humor that helped a lot," according to West German officials.

Canadian Prime Minister Pierre Trudeau, who clashed with Reagan on arms control, nevertheless called the summit an "unqualified success," which benefited from the seclusion and informality in which the seven leaders met much of the time.

White House deputy chief of staff Michael K. Deaver, who supervised American preparations for the summit, said Reagan came here determined to win approval of a statement giving renewed support for beginning deployment of U.S. Pershing and cruise missiles in western Europe in December, unless the Soviet Union agrees to dismantle the SS20 nuclear missiles it has targeted on Europe.

U.S. officials said this was discussed with the Canadians, West Germans and French about three weeks ago, and Reagan deliberately let British Prime Minister Margaret Thatcher take a leading role here in advocating the seven-paragraph statement issued by the seven leaders Sunday night after nearly 24 hours of intense debate. The officials said Reagan believed the statement could help the reelection campaign of Thatcher, who is a friend and ideological ally of the president.

But officials in the American and other delegations said it was Reagan who pushed hardest for adoption of the statement. He was quoted as telling the other leaders at dinner Saturday night that there would be "grinning in the Kremlin" if they did not emphasize their willingness to deploy the new U.S. medium-range nuclear missiles in Europe unless an agreement can be reached with the Soviets.

"The statement would have failed yesterday if Reagan hadn't been so persuasive and tenacious," Deaver told reporters today. "It was critical to him."

Trudeau made an equally strong stand in advocating that any statement emphasize the need to reach an agreement with the Soviets that would make deployment of the new U.S. missiles unnecessary. He acknowledged today that he told the other leaders, "We should be busting our bloody asses for peace."

Asked about this today after the concluding formal session of summit talks, Secretary of State George P. Shultz said, "Everybody made strong statements, there are strong feelings, including by the president. They had a free, flowing, honest-to-God exchange and that's good."

"Once he thought he had an agreement, and then it looked like it might fall apart," Deaver said.

When the leaders met again in private session Sunday morning, Reagan made what one official described as "an impassioned plea" lasting 20 minutes. This official quoted Reagan as saying, "We are nations that fought together and fought each other and must stand united" against the Soviets.

This quote and others from summit sessions are based on what the seven heads of government told senior officials or reporters about what they said. Under Reagan's format for this summit, designed to promote frank discussion, even note-takers were barred from most of the deliberations and interpreters operated through earphones in a separate room. The seven nations' foreign and finance ministers were called in only at the conclusion of each session.

Trudeau in particular praised the success of this format. He said he tried a similar approach at the Ottawa summit in 1981, but it did not work. Here, Trudeau said, "The president took a gamble in having an unstructured summit, but it produced results and he won the gamble."

Both Kohl and Trudeau praised Reagan's direction of the summit agenda. They said he kept discussions flowing smoothly while allowing relaxed give-and-take comments that the others welcomed as refreshing. Both leaders said Reagan constantly jotted notes and seemed to be trying to take their views into account.

British Finance Minister Geoffrey Howe, without committing his government to this format for next year's summit in Britain, said: "Most people did feel it was useful to be discussing things less inhibited in advance by advance texts."

Canadian, French, British and West German officials, whose leaders met with Reagan at the 1981 Ottawa summit and the 1982 summit in Versailles, said the U.S. president was much better prepared this time. U.S. officials said Reagan briefed himself extensively, particularly on monetary policy, on which he had been regarded by some as weak.

A French source said that, when Reagan encountered West German and British criticism about big U.S. budget deficits, he gave detailed responses, going beyond his customary speeches and anecdotes.

There was criticism of Reagan from both the French and West Germans for devoting what they regarded as too much time to the arms control debate when they wanted to discuss U.S. budget deficits. But they still praised him for the way he handled the arms control discussion. And there were no reports of Reagan gaffes.

During Reagan's 1982 trip to Europe, the U.S. delegation was sometimes derided by European officials and reporters for constantly claiming that the president was displaying impressive leadership qualities. At one point, when a senior U.S. official was briefing reporters in Bonn, he was asked whether Reagan had been "magnificent or merely brilliant."

American officials made good-humored reference to this today. Spokesman Larry Speakes said with a smile that Reagan was "magnificent" and "didn't suffer from jet lag." Treasury Secretary Donald T. Regan remarked that Reagan was "unusually good" at the summit sessions.

Deaver, the aide considered closest to the president, said Reagan had "dominated the summit" and worked harder preparing for it than for any similar meeting.

"There's a certain amount of guarding against a disaster with this sort of thing, but the president did much more than that," Deaver said. "He produced a major statement on INF the medium-range missiles in Europe and a major statement endorsing economic recovery."

Another U.S. official said Reagan was "particularly sensitive" about reports that he has not been well prepared for some meetings and interviews in the past and about criticism that he was out of his intellectual depth in dealing with complex issues.

"The president worked extremely long and hard to dispel this impression," one official said. "We believe that he did."