Nonparametric regression for nonstationary processes