The Associated Press reports that coffee makers and retailers who sell their beans in grocery stores will benefit from the economic downturn in 2009, a Stifel Nicolaus analyst said Monday.

Steve West said in a note to investors that Peet’s Coffee & Tea Inc. and Dunkin’ Donuts, owned by privately held Dunkin Brands Inc., “will benefit as consumers trade out of specialty coffee houses to brew at home due to the current challenging economic environment.”

Peet’s coffee can be higher-priced than that of value players like Dunkin’ Donuts. But the chain is expanding and increasing its presence in grocery stores nationwide, helping to fuel growth in sales there, West said.

West said Dunkin’ Donuts, meanwhile, took dollar share away from Starbucks Corp. in grocery stores in April. Starbucks also sells its beans in grocery stores but they are typically more expensive than Dunkin’s beans.

The analyst also predicted that McDonald’s Corp., which is now rolling out a line of espresso-based drinks to all of its 14,000 U.S. locations, will steal customers from Starbucks.

Both McDonald’s and Starbucks began large-scale marketing campaigns earlier this month to tout their specialty drinks.

Shares of Peet’s fell 10 cents to $26.57 in afternoon trading while shares of McDonald’s dipped 45 cents to $54.47.

Starbucks shares slipped 3 cents to $13.63.