# 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.

1. What's the best type of regression to fit here?
2. 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.

• I don't see any bimodality. I see an issue of fit. Do you have any domain knowledge about the issue, how these two variables should behave? Jun 22 at 10:55
• @user2974951 I see data distributed at either ends (two peaks in abundance). Yes, there is an issue with the fit. Any suggestions on how to go about it? Jun 22 at 10:56
• Why are there no measurements "in between" rainfaill ends? Jun 22 at 11:00
• @user2974951 Thes plants are unique in the sense that it is not favored at intermediate rainfall, only low or high rainfall (summer or late fall). My first instinct was to fit a quadratic but I see that it's not the best approach. Jun 22 at 11:01
• I see, so you could say that low rainfaill is summer and high rainfall is fall? Jun 22 at 11:02

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