Influence of particle number projection and residual interaction on the yrast bands in rare earth nuclei