Effective electron–electron interactions and magnetic phase transition in a two-dimensional electron liquid