The United States, retaliating against President Anastasio Somoza's refusal to accept mediation of the Nicaragua crisis, yesterday reduced its economic aid to that Central American country and ordered a drastic cut in the official U.S. personnel there.

But, in what State Department spokesman Hodding Carter called "an expression of hope that a settlement is still possible," the United States stopped short of breaking relations or recalling Ambassador Mauricio Solaun from Managua.

Instead, the steps ordered by President Carter will include the withdrawal of 47 U.S. officials, termination of the already suspended military assistance program and the halting of all nonmilitary aid projects except those that are in an advanced state and are designed to help the poor.

The personnel being withdrawn include the four-man U.S. military assistance group, the 21 Peace Corps volunteers stationed there, and 22 members of the embassy staff, including 11 officials of the Agency for International Development.

The aid cuts will involve canceling two development loans totaling $10.5 million and a freeze on any further economic assistance. Termination of the military aid program, which was suspended last September, will cut off approximately $800,000 in military equipment that had been in the pipeline to Nicaragua.

These actions against Somoza, whose family has controlled Nicaragua since 1935 and who formerly was regarded as Washington's staunchest ally in Central America, stemmed from the bloody civil war that broke out in September between his National Guard troops and civilians led by Sandinista Liberation Front guerrillas.

An Organization of American States mediating team that included special U.S. ambassador William G. Bowdler then sought to resolve the crisis by winning agreement to a plan that would have included free elections and the eventual withdrawal of Somoza from the presidency.

But, Hodding Carter said yesterday, the OAS mediators concluded that they could not break the impasse. Carter put the blame on "Somoza's unwillingness to accept the most recent proposal" by the mediators -- a call for an internationally supervised plebiscite on Somoza's future status.

"The unwillingness of the Nicaraguan government to accept the group's proposals, the resulting prospects for renewed violence and polarization and the human-rights situation in Nicaragua unavoidably affect the kind of relationship we can maintain with that government," Carter said. "In these circumstances, we cannot continue to maintain the same level and kind of presence in Nicaragua as we have had in the past."

However, the steps taken to put pressure on Somoza are certain to be criticized as inadequate by the governments in such liberal Latin American states as Venezuela and Costa Rica and by humanrights organizations in the United States.

These forces have been urging the Carter administration to use the maximum amount of diplomatic leverage at its disposal to try and force Somoza into submitting to the mediation plan.

But, although the administration is known to have considered recalling Solaun, it finally decided to take more limited action, at least for the present. That decision was prompted, in part, by counter pressures from Somoza supporters in the U.S. Congress who have threatened to hold up legislation to implement the Panama Canal treaties and to seek cuts in aid to other countries charged with human rights violations.

In addition, U.S. sources say, there was concern within the administration that more drastic measures might make Somoza even more resistant to persuasion and encourage new strife that could lead to a takeover by extreme leftist elements.

The steps announced yesterday, these sources added, are intended to allow the United States to keep its hand in the Nicaragua situation, while demonstrating sufficient displeasure with Somoza to retain some credibility and influence with the moderate opposition there.