Error in if (more || nchar(output) > 80) { : missi

2019-08-28 06:00发布

I'm trying to detect changepoints in time series of daily stock prices by using the command cpt.np from the R's changepoint.np package

These are the codes I'm using

CPts <- cpt.np(Stock.ts , penalty = "MBIC", pen.value = 0, method = "PELT", test.stat = "empirical_distribution", class = TRUE, minseglen = 2, nquantiles = 10)
CPtss <- cpt.np(Stock.ts, penalty = "MBIC", method="PELT")

Whenever I implement any of the above codes, I get the following message

Error in if (more || nchar(output) > 80) { :

missing value where TRUE/FALSE needed

I've been looking for something similar to this case but couldn't find any. I don't even know where this error is coming from as my data has no NA values. Please, could someone help me to figure out the solution for this error?

0条回答
登录 后发表回答