As President Reagan tries to emerge from the political trauma of the Iran-contra hearings, a quiet struggle is taking place within his administration over how to put the best face on the remaining 18 months of his presidency.

White House officials and Republican political strategists say battle lines have been drawn between White House chief of staff Howard H. Baker Jr., who favors a limited but big-ticket agenda of arms control and budget compromise, and conservatives who want the president to go out fighting and draw clear partisan lines for the 1988 election campaign.

"What Howard really would like is to get the president safely home to port without further calamities and to add the glow of an arms agreement in his final year in office," said a Republican close to the administration. "What some of the fire-eaters want is a year and a half of Congress-bashing and confrontation."

Reagan, in a combative mood after weeks of congressional hearings into the Iran-contra affair that have exposed seminal deficiencies in his presidency, is said to be of both minds, depending on the day and the issue.

He has muted his anti-Soviet rhetoric in hope of encouraging an arms-control agreement that would eliminate intermediate-range nuclear weapons in Europe and Asia. But he has virtually ignored Baker's attempt to reach a budget compromise with Congress that would require new taxes, even if called by some other name.

Last week, to the dismay of some who wanted him to be more selective, Reagan signaled a "veto strategy" on as many as eight major pieces of legislation. If he carries out his threat, Republicans and Democrats alike foresee a probable government gridlock when Congress returns from its summer recess in September.

"The White House has no legislative agenda," complained Senate Majority Leader Robert C. Byrd (D-W.Va.) in an interview. "Its agenda is to stop, to stall, to veto, to obstruct, to square off against Congress."

In many respects, the present struggle between competing administration factions echoes those which have resounded through White House corridors for the past 6 1/2 years.

But the situation confronting Howard Baker and his White House team is different in many respects from that which faced White House chief of staff James A. Baker III in the first term.

The most obvious difference is Reagan's fall from public grace because of the Iran-contra hearings. Reagan was also seriously damaged by the Republican loss of the Senate to the Democrats last year.

While Reagan bridles at suggestions that he is a "lame duck," some aides privately acknowledge that the administration has been largely unsuccessful in trying to influence the shape of such important legislation as the trade bill and catastrophic health insurance.

"We're in such a weakened position that we have no real weapon left except a veto threat," said a senior official last week.

Baker, trying to maneuver between a resurgent Democratic Congress and intransigent administration conservatives, has proved a disappointment to some of his friends on Capitol Hill, where he was admired as a conciliatory Senate majority leader during Reagan's first term.

When Baker succeeded the unpopular-with-Congress Donald T. Regan as White House chief of staff last March, it was widely believed that he would take the lead in forging a grand compromise that would reduce the federal budget deficit and maintain a high level of defense spending at the cost of accepting some mild tax increases opposed by the president.

It has not worked out that way, at least on most issues.

House Democratic leader Tony Coelho (D-Calif.) said he thinks "Baker wants to deal but that the unengaged president does not."

Some Republicans give similar analyses. Sen. Nancy Landon Kassebaum (R-Kan.) said Baker went into the White House "thinking he could be a conciliator, as he was as majority leader," but came to realize that the roles were very different. "Basically, I think it's just Reagan being tough -- Reagan being Reagan, you know."

Howard Baker's team, which includes Kenneth M. Duberstein, an early White House pragmatist and now deputy chief of staff, and communications director Thomas C. Griscom, has learned that Reagan seems to be less concerned with legislative results than in the past.

"He has less chance of success even if he plays his cards right, so it's more difficult to argue that he can win if he goes one way and will lose if he does something else," a White House official said. "If you're going to lose anyway, why not make the case you believe in?"

According to some sources, Baker does not have the close relationship with the president as his two predecessors. Reagan and Baker like each other, these sources say, but often are on different wavelengths. Baker "doesn't tell him {the president} jokes every morning like Don Regan did," one senator said.

A senior White House official said there was "a basic misperception" when Baker replaced Regan that he would "just take over and run things." The official said that it was evident from the first that Reagan was going to set the priorities.

Still, White House officials insist that Baker is a long way from throwing in the towel. These officials say that Baker and his "realists" -- a term they prefer to "pragmatists" -- have also won some fights behind the scenes.

Last week, for instance, the AIDS advisory group named by Reagan included one openly gay member, New York geneticist Frank Lilly. White House sources described this decision as a victory for the Baker team, reportedly backed by first lady Nancy Reagan, over conservatives led by domestic policy adviser Gary Bauer who did not want any homosexual on the 13-member board.

Baker also has been successful in persuading Reagan to consult beforehand with Congress on such major policies as sending reflagged Kuwaiti oil tankers through the Persian Gulf and in his nomination of Robert H. Bork to a Supreme Court vacancy.

Even some White House officials acknowledge, however, that the consultations with Congress have been largely symbolic. Reagan was undeterred by congressional objections to his Persian Gulf policy, and he was said to have his mind made up on Bork before he circulated a list of supposed high court candidates to Congress.

In coming months the difference between the competing factions in the White House is likely to be most evident on the tactics employed on two matters dear to the president's heart -- the Bork confirmation and a renewed effort to win congressional approval of continued U.S. military aid for the Nicaraguan contras.

For now at least, Reagan has accepted the Baker strategy of stressing Bork's legal credentials rather than his conservative views. But conservatives continue to insist that the president will ultimately have to accept the challenge of liberals who want the confirmation to be an ideological test and abandon the low-key strategy that has prevailed for the moment.

A similar tactical conflict is occurring over Reagan's efforts to continue contra aid. Conservatives want Reagan to ask for massive military support for the contras -- former White House communications director Patrick J. Buchanan has suggested $500 million -- in an effort to broaden the rebel military effort and sustain it into the administration of Reagan's successor.

Baker's team is aware that it will be difficult to persuade Congress to give the contras anything. His strategy is said to call for $140 million aid over 18 months as part of a package that also includes another effort to negotiate with the leftist Sandinista government of Nicaragua.

"There's a fundamental problem," said a White House official who favors the latter strategy. "We'd like to be successful. There are some people pushing this who don't care whether we win or not and would prefer to have a political issue."

Whether the White House prefers to try to win on contra aid or Bork or build a political case for 1988 ultimately will be decided by Reagan, White House officials agree.

Staff writers David Hoffman and Helen Dewar contributed to this report.