Principal component analysis (PCA) is a powerful tool for extracting common mode errors from the position time series of a regional station network determined by global navigation satellite system (GNSS). It is implicitly based on the assumption that a time series dataset contains temporally uniform white noise. Since the position time series of a regional station network are not uniform and could have data gaps, this paper develops a PCA-based weighted spatiotemporal filtering (WSF) approach by taking into account the positioning formal error of daily solution and the data gaps in time series. The position time series of 27 GNSS stations of the Crust Motion Observation Network of China are analyzed to demonstrate the performance of WSF approach, and also compared with the modified PCA technique in Shen et al. (J Geod 88:1-12, 2014). It shows that the WSF approach outperforms the modified PCA at 21, 19 and 17 out of the total 27 stations for north, east and up components, respectively. The average formal standard deviation of unit weight derived from WSF and modified PCA are 2.12, 2.42, 5.88 and 2.21, 2.52, 6.05 for north, east and up components, respectively; the relative improvements are 4.1, 4.0 and 2.8 %. Moreover, two simulations of a network with 4 stations are processed to show the performance of WSF. The results show that WSF provides better results for all coordinate components of all stations when the local effects are small or negligible. For cases when the local effects becoming larger, the WSF performs better than the modified PCA from the statistical point of view. From the real and synthetic time series analysis results, it is reasonable to conclude that the positioning formal error of daily solution should be considered in spatiotemporal filtering.