changepoints {cpop}R Documentation

Changepoint locations

Description

Creates a data frame containing the locations of the changepoints in terms of the index of the data and the value of the location at that index.

Arguments

object

An instance of an cpop S4 class produced by cpop.

Value

A data frame.

Examples

library(cpop)

# generate some test data
set.seed(0)
x <- seq(0,1,0.01)
n <- length(x)
sd <- rep(0.1,n)
mu <- c(2*x[1:floor(n/2)],2 - 2*x[(floor(n/2)+1):n])
y <- rnorm(n,mu,sd)

# use the locations in x
res <- cpop(y,x,beta=2*log(length(y)),sd=sd)
changepoints(res)


[Package cpop version 1.0.6 Index]