An econometric model with an endogenous government sector