In this work, we use the methods of nonequilibrium statistical mechanics in order to derive an equation which models some mechanisms of opinion formation. After proving the main mathematical properties of the model, we provide some numerical results.