Check for the case of zero variance
Open
bug
good first issue
- Dominant language
- R
- Stars
- 53
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
When the time series consists of a straight line, `p.Vt <- sctest(efp(Vt ~ ti, h = h, type = type))` returns `NaN`, which then fails down the line. bfast should throw an error in case sd(Vt) == 0, and possibly catch any further errors when `p.Vt` is invalid.
Contributor guide
Research direction
Start at the bfast path containing `p.Vt <- sctest(efp(Vt ~ ti, h = h, type = type))` and reproduce it with a straight-line time series. Trace how the resulting `NaN` reaches later processing; done means the zero-variance case raises a clear error and invalid `p.Vt` is handled. The issue names no file or test, so locating the entry point and adding regression coverage is part of the work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100