Least Squares-Based Permutation Tests in Time Series