Estimating Error Correlation in Nonparametric Regression