[R] Fitting a Triangular Distribution to Bivariate Data

David Bapst dwbapst at gmail.com
Wed Dec 22 19:19:16 CET 2010

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:


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!)

-Dave Bapst, UChicago

More information about the R-help mailing list