Public sector output provision is influenced not only by discretionary inputs but also by exogenous environmental factors. In this paper, we extended the literature by developing a conditional dea estimator of allocative efficiency that allows a decomposition of overall cost efficiency into allocative and technical components while simultaneously controlling for the environment. We apply the model to analyze technical and allocative efficiency of dutch secondary schools. The results reveal that allocative efficiency represents a significant 37 percent of overall cost efficiency on average, although technical inefficiency is still the dominant part. Furthermore, the results show that the impact of environment largely differs between schools and that having a more unfavorable environment is very expensive to schools. These results highlight the importance of including environmental variables in both technical and allocative efficiency analysis.