Magnetoelastic effects in the rare earth metals