The partitioning of electron correlation energy into dynamical and nondynamical components is examined in the context of the local-scaling transformation version of density-functional theory. An assessment is made of the relative importance of these components for the beryllium atom and its isoelectronic sequence. In particular, the problem of finding a multiconfiguration reference wave function differing only in dynamical correlation from the exact wave function is considered. It is shown that to a good approximation this reference wave function is given by Ψ = C11s22s2 + C21s22p2. The concepts of "long-range" and "short-range" correlation are re-examined from a perspective based on the reference wave function.