Effective temperature and compactivity of a lattice gas under gravity