LISA Pathfinder (LPF), ESAs precursor mission to a gravitational wave observatory, will measure the degree to which two test-masses can be put into free-fall, aiming to demonstrate a residual relative acceleration with a power spectral density (PSD) below 30 fm/s$^2$/Hz$^{1/2}$ around 1 mHz. In LPF data analysis, the measured relative acceleration data series must be fit to other various measured time series data. This fitting is required in different experiments, from system identification of the test mass and satellite dynamics to the subtraction of noise contributions from measured known disturbances. In all cases, the background noise, described by the PSD of the fit residuals, is expected to be coloured, requiring that we perform such fits in the frequency domain. This PSD is unknown {it a priori}, and a high accuracy estimate of this residual acceleration noise is an essential output of our analysis. In this paper we present a fitting method based on Bayesian parameter estimation with an unknown frequency-dependent background noise. The method uses noise marginalisation in connection with averaged Welchs periodograms to achieve unbiased parameter estimation, together with a consistent, non-parametric estimate of the residual PSD. Additionally, we find that the method is equivalent to some implementations of iteratively re-weighted least-squares fitting. We have tested the method both on simulated data of known PSD, and to analyze differential acceleration from several experiments with the LISA Pathfinder end-to-end mission simulator.