The MCCPT package performs changepoint analysis on time series data with attached age model ensembles, thereby accounting for age uncertainty in the location of changepoints. It is an implementation of Rebecca Killick’s changepoint method, but applied over age model ensemble members so as to generate a probabilistic estimate of changepoint locations. It was originally envisioned for any depth-resolved paleoclimate record with an attached multi-ensemble age model (e.g., lake sediments, ice cores, etc.). A typical input would be interpolated Bayesian age-depth model outputs from the Oxcal radiocarbon calibration software or rbacon.
If you have questions or comments, you can contact the package maintainers:
Install MCCPT with the devtools package:
devtools::install_github("h-cadd/MCCPT", build = FALSE)
Data must be structured in a specific way in order to be used with the package. MCCPT currently accepts .xlsx files with the following (on separate sheets):
- ‘Metadata’, containing the entries ‘Site code’ (an abbreviation), and ‘Data type’ (i.e., Compositional or Single). Here is an example from the data included with the package:
category | value |
---|---|
Site name | Native Companion Lagoon |
Site code | NCL |
Record length (cm) | 388 |
Latitude | 27°40’48’’S |
Longitude | 153°24’36’’E |
m’s abovel sea level | 20 m a.s.l |
Current dominant vegetation type | Open eucalypt woodland. |
Geology | Sand. |
Temperature min & max | mean min = 19ᵒC, mean max = 25ᵒC |
Mean annual rainfall | 1514 mm pa |
Age of record (sampled, year AD) | 2017 |
Age of record (base, cal yrs BP) | 44000 |
Dating method | Radiocarbon (14C) |
Analysed Proxies | Pollen |
“Best” Hydrological proxy | NA |
“Best” Temp proxy | Pollen |
Hiatus/boundary | NA |
Data type | Compositional |
- ‘Data’, containing a formatted data frame of the data you are interested in. This must have at least two columns:
- Depth (exact column name may vary but it must contain the case-sensitive string ‘Depth’)
- Any number of other columns containing proxy data (pollen species, d18O, etc.). This will be compressed into a principal curve.
- ‘Age_iterations’, containing age model iterations of the proxy record at the same interval resolution as the proxy data.
Refer to the example data contained in the package (MCCPT/data-raw/Stradbroke-comp-raw/), derived from Cadd et al. (2024).
Once you have installed the package and formatted your data
appropriately, store the files in a folder and pass the folder path to
import_files()
. Next, run conduct_MCCPT()
on the resulting data
structure (a formatted list) after adjusting the parameters of the
function accordingly (min age, max age, etc.). This will generate:
- an R list of per-record changepoints, depending on your choices made whilst the program is running.
- an excel spreadsheet for each record, containing sheets corresponding to data for each changepoint.
- plots of each record, the position of changepoints, and their distribution within age model iterations.
MCCPT was developed originally for Cadd et al. (2021).
If you use the MCCPT package, please cite this paper. As MCCPT
relies on the changepoint
package, you should also cite Killick &
Eckley. (2021).
An example citation might read something like: … to identify shifts in our records, we conducted a changepoint analysis (Killick & Eckley, 2014). We used the MCCPT R package, which applies a monte-carlo approach to account for age uncertainty in the position of changepoints within paleo records (Cadd et al., 2021).
Cadd, H., Petherick, L., Tyler, J., Herbert, A., Cohen, T. J., Sniderman, K., … Harris, M. R. P. (2021). A continental perspective on the timing of environmental change during the last glacial stage in Australia. Quaternary Research, 102, 5–23. doi:10.1017/qua.2021.16
Killick, R. & Eckley, I. A. (2014). changepoint: An R Package for Changepoint Analysis. Journal of Statistical Software, 58 (3), 1-19. doi:10.18637/jss.v058.i03