  In order to reach the sensitivity required to detect gravitational waves,
pulsar timing array experiments need to mitigate as much noise as possible in
timing data. A dominant amount of noise is likely due to variations in the
dispersion measure. To correct for such variations, we develop a statistical
method inspired by the maximum likelihood estimator and optimal filtering. Our
method consists of two major steps. First, the spectral index and amplitude of
dispersion measure variations are measured via a time-domain spectral analysis.
Second, the linear optimal filter is constructed based on the model parameters
found in the first step, and is used to extract the dispersion measure
variation waveforms. Compared to current existing methods, this method has
better time resolution for the study of short timescale dispersion variations,
and generally produces smaller errors in waveform estimations. This method can
process irregularly sampled data without any interpolation because of its
time-domain nature. Furthermore, it offers the possibility to interpolate or
extrapolate the waveform estimation to regions where no data is available.
Examples using simulated data sets are included for demonstration.
