Skip to content

Instantly share code, notes, and snippets.

@malithj
Last active August 23, 2016 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malithj/409348f2e1a80ba76ffb7694fd8c814c to your computer and use it in GitHub Desktop.
Save malithj/409348f2e1a80ba76ffb7694fd8c814c to your computer and use it in GitHub Desktop.
#mean model
number <- 1000000
data <- data.frame(signal = rnorm(number) + rep(c(2, 5), each=number/2), position = 1:number)
ptm <- proc.time()
res <- postcp(signal ~ 1 ,family = gaussian(), data = data, bp = c(number/5), sigma = 1)
proc.time() - ptm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment