* TSX down 22.84 points, or 0.14 percent, at 16,348.97
* Six of the TSX's 10 main groups move higher
* Materials group down 1.7 percent, energy off 0.5 percent
TORONTO, Jan 16 (Reuters) - Canada's main stock index edged lower in morning trading on Tuesday as gold miners weighed down heavyweight resource stocks amid a commodity price retreat, even as marijuana producers extended a recent rally.
* At 10:03 a.m. EST (1503 GMT), the Toronto Stock Exchange's S&P/TSX composite index .GSPTSE was down 22.84 points, or 0.14 percent, at 16,348.97. Only four of the index's 10 main groups were in negative territory, but two of those - energy and materials - play an influential role overall.
* The materials group, which includes precious and base metals miners and fertilizer companies, lost 1.7 percent while the energy group retreated 0.5 percent.
* The most influential weights included Barrick Gold Corp ABX.TO , which fell 4.2 percent to C$18.67, and diversified miner Teck Resources Ltd TECKb.TO , down 3.8 percent at C$37.18.
* Gold slipped from a four-month high hit on Monday as the U.S. dollar clawed back some lost ground, while copper and nickel hit multi-week lows. Crude prices also pulled back after recent gains. Goldcorp Inc G.TO declined 3.2 percent to C$18.49 after lowering its estimate for all-in sustaining costs. On the positive side of the ledger, marijuana stocks extend Monday's gains, with Aurora Cannabis ACB.TO up 9.5 percent to C$12.59, Canopy Growth Corp WEED.TO up 4.1 percent to C$38 and Aphria Inc APH.TO adding 5.5 percent to C$22.90.
* BlackBerry Ltd BB.TO also added to Monday's gains, advancing 1.2 percent to C$17.69, after launching new cybersecurity software which identifies vulnerabilities in programs used in self-driving cars. Yellow Pages Ltd Y.TO advanced 1.2 percent to C$8.31 after the company once well known for its thick-print directories said it would fire about 500 employees to cut costs and turn around its digital advertising platform. SSR Mining Inc SSRM.TO jumped 8.6 percent to C$11.1 after the precious metal miner reported fourth-quarter earnings and provided guidance for 2018.