Sparse high-dimensional linear regression. Estimating squared error and a phase transition