Hi, I'm wondering which function would allow fitting this type of data:
tmp=rnorm(2000) X.1 = 5+tmp Y.1 = 5+ (5*tmp+rnorm(2000)) tmp=rnorm(100) X.2 = 9+tmp Y.2 = 40+ (1.5*tmp+rnorm(100)) X.3 = 7+ 0.5*runif(500) Y.3 = 15+20*runif(500) X = c(X.1,X.2,X.3) Y = c(Y.1,Y.2,Y.3) plot(X,Y) The problem with loess is that distances for the "goodness of fit" are calculated on the Y-axis. However, distances would need to be calculated on the normals of the fitted curve. Is there a function that provide this option? A simple trick in that case consists in swapping X and Y, but I'm wondering if there is a more general solution? Thanks for your input, Emmanuel ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.