Description Usage Arguments Value Examples
This function checks whether there are step changes present in a time series at a pre-specified time (generally 2005 for CMIP5 historical to RCP scenario transition).
1 | detect_break(x, breaktime = 2005, n = 50, detrend = TRUE, log = TRUE)
|
x |
input object of type NetCDF |
breaktime |
last time step (year) of first period |
n |
number of years in climatology (before and after break point) |
detrend |
logical, should linear trend be accounted for? |
log |
logical, should log-transformed p-values be returned? |
A list containing the p-values for each suspected break (per region and season) and the log aggregate p-value for all seasons using Fisher's method to combine the break tests for individual seasons.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## set up time series with increasing break at 50/51
nseas <- 4
xx <- outer(seq(0,3/sqrt(50),length=50), rep(c(0,1), each=50*nseas), '*')
xx <- xx + rnorm(length(xx)) + rep(seq(0,10,length=ncol(xx)), each=nrow(xx))
class(xx) <- 'NetCDF'
attr(xx, 'time') <- seq(1, length=100*nseas, by=1/nseas)
## detect the break
dd <- detect_break(xx, 50, log=FALSE)
## look at results
plot(dd$fish, type='h', lend=3, lwd=2)
abline(h=0.05, lty=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.