Skip to content

remove leading lagged NA/NaN values for surd ts defination#83

Merged
SpatLyu merged 9 commits into
stscl:mainfrom
SpatLyu:dev
May 26, 2026
Merged

remove leading lagged NA/NaN values for surd ts defination#83
SpatLyu merged 9 commits into
stscl:mainfrom
SpatLyu:dev

Conversation

@SpatLyu
Copy link
Copy Markdown
Member

@SpatLyu SpatLyu commented May 26, 2026

This PR updates the time-series handling in the surd implementation by removing leading NA values introduced by lag operations.


Changes

  • Applied in the surd source code (time-series branch):

    • Condition: nb.isNull() and nrows.isNull()
  • Remove the first |lag| observations from each result vector:

for (auto& vec : pm)
{
    vec.erase(vec.begin(), vec.begin() + lag_abs);
}
  • Only applied when:

    • lag_abs > 0
    • lag_abs < n_obs

Behavioral Notes

  • Eliminates artificial leading NA values caused by lagging in surd
  • No effect when lag == 0

@SpatLyu SpatLyu self-assigned this May 26, 2026
@SpatLyu SpatLyu merged commit afa5dd0 into stscl:main May 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant