The structure of light-emitting porous silicon layers, prepared by anodization of p-type wafers, has been investigated as a function of depth by microprobe Raman spectroscopy. The depth-profiles of the Raman scattering from aged samples, several micrometres thick, were carried out in the region of the optical phonons for crystalline silicon. The Raman data indicate the presence of both a predominant nanocrystalline phase and of an amorphous silicon component at any depth within the porous layers. A quantitative analysis of the experimental spectra is carried out in the frame of phonon confinement models, by assuming both a spherical shape for the nanocrystals and an inhomogeneous distribution of their sizes. When the probing laser spot approaches the region near the interface with vacuum, a remarkable reduction of the average size of the nanocrystals is found, with a substantially unchanged a-Si component.