Hello, I have some xy data which clearly shows a non-monotonic, peaked triangular trend. You can get an idea of what it looks like with:
x<-1:20 y<-c(2*x[1:10]+1,-2*x[11:20]+42) I've tried fitting a quadratic, but it just doesn't the data-structure with the break point adequately. Is there anyway to fit a triangular or 'tent' function to my data in R? Some sample code would be appreciated; I'm not new to R, but I sometimes have difficulty understanding the model-fitting functions (finally figured out how to extrapolate with predict() today!) Thanks! -Dave Bapst, UChicago ______________________________________________ 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.