Model Checking and Variable Selection in Nonparametric