# NOT RUN {
##Variance change in all series
set.seed(1)
X <- rbind(matrix(rnorm(100*50),ncol=50),matrix(rnorm(100*50,0,2),ncol=50))
ans <- geomcp(X)
summary(ans)
plot(ans)
##Mean change in 50% of series with a manual reference vector and non-parametric univariate
##changepoint detection using 10 quantiles with a BIC penalty and min seg length of 5
set.seed(1)
Y <- rbind(matrix(rnorm(100*20),ncol=20),cbind(matrix(rnorm(100*10),ncol=10),
matrix(rnorm(100*10,1),ncol=10)))
res <- geomcp(Y,penalty='Manual',pen.value=30,test.stat='Empirical',nquantiles=10,ref.vec='Manual',
ref.vec.value=seq(1,10,length.out=20),msl=5)
summary(res)
plot(res)
##Different plot types for above example
#Plots mappings and changepoints
plot(res,plot.type='mappings')
#Heatmap of data with changepoints not shown
plot(res,plot.type='full.data',changepoints=FALSE,scale.series=TRUE)
#Specific series with mappings and changepoints shown.
plot(res,plot.type='series',show.series=c(1,5,10),add.mappings=TRUE)
# }
Run the code above in your browser using DataLab