Thermoelectric and magnetic properties of rare earth borides: Boron cluster and layered compounds