Republican presidental hopeful John B. Anderson yesterday abruptly canceled a five-state campaign swing to give himself more time to study prospects of launching an independent candidacy.

It was the latest in a series of unpredictable actions the Illinois congressman has taken in recent weeks as he ponders dropping out of the GOP race. It gives him an entire week without a single campaign appearance.

Anderson's press secretary, Mark Bisnow, said the candidate decided to spend a week with his family and to hold staff consultations on "congressional issues and campaign matters."

"I as a wife have put my foot down," Anderson'w wife, Keke, considered his closet adviser, said in a telephone interview. "They have run this campaign like it's the Six Million Dollar Man who's the candidate. He hasn't had a day off since Jan. 1."

After taking Monday and Tuesday off, Anderson had scheduled appearances in Tennessee, Indiana, Michigan, Ohio and Pennsylvania this week.

It was the second time Anderson had dropped off the campaign trail for an extended period since he finished third in the Wisconsin GOP primary April 1.

"I presume he wants some more time to think about a lot of things," said David Garth, the New York political consultant who is studying the practicality of an independent candidacy for Anderson. "And that includes whether to go ahead with his campaign for the Republican nomination."

Garth and Anderson spokesmen in Washington indicated they don't expect a quick decision. "I don't think it's going to happen by the end of the week," Garth said. "You're talking about a major step. John Anderson has been a Republican a long time."

The timing for a decision is becoming crucial for Anderson to decide to run as an independent or third-party candidate, because he would want to be on the ballot in as many states as possible.

The deadlines for getting on the ballot as an independent or third-party candidate have already passed in many states. Some deadlines are coming up in the next three months.

Anderson's spokesmen yesterday declined to speculate about what the candidate may decide. But two polls being cited inside the campaign may give some indication of how advisers are leaning.

One is a poll by the George Gallup organization published Sunday. Nationally, it showed Anderson collecting 21 percent of the support of registered voters compared with 34 percent for Ronald Reagan, the likely GOP nominee, and 39 percent for President Carter.

In the West, Anderson and Carter ran neck and neck, each with the support of 29 percent of the voters. Reagan led both with 36 percent.

The other poll was taken by the Los Angeles Times on March 25, the day of the New York primary. It asked Republican and Democratic voters to record favorable and unfavorable impressions of candidates.

Anderson finished in the poll with a 68 percent favorable rating. Sen. Edward M. Kennedy was second with a 60 percent favorable rating followed by President Carter with 51 percent and Ronald Reagan with 30 percent.