Amgen Inc.'s (AMGN) second-quarter earnings rose 8.2% as weaker sales of the biopharmaceutical company's anemia drugs were offset by growth of other treatments. Shares rose 4.7% to $83 in after-hours trading Thursday as adjusted earnings and revenue beat expectations and the company raised its 2012 outlook. Through the close, the stock was up about 23% this year. For the year, the company raised its per-share earnings estimate to a range of $6.20 to $6.35 on revenue of $16.9 billion to $17.2 billion, from its prior estimates for $5.90 to $6.15 and $16.1 billion to $16.5 billion. Amgen has been pursuing deals to bolster its research-and-development pipeline and grow sales of its bone-building drugs to help offset declining sales of its anti-anemia drugs, which have slumped in recent years due to safety concerns and intensifying competition. Amgen recently completed a $1.16 billion acquisition of Micromet Inc., a deal expected to strengthen its cancer-drug research pipeline. Amgen reported a profit of $1.27 billion, or $1.61 a share, up from $1.17 billion, or $1.25 a share, a year earlier. Excluding acquisition-related charges, stock-compensation expenses and other items, earnings were up at $1.83 from $1.37. Revenue increased 13% to $4.48 billion, including 8% growth in product sales. Analysts polled by Thomson Reuters most recently projected earnings of $1.54 a share on revenue of $4.08 billion. Combined sales of Neulasta and Neupogen, which are used to ward off infections in patients undergoing cancer treatment, grew 2% mainly on an increase in U.S. average selling prices. Enbrel sales jumped 11%. However, sales of anti-anemia drugs Aranesp and Epogen were down about 8% and 3%, respectively. The company has been counting on its new bone-building drugs, Xgeva and Prolia, to boost overall sales growth. Second-quarter sales of Xgeva, a drug designed to prevent bone injuries in cancer patients, saw sales increase 17% from the first quarter. Sales of Prolia, for osteoporosis in women, climbed 36% quarter to quarter. Write to Tess Stynes at tess.stynes@dowjones.com Subscribe to WSJ: http://online.wsj.com?mod=djnwires