Skip to content

Instantly share code, notes, and snippets.

@malithj
Last active August 23, 2016 02:07
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/f7db78e1e3422a68a1e480693f655c89 to your computer and use it in GitHub Desktop.
Save malithj/f7db78e1e3422a68a1e480693f655c89 to your computer and use it in GitHub Desktop.
#slope model
number <- 1000000
position <- 1:number
data <- data.frame(signal = rep(c(1, 2), c(number/2, number/2))*position + rnorm(number), position=position)
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