Eighteen people died and 168 were injured when a train derailed in northeastern Taiwan on Sunday, authorities said, in the island’s worst rail disaster in more than three decades.