rkillick / changepoint

A place for the development version of the changepoint package on CRAN.
127 stars 33 forks source link

diagnostic = TRUE does not work #71

Closed aelaamrani closed 1 year ago

aelaamrani commented 2 years ago

Hello,

I am trying to get the diagnostic plot of a model. I have tried the example that is in the source code

library(changepoint)

# Generate cpt.range object
testdata <- changepoint::ftse100$V2
obj.cpt.range <- cpt.var(testdata, method = "PELT",
                         penalty = "CROPS", pen.value = c(5, 500))

# For code coverage
plot(obj.cpt.range, diagnostic = TRUE)
plot(obj.cpt.range, diagnostic = TRUE, type = "h")

However, I am getting the following error and no plot is shown.

In doTryCatch(return(expr), name, parentenv, handler) : "diagnostic" is not a graphical parameter

Could you please help?

Thanks!

rkillick commented 1 year ago

Apologies, I didn't get an email to say this issue has been opened!

What version of changepoint are you using? The provided code works for version 2.2.3 from CRAN.