Change Point Analysis for Environmental Data Does anyone know of somewhere with resources on using change point analysis for determining environmental threshold values? Let me emphasize that this is NOT time series data. Change point analysis is often used in ecology to determine a point along a gradient (let's say temperature) at which ecology changes drastically. So let's say a fish species dies out if water temp rises above 25C; using change point analysis would identify this point in an x-y relationship of temperature and fish counts. I know this can be done but am having trouble finding suitable instructions for doing it myself. I use R and have the changepoint package but cannot figure out how to get it to work. Am I using the right package? Should I try something else? Any help would be greatly appreciated!
 A: I think you are on the right track and I guess that in principle the changepoint package should be usable. You can simply order your response variable (e.g., a species abundance) by the gradient of interest (e.g., water temperature) and then apply the functions to the as if they were a time series. You may need to map the changepoint indexes back to the gradient scale by hand but this should not be difficult.
Alternative packages of interest might include the strucchange package with the breakpoints() function. It also requires ordering the observations beforehand. It can give you confidence intervals for the changepoints, though.
Furthermore, there is the maxstat_test() function in the coin package that uses a nonparametric approach. It has the advantage that both response and gradient can be supplied, e.g., maxstat_test(abundance ~ temperature, ...).
Finally, it may be of interest to find such thresholds not only with respect to a single variable but with respect to several factors. Then recursive partitioning (say via rpart() or ctree() from the partykit package) may be of interest. A worked example for tree pipit abundance is in Section 6.1 of vignette("ctree", package = "partykit").
A: In addition to the previous nice answers (+1 to both), I'd like to offer the following insights:


*

*Consider using entropy-based approaches, methods and measures for change point analysis. Check my related answer for some ideas (it focuses on time series, but I see no reasons for why the same approach cannot be applied to some other domains).

*Consider using Early Warning Signals (EWS) Toolbox and corresponding R package earlywarnings. The toolbox (methods and software) includes, in addition to time series analysis, spacial data analysis, which AFAIK is a significant part of environmental data analysis (i.e., see EWS site's menus Spacial Indicators and Case Studies).
A: The mcp package has a website with extensive applied examples for many scenarios, including Poisson and Binomial models, which could be good for fish counts.
Disclosure: I am the developer of mcp.
A: Just to add to the previous, see Baker and King 2010 http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210X.2009.00007.x/epdf
which has not yet been packaged but has the code in SI. The authors argue that splitting sensitive and tolerant species' responses provides more precise/ecologically relevant change-points than amalgamating those responses a priori. But it is also a question of whether you are interested in an assemblage response or a particular species (which is simpler but more options). 
And what exactly does not work in the cp?
