Feat/decompose series#8
Merged
Merged
Conversation
- Simplify econometric-filters vignette title - Add axis.title.x = element_blank() to theme in both vignettes - Split data-processing and plotting into separate code chunks - Refactor window-comparison plot to use facets with original series overlay - Add Henderson MA to method list; use glimpse() for data preview Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pipe-friendly function decomposing time series into trend, seasonal, and remainder components via STL or regression-based methods, with grouping support. Includes full test coverage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduce R/method_registry.R with .method_info() and .valid_methods() as the canonical source of truth for supported trend methods. Both augment_trends() and extract_trends() now read from .valid_methods() instead of hardcoding parallel method vectors that could drift apart. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
decompose_series() gains: - three methods: "classic" (stats::decompose), "bsm" (stats::StructTS via the Kalman smoother), and "seats" (X-13ARIMA-SEATS via the optional seasonal package) - vector-valued method= for side-by-side comparison - transform = "log" for a uniform multiplicative decomposition - seasadj = TRUE to add the seasonally adjusted series - per-method params validation and NA-row handling deseason_series() is a new exported convenience wrapper around decompose_series() focused on seasonal adjustment. Add seasonal to Suggests (only required for method = "seats", guarded with requireNamespace()). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- New "Trend Extraction Methods" vignette cataloguing all 20 methods - New "Decomposing Series" vignette - README: list decompose_series(), full 20-method table, vignette links - _pkgdown.yml: add the two vignettes and a Decomposition reference group - NEWS.md: document the 1.3.0 changes Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… type - Rename `method` -> `methods` in decompose_series() and deseason_series() for consistency with augment_trends(). - Remove the native multiplicative `classic` estimator (params$type); transform = "log" already provides a uniform multiplicative path for every method, so the special-casing and its tests are gone. - Simplify the regression decomposition with predict(type = "terms") instead of a manual model-matrix split; seasonal is now mean-centred. - Harden the X-13ARIMA-SEATS path: guard the s11/s12 extraction and note that transform = "none" is preferred (X-13 handles transformation). - Drop variable shadowing of base::start; tidy classic/bsm/seats signatures. - Fix a broken example (oil_derivatives has `production`, not `index`). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Write the previously unfinished "classic", "bsm", and "seats" method
sections.
- Guard the seats/deseason chunks with eval = requireNamespace("seasonal")
so the vignette builds where the Suggested package is absent.
- Fix the electricity plot (was plotting remainder_stl but labelled "Trend").
- Rename method -> methods; clarify manual-log vs transform = "log";
tidy titles/axis labels, fix typos and grammar.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The vignettes use ggplot2 4.0 features (theme paper=, palette.colour.discrete, and the layer layout= argument), so pin the Suggests floor accordingly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.