Theoretical characterization of carrier compensation in P-doped diamond