We study the structures and magnetic phase stability of rare earth diboride compounds, RB2, using density functional simulations within the local density approximation. At zero pressure the hexagonal (P6/mmm) structure is energetically stable and at high pressure these materials prefer to keep the same structure. The five different elastic constants, bulk modulus, shear modulus, and hardness of all the hexagonal compounds have been calculated. The pressure dependence of the volumes is determined. The calculated large bulk modulus and high hardness reveal that they are incompressible and hard materials. The structural parameters and magnetic phase stability for RB2 (R = Tb, Dy, Ho, Er, Tm, and Yb) compare quite well with experimental results. For the others rare earth materials, our results are predictions.