Lumber company Weyerhaeuser said Friday that its second-quarter net income more than doubled as it benefited from an improving housing market, which drove up demand for lumber and other wood products.

But the Federal Way company’s shares fell after it predicted a smaller third-quarter profit in its biggest segment — wood products — because of rising expenses and lower selling prices for some products.

The company earned $196 million, or 35 cents a share. That was up from $84 million, or 16 cents a share, during the same period last year. Revenue rose 19 percent to $2.14 billion, from $1.79 billion a year earlier.

Analysts surveyed by FactSet had been expecting a profit of 30 cents a share on revenue of $2.04 billion.

Earnings from its largest segment, wood products, more than tripled to $136 million. However, it’s come under pressure in recent months from lower selling prices for oriented strand board and higher raw material costs compared with the first quarter. Manufacturing costs have risen, too. Weyerhaeuser said the segment would produce lower profits in the third quarter as prices for oriented strand board continue to fall.

The decline will be partially offset by higher sales volumes across most wood product lines.

Weyerhaeuser stock closed down 34 cents, or 1.2 percent, at $28.80 Friday.