bfast2 / bfast2/bfast

Check for the case of zero variance

Open
#10 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.