Back in October, when the crowds lured so enticingly, the course for John B. Anderson, the independent presidential candidate, seemed straight and true.

He wouldn't win the presidency, but he would end the campaign with dignity and grace. History would soon declare him a political martyr, unafraid to go up against impossible odds. Political do-gooders would beat a path to his door. Money and fame would follow.

But since the November election the former Republican congressman has disappeared from the political landscape. Unable to decide what to do, Anderson has moved back to his home town of Rockford, Ill., much to the surprise of many friends, and has gone on the lecture circuit.

He has equipped himself with a fresh set of Ronald Reagan lines. In a recent speech before the Northeast Lumbermen's Association in Boston, for example, he said the president-elect appeared during the transition period to be taking the advice of two old Hollywood buddies.

First he quoted Spencer Tracy: "Just know your lines and don't bump into the furniture." Then he recited an old John Wayne line: "Talk low. Talk slow. And don't say too much."

The lines seemed appropriate. But the confidence with which they were delivered masked the uncertainty Anderson has about his own future. With the opening of the 97th Congress, he is unattached and unemployed, out of government for the first time in more than two decades.

Quite simply, he is at a loss about what to do. He is torn, not knowing whether to lament or enjoy his new-found freedom.

"I'm looking forward to a new career. But there are rites of passage you have to navigate," he said in an interview. "It's a bittersweet time."

He has agreed to teach a class on international relations at Stanford University in the spring, and is considering several other offers to teach or practice law. While he decides, Anderson and his wife, Keke, have returned to Illinois so that their two younger daughters, 9 and 16, can finish the school year there. He said the Andersons will continue to maintain their Washington home.

But he has suspended plans he had hinted about during the final weeks of the fall campaign to launch a third party, or third-force effort in 1984 or before.

"I've felt the transition period was a very poor time to make any permanent decisions until we have seen the complete outlines of the Reagan administration," he said. "It seemed premature."

Anderson has been besieged with conflicting counsel from former campaign advisors during meetings in recent weeks. One group, led by his former press secretary, Tom Mathews, has urged him to set up a permanent organization and begin setting an agenda for the 1980s that could serve as a basis for a third-party effort in 1984. Another advised him to avoid this and consider other options.

The argument for a third-force effort was theoretically attractive, and financially feasible. Anderson raised $12.7 million and accumulated a list of 217,000 contributors during his six-month independent campaign. Mathews, a partner in a direct-mail fund-raising firm, estimates that from $2 million to $3 million could be raised annually from the 217,000 donors to support an ongoing group, led by Anderson or someone else, a sort of political Common Cause.

Anderson has rejected taking part in such an effort at this time, Mathews said. "It was too far-reaching."

Mathews, whose firm handles fund-raising for a host of liberal groups, is convinced that the nation will be ready for an independent or third-force candidate in 1984. "The pressures are building up for independent action," he said. "The mantle is going to end up on somebody, and I don't know who.

"Our theory is that people gave not only to Anderson, but to the idea of independent political action," he said.

Anderson seems less inclined to write his own political obituary. But he appears to want to be anointed with some sort of ill-defined leadership role, rather than willing to seek it out.

"In one way or another, someone who has spent a quarter of a century in public service doesn't suddenly put down the oars," he said, adding that he will continue to speak out on public issues while on the lecture circuit."Fortunately, or unfortunately, there is a demand for former presidential candidates to appear around the country."

Although he received only 6.6 percent of the vote, Anderson said he kindled fires of support which continue to burn. But he feels under no immediate pressure to capitalize on them. "I see this as a developing process," he said. "I don't expect a clarion call. It all depends on events."

He has moved the remnants of his old campaign out of their fashionable Georgetown offices into much more modest quarters in the Woodward Building in downtown Washington. The campaign still has a debt of $600,000, much of it borrowed from supporters in chunks of several hundred dollars each.

Anderson is determined that the entire debt be repaid. Besides a mail appeal for donations, plans are being made for a series of fund-raising "birthday receptions" in February, when he will celebrate his 59th birthday.

During the campaign, Anderson and his wife frequently complained privately about life in Rockford, and about the lukewarm support his independent presidential bid received there. But they decided to move back at least until June and the end of the school year. Anderson said he intends to commute frequently to the capital.

Meanwhile, Anderson, who is not personally wealthy, will support himself on speaking fees and his pension. As a veteran of 25 years of federal employment (20 years in Congress plus 2 1/2 years each in the Army and the Foreign Serivce), he is eligible for a pension of about $36,000 a year.