A coupled-channel computer program has been used to calculate dispersion corrections to elastic and inelastic electron scattering from Sm152 and Er166 arising from the virtual excitation of some intermediate states in the ground state rotational band. Data from recent experiments on these nuclei have been analyzed using both phenomenological and Fourier-Bessel forms for the transition charge densities. The inclusion of dispersion corrections in the analysis was found to affect the extracted nuclear transition charge densities at a level comparable to other sources of uncertainty. These dispersion corrections did not remove the discrepancies existing between these experiments and the predictions of microscopic theories. NUCLEAR REACTIONS Sm152(e, e′), and Er166(e, e′) calculations, coupled-channels, 35 MeV<E<350 MeV. Dispersive effects on elastic and inelastic cross sections and on extracted nuclear shapes. © 1978 The American Physical Society.