A dynamic model of voter behavior and the demand for public goods among social groups in Great Britain