#*********************************************** #Laboratorio 21: Suavizadores bidimensionales # regresorgrama, running means, regresion por kernels y lowess #Edgar Acuna, Mayo 2003 #********************************************** regresorg<-function (x,y,k) {# *********************************************************** # Funcion que calcula el regresorgrama # Input # Edgar Acuna, Mayo 2003 # ************************************************************ n<-length(x) x<-sort(x) y<-y[order(x)] xpoints<-x[1] nint<-floor(n/k) ymeans<-rep(0,k) for(j in 1:k) { ind<-((j-1)*nint+1):(j*nint) if(j