nhs-r-community / NHSRplotthedots

An SPC package to support NHSE/I 'Making Data Count' programme
https://nhs-r-community.github.io/NHSRplotthedots/
Other
47 stars 21 forks source link

Trends do not trigger special cause variation #195

Closed kaituna closed 10 months ago

kaituna commented 10 months ago

Plots are not flagging a trend of six points as special cause variation, whereas the NHS Excel SPC tool does:

NHSRplotthedots image

Excel Tool image

ThomUK commented 10 months ago

Note this is v0.1 from CRAN. It would be great to re-check with the latest version of the package @kaituna

kaituna commented 10 months ago

Hi @ThomUK , I am currently using v0.1.0, isn't that the latest? I just installed from github but it appears to be the same.

ThomUK commented 10 months ago

Hi @kaituna thanks for helping with this. The development version is v0.1.0.9000

What do you get from running this in the console? packageVersion("NHSRplotthedots")

kaituna commented 10 months ago

Hi @kaituna thanks for helping with this. The development version is v0.1.0.9000

What do you get from running this in the console? packageVersion("NHSRplotthedots")

It is 0.1.0, how do I install the development version?#

Thanks

ThomUK commented 10 months ago
# install.packages("remotes")

remotes::install_github("https://github.com/nhs-r-community/NHSRplotthedots", build_vignettes = TRUE)
tomjemmett commented 10 months ago

Possibly (atleast, I'm hoping!) this is a duplicate of https://github.com/nhs-r-community/NHSRplotthedots/issues/171 which was resolved via #180

kaituna commented 10 months ago

I tried installing the development version using the suggested method but I still end up with v0.1.0.

Running the charts again, I see the same issue post-github install, with even a run of 7 decreasing points showing as common cause variation :

image

Do I have to uninstall the v0.1.0 package first?

ThomUK commented 10 months ago

Yes that's still v0.1.0 Installing won't work if the package is already loaded in an R session. Two options:

  1. This should work unless something strange happened. Restart your R session and try installing from github again.
  2. The nuclear option. Find the package code in the "library" directory of your R install. Delete the "NHSRplotthedots" directory and all contents. Reinstall from github.
kaituna commented 10 months ago

Great, managed to get the latest version installed (v0.1.0.9000) and it appears to correctly flag a trend of seven points:

image

Are there any plans to allow the user to set number of consecutive points that trigger the trend rule?

Thanks.

ThomUK commented 10 months ago

No current plans for that, but please do raise a separate issue if needed. Thank you for helping improve the package!