The magnetic behaviour of rare-earth—transition metal compounds