Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Note in documentation that CCF is reversed corresponding to stats::ccf #164

Open
@aelzenaar

Description

@aelzenaar

Suppose I have a tsibblets with columnsPredictor andPredicted. Thenstats::ccf(ts$Predictor, ts$Predicted) measures the correlation of lags ofPredictor compared toPredicted. Butfeasts::CCF(ts$Predictor, ts$Predicted) measures the correlation of lags ofPredicted compared toPredictor. This is a new behaviour as of feasts 0.3, previously the two calls were equivalent. So far as I can see the new behaviour is the correct behaviour (#144), but it silently broke some of our scripts on upgrading. Of course this is alpha software and we should expect breakages like this, but it would be very helpful if either

  • a note is added to the documentation explicitly saying that the two variables are in the opposite order to the base function: currently the only place you can see is that in the function signature there isy, x notx, y (the transposition of two letters in this one place is very easy to miss, especially when many of the code examples in various places online were put up before this change), and in the details section it is written that

    "The functions improve the...stats::ccf() functions. The main differences are that ACF does not plot the exact correlation at lag 0 when type=="correlation" and the horizontal axes show lags in time units rather than seasonal units."

    i.e. there is no mention of the rather major difference that the function parameters are reversed, and it sounds likeCCF is a drop-in replacement forccf!

  • or, a warning is added if the user is calling the function without specifyingx ory specifically: sots %>% CCF(Predictor, Predicted) would raise a warning andts %>% CCF(x=Predictor, y=Predicted) would not. This would provide a hint that maybe there is something going on that the user should check.

Thanks for your very useful software, in any case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp