Detrended fluctuation analysis (DFA) is a scaling analysis method used to quantify long-range power-law correlations in signals. Many physical and biological signals are ``noisy, heterogeneous and exhibit different types of nonstationarities, which can affect the correlation properties of these signals. We systematically study the effects of three types of nonstationarities often encountered in real data. Specifically, we consider nonstationary sequences formed in three ways: (i) stitching together segments of data obtained from discontinuous experimental recordings, or removing some noisy and unreliable parts from continuous recordings and stitching together the remaining parts -- a ``cutting procedure commonly used in preparing data prior to signal analysis; (ii) adding to a signal with known correlations a tunable concentration of random outliers or spikes with different amplitude, and (iii) generating a signal comprised of segments with different properties -- e.g. different standard deviations or different correlation exponents. We compare the difference between the scaling results obtained for stationary correlated signals and correlated signals with these three types of nonstationarities.