Skip to content

Feature vignette plots 176#200

Merged
HorridTom merged 7 commits intomasterfrom
feature-vignette-plots-176
Nov 27, 2025
Merged

Feature vignette plots 176#200
HorridTom merged 7 commits intomasterfrom
feature-vignette-plots-176

Conversation

@HorridTom
Copy link
Copy Markdown
Owner

Improvements to Stable Shift Algorithm vignette

Closes #176

…for the terminology section up to and including opposing rule breaks but not overhanging reversions.

Also added bookdown for cross-referencing.
…strate overhanging reversion in the SSA vignette
@HorridTom HorridTom self-assigned this Nov 4, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@derrynlovett derrynlovett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall the vignette reads well, and functions as expected.
Suggested changes are for grammar, an additional reference if available, and minor changes to plot outputs.
If appropriate, and comments are clear enough, I am happy to make edits and push the changes.

Comment thread vignettes/stable-shift-algorithm.Rmd Outdated
Comment thread vignettes/stable-shift-algorithm.Rmd Outdated
on this dataset see `?ed_attendances_monthly`.

```{r 2.0, fig.width=7, fig.height=9}
```{r extending-limits, fig.width=7, fig.height=9, fig.cap="Extending baseline control limits"}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider reducing fig.height to make faceted plots more readable.
fig.height=7

Comment thread vignettes/stable-shift-algorithm.Rmd
Comment thread vignettes/stable-shift-algorithm.Rmd Outdated
@@ -132,7 +242,7 @@ they? In fact, various authors offer guidance on what such a minimum should be,
with values ranging from 17 to 25 points. In `plot_auto_SPC()`, $n_{min}$ is
specified by the `periodMin` argument, defaulting to 21.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reference for why periodMin = 21 is chosen for autospc?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add this, good idea

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't add comment to unchanged code.
Line 281, suggest add "is" to read:
i. If there is at least...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible, and valid, to change the y-axis lower limit to remove whitespace, rather than starting at 0?
Particularly in Figure 2.1 where 0 to ~8,000 is just whitespace in each of the facet plots.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At present the override_y_lim argument of plot_auto_SPC() for some reason only controls the upper limit of the y-axis. This should be changed though - are you ok to add an issue for this? I suggest leaving as is until this new feature is implemented. May not have time before publication of the paper but let's see.

@HorridTom
Copy link
Copy Markdown
Owner Author

Thanks for this @derrynlovett very useful comments. Happy for you to make any changes you're happy to do and push here - once you're done I'll add that explanation about periodMin = 21 and then we should be good to merge.

Derryn Lovett and others added 2 commits November 27, 2025 06:39
@HorridTom
Copy link
Copy Markdown
Owner Author

@derrynlovett I've added that explanation re. the periodMin = 21 default - if you have a minute to check it makes sense, that would be great.

Captures additional packages required to use the bookdown::html_document2 output type for vignettes.
@HorridTom HorridTom merged commit 68750a8 into master Nov 27, 2025
2 of 10 checks passed
@HorridTom HorridTom deleted the feature-vignette-plots-176 branch November 27, 2025 13:51
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.

Add further illustrative plots to SSA vignette

2 participants