Econometric modelling of heterogeneous consumer behaviour: theory, empirical evidence and aggregate implications -PhD Thesis-