Many studies of producer behavior consider cost and input demand functions derived from microeconomic theory and estimate them on the basis of aggregate data. If the characteristics of the firms differ, the negligence of heterogeneity can lead to estimation bias. An alternative is to restrict individual behavioral functions to being linear in the firm specific parameters. The aim of this paper is to describe aggregate producer behavior without placing too strong restrictions on functional form and to explicitly account for firm heterogeneity. Estimation for German manufacturing sectors confirms that neglected heterogeneity is an important source of bias in representative firm models.