#### Generate Simulated data example ####
set.seed(30)
x = c(rnorm(50), rnorm(50, mean = 5), rnorm(1, mean = 15), rnorm(49, mean = 5), rnorm(50, mean = 4))
xcpt = cpt.mean(x,method='PELT') # Get the changepoints via PELT
#### Get the influence for both delete and outlier options ####
x.inf = influence(xcpt)
#### Get the influence using delete method ####
x.inf = influence(xcpt, method="delete")
#### Get the influence using outlier method ####
x.inf = influence(xcpt, method="outlier", pos=FALSE,same=FALSE)
# no sd required as no jitter used.
Run the code above in your browser using DataLab