plot3d.localpoly.reg(X,Y, bandwidth = 0, gridsize = 30, degree.pol = 0,
kernel.type = "epanech", gridsurface = 30, xlab=expression(X_1),
ylab=expression(X_2), zlab=expression(Y), theta = 30, phi = 30,
expand = 0.5, col = "lightblue", ltheta = 120, shade = 0.75,
ticktype = "detailed", pch = 16,...)localpoly.regX = matrix(0,50,2)
X[,1] = runif(50,-2,2)
X[,2] = runif(50,-2,2)
Y = 4*sin(pi*X[,1]) + X[,2] + rnorm(50)
plot3d.localpoly.reg(X,Y, bandwidth=-2, gridsize = 15, degree.pol = 0, gridsurface=20)Run the code above in your browser using DataLab