President Reagan yesterday urged House members to "act affirmatively" on tax-overhaul legislation, but did not specifically endorse either the bill produced by the House Ways and Means Committee or a Republican alternative.

House Democratic leaders repeated yesterday that their tax-overhaul bill can pass only with strong support from Reagan and Republican legislators.

Meanwhile, House Republicans voted overwhelmingly in a party meeting to oppose the legislation written by the Democratic-controlled Ways and Means Committee, calling it "anti-family, anti-growth and anti-investment." Republican leaders, including House Minority Leader Robert H. Michel (R-Ill.) and Minority Whip Trent Lott (R-Miss.), oppose the bill, aides said.

Reagan, whose favor is considered crucial to passage of the measure when it comes up for a vote next week, said in a statement that both plans "represent substantial progress from current law" and that "the legislative process must be allowed to go forward." But he gave equal mention to the two packages and endorsed neither, a blow to Ways and Means Chairman Dan Rostenkowski (D-Ill.).

The statement was a compromise between Treasury Secretary James A. Baker III, who wanted a stronger statement in favor of the Ways and Means plan, and chief of staff Donald T. Regan, who wanted to give the Republicans a chance to offer their alternative without presidential disapproval, officials said.

Rostenkowski said Reagan's statement was "not as strong as we wanted, but it's enough to send the reform campaign into next week . . . . Clearly the president must come up with enough Republican votes to put reform over the top."

Rep. Robert T. Matsui (D-Calif.) said many members felt "it's not good enough and it doesn't help gain any support for the legislation . . . . For somebody who has made this the centerpiece of his domestic program for 1985 and put the Ways and Means Committee through the wringer for the last 12 months, he's got to get out there and call people and make this a priority."

House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) told reporters the votes of at least 75 Republicans will be needed to pass the Ways and Means package, which he said is supported by a plurality of Democrats. However, Republican lawmakers said as few as a dozen GOP members may vote for the bill, and more than 100 Republicans members opposed it during a voice vote in a meeting of the House Republican Conference.

Democrats emerged yesterday from a caucus of their own, where they had heard Rostenkowski explain the 1,363-page package, seemingly uncertain of their own views.

Rep. William H. Gray III (D-Pa.) said members "are really thinking through the implication of that . . . . Is there some curlicue down there that I didn't know about that next February is going to turn out to be disastrous for my state or my district?"

Administration lobbyists pushing the Ways and Means bill hope that GOP legislators will vote for their substitute. And, when it fails, they could vote for the Democratic package on the grounds that Reagan supports it.

Both proposals, like the plan submitted by Reagan in May, would reduce personal and corporate tax rates while eliminating or limiting deductions and credits. But the GOP substitute, expected to be modified before it is proposed in the House, would be more favorable to business. Both would reduce the top tax rate on individuals -- an important priority for Reagan -- less than the president proposed.

The House Rules Committee is expected to take up the tax measure Tuesday and to grant Rostenkowski's request to allow one vote on the Republican alternative, one procedural vote to send the Ways and Means plan back to committee and one vote on passage of the Ways and Means bill. A House vote is expected by next Thursday.

However, most representatives of oil-producing states are averse to the bill as are many from districts with timber interests or from northern industrial states.