What test to implement for a regression where points are biomdally distrbuted (i.e. two peaks)? The data looks at abundance vs rainfall. Abundance peaks at low or high rainfall. Fitting a quadratic creates a false peak at intermediate rainfall.

*

*What's the best type of regression to fit here?

*What type of test can I do to confirm this bimodal peak? I believe diptest is useful for a distribution not necessarily a regression.

The first image is a fit with excluding the zeros. The second is a fit including the zeros. As you see, the second fit is zero-inflated. But that pulls down the ends of the quadratic curve and creating on what looks like a false peak.



Two thoughts.
First, don't try to force the data into a single quadratic form. If you want to model a nonlinear relationship between an outcome and a predictor, use a flexible method like a regression spline. See this page among many others on this site. Or use a generalized additive model, as implemented for example by the mgcv package in R
Second, if your "Abundance" values are counts, as they seem to be, you should start with a Poisson generalized linear model. You might need additionally to model zero-inflation or over-dispersion (e.g., with a negative binomial model), but the data you have do not seem to meet the assumptions of the ordinary least-squares modeling you are doing. If the "Abundance" values are even just derived from count observations, you should go back to the count values and model the counts directly.
