Recent empirical studies have found significant evidence of departures from competition in the input side of the bread, breakfast cereal and margarine end-product markets. In this study we specify a general duality model of profit maximisation that allows for imperfect competition in the input and output markets of the grains and oilseeds industries. The model allows for variable-proportions technologies and can be regarded as a generalisation of several models appearing in the agricultural economics and industrial organisation literatures. Aggregate Australian data are used to implement the model for thirteen grains and oilseeds products handled by seven groups of agents. The model is estimated in a Bayesian framework. Results are reported in terms of (characteristics of) estimated probability distributions for demand and supply elasticities and indexes of market power.