Network analysis with negative links