The UK economy will be 3.5% smaller than if it had stayed in the EU, claims a new study.