Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breakpoints: error when h == floor(n/2) #1

Open
GreatEmerald opened this issue Jun 12, 2018 · 0 comments
Open

breakpoints: error when h == floor(n/2) #1

GreatEmerald opened this issue Jun 12, 2018 · 0 comments
Labels

Comments

@GreatEmerald
Copy link
Contributor

The breakpoints() function checks whether there are sufficient observations to estimate breakpoints:
https://github.com/appelmar/strucchange/blob/78d57129b45c0c5cf28cc69a3b19956ee0ac2486/R/breakpoints.R#L33
But when h is equal to floor(n/2), the function gives an error:

Error in dimnames(RSS.table) = list(as.character(h:(n - h)), as.vector(rbind(paste("break",  : 
  length of 'dimnames' [2] not equal to array extent

So in fact this should check whether it's more or equal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant