In complex oxide materials, changes in electronic properties are often associated with changes in crystal structure, raising the question of the relative roles of the electronic and lattice effects in driving the metal-insulator transition. This paper presents a combined theoretical and experimental analysis of the dependence of the metalinsulator transition of NdNiO 3 on crystal structure, specifically comparing properties of bulk materials to one and two layer samples of NdNiO 3 grown between multiple electronically inert NdAlO 3 counterlayers in a superlattice. The comparison amplifies and validates a theoretical approach developed in previous papers and disentangles the electronic and lattice contributions, through an independent variation of each. In bulk NdNiO 3 the correlations are not strong enough to drive a metal-insulator transition by themselves: a lattice distortion is required. Ultra-thin films exhibit two additional electronic effects and one lattice-related effect. The electronic effects are quantum confinement, leading to dimensional reduction of the electronic Hamiltonian, and an increase in electronic bandwidth due to counterlayer induced bond angle changes. We find that the confinement effect is much more important. The lattice effect is an increase in stiffness due to the cost of propagation of the lattice disproportionation into the confining material.transition metal oxide | metal-insulator transition | heterostructure | epitaxial constraint | structural modulation | layer confinement Introduction:. Metal insulator transitions (MIT) in correlated electron materials typically involve changes in both the electronic and atomic structure. The relative importance of the two effects has been the subject of extensive discussion(1-8). In this paper, using a recently developed theoretical approach (3, 8), we argue that comparison of few-layer and bulk materials yields considerable insight into the relative importance of electronic and lattice contributions, essentially because these are affected by heterostructuring in opposite ways. We disentangle these effects by independently changing each. Motivated by recent experimental (9-25) and theoretical (8,13,(26)(27)(28)(29)(30)(31)(32)(33)(34)(35)(36) results, we focus here on the rare earth nickelate family of materials. The concepts, formalism and findings are applicable to wide classes of materials.