Principal components analysis of three-way tables