By Kate Gibson

As the U.S. stock market on Thursday rode a wave largely dictated by the latest quarterly earnings, some equity analysts say investors would be wise to focus on sectors where the government also is investing, namely manufacturing and residential real estate.

"The government is not only the lender but the spender of last resort," said Doug Roberts, chief investment strategist for Channel Capital Research.

Economic conditions have improved, helped along by political actions and economic stimulus," said Robert Pavlik, chief market strategist at Banyan Partners LLC, which early this year turned to early cyclical sectors that would benefit as the economy began to rebound.

"The sectors we continue to favor include consumer discretionary, industrials, financials, basic materials and the technology," Pavlik said.

"Bill Gross of Pimco says he's directing his portfolio to where government is buying," said Roberts, referring to the manager of Pimco Total Return Fund (PTTRX), who lately has been reducing exposure to mortgage-related securities. .

Depending on which estimates one uses, Roberts added, as much as 80% of the stimulus hasn't actually been spent yet.

On Thursday, U.S. stocks solidified gains in afternoon trade, with earnings reports from multiple components on the Dow Jones Industrial Average (DJI) boosting sentiment and the blue chips, lately up 131.95 points, or 1.3%, to 10,081.31. The S&P 500 Index (SPX) added 11.51 points, or 1.1%, to 1,092.91, while the Nasdaq Composite Index (RIXF) added 14.56 points, or 0.7%, to 2,165.29.

Among the leaders on the Dow industrials were shares of 3M Co. (MMM), up 3.2%, after the St. Paul, Minn.-based diversified industrial giant lifted its 2009 guidance.

Among the session's top gainers, ProLogis (PLD) shares jumped 9.1% after the real estate trust, which operates industrial distribution centers, noted stabilization in property markets. .

Elsewhere, the shares of home builders were mostly higher, with KB Home (KBH) up 7.5%, and Lennar Corp. (LEN) rising 7.6%. Pulte Homes Inc. (PHM) added 6.5% to its market capitalization.

Shades of beige

Pointing to Wednesday's release of the Federal Reserve's summary of current economic conditions, commonly known as the Beige Book, Roberts said "the bright spots were residential real estate and manufacturing." .

While the improved climate for manufacturing is in large part related to government support of the auto industry, Roberts highlighted the "ripple effect" that comes along with the sector's improvements.

Shares of Goodyear Tire & Rubber Co. (GT), for instance, have climbed 193% so far this year.

Plus, "manufacturing is the first to come back when you have an economic recovery," he said.

"Not surprisingly, the two sectors the book highlights as 'leading the more positive sector reports among districts' were real estate and manufacturing, among the hardest-hit sectors of the economy and the two benefiting the most from government support," said Dan Greenhaus, chief economic strategist at Miller Tabak & Co.

The Beige Book "supports the notion that the U.S. economy is experiencing a slow recovery, with significant aid from government-stimulus programs such as the first-time home-buyer credit and the recently expired 'cash for clunkers,'" commented Nicholas Colas, ConvergEx chief market strategist. "The report reads like a blueprint for an economy that continues to require both low interest rates and continued extraordinary monetary stimulus."

Technology and energy are also sectors where Roberts sees promise, saying the former can be a great cost saver for companies and the latter likely to be stimulated by foreign demand as the world industrializes.

Roberts also predicts a bullish, long-term secular trend in the pharmaceutical trade, reasoning that as the country's population ages there will be increased demand for drugs.