N-type AlxGa1-xN exhibits a dramatic decrease in the free-carrier conc
entration for x greater than or equal to 0.40. Based on first-principl
es calculations, we propose that two effects are responsible for this
behavior: (i) in the case of-doping with oxygen (the most common unint
entional donor), a DX transition occurs, which converts the shallow do
nor into-a deep level; and (ii) compensation by the cation vacancy (V-
Ga or V-Al), a triple acceptor,increases with alloy composition x. For
p-type doping, the calculations indicate that the doping efficiency d
ecreases due to compensation by the nitrogen vacancy. In addition, an
increase in the acceptor ionization energy is found with increasing x.