Skip to content

Commit e595809

Browse files
author
Derryn Lovett
committed
Merge bugfix-website-maths-211 into master
Merge branch 'bugfix-website-maths-211' of https://github.com/HorridTom/autospc # Conflicts: # DESCRIPTION
2 parents 5696433 + a71f3e8 commit e595809

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: autospc
22
Title: Automatically Partitioned SPC Charts
3-
Version: 0.0.0.9042
3+
Version: 0.0.0.9043
44
Authors@R: c(
55
person("Thomas", "Woodcock", , "woodcock.thomas@gmail.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0002-4735-4856")),

vignettes/stable-shift-algorithm.Rmd

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ onwards.
132132

133133
### Rule-breaking run
134134
A *rule-breaking run* is a run whose length is greater than or equal to the
135-
threshold for a shift rule break (`shift_rule_threshold`), set to $8$ by default in
135+
threshold for a shift rule break (`shift_rule_threshold`), set to \(8\) by default in
136136
`autospc()`. In \@ref(fig:example-1), there is a rule-breaking run of
137137
length 10 starting on day 22. By default, rule-breaking runs are highlighted in
138138
blue by `autospc`.
@@ -235,19 +235,19 @@ autospc(example_series_2c,
235235

236236
### Minimum period length
237237
The SSA requires specification of a minimum number of data points to be used
238-
for calculation of control limits, $n_{min}$. Whilst those using SPC in practice
238+
for calculation of control limits, \(n_{min}\). Whilst those using SPC in practice
239239
may not often make such a minimum explicit, in a way it is always there
240240
implicitly - nobody would compute control limits from two data points would
241241
they? In fact, various authors offer guidance on what such a minimum should be,
242242
with values ranging from 17 to 25 points.
243243

244-
In `autospc()`, $n_{min}$ is specified by the `period_min` argument,
244+
In `autospc()`, \(n_{min}\) is specified by the `period_min` argument,
245245
defaulting to 21. This default is above the commonly recommended minimum values
246246
and represents a convenient choice for daily data, since it is a multiple of 7.
247247
This means that in the presence of weekly "seasonal" (periodic) variation over
248248
the 7 day period the limits are not unduly affected by which day of the week the
249249
limit calculation period begins on. When using monthly data, it is preferable to
250-
use $n_{min} = 24$, for the same reason.
250+
use \(n_{min} = 24\), for the same reason.
251251

252252
## Details of the algorithm
253253

@@ -256,22 +256,22 @@ The steps of the algorithm are as follows:
256256
1. Algorithm counter initialised to the first data point.
257257

258258
2. Check there is sufficient data to form at least one set of limits.
259-
If a time series has fewer points than $n_{min}$, then according to the SSA
260-
no control limits can be established. If a time series has length $n$ with
261-
$n_{min}\leq n < 2n_{min}$, then there are sufficient data points to form one
262-
period. The SSA establishes limits calculated from the first $n_{min}$ points,
259+
If a time series has fewer points than \(n_{min}\), then according to the SSA
260+
no control limits can be established. If a time series has length \(n\) with
261+
\(n_{min}\leq n < 2n_{min}\), then there are sufficient data points to form one
262+
period. The SSA establishes limits calculated from the first \(n_{min}\) points,
263263
with limits extended over the remainder of the data. However, in this case there
264264
are not sufficient data points to re-establish a second set of limits, so the
265265
SSA terminates after establishing this first set of limits.
266266

267267
From here on, therefore, we assume that the number of data points in the time
268-
series to be analysed is $n \geq 2n_{min}$. After the first set of limits are
268+
series to be analysed is \(n \geq 2n_{min}\). After the first set of limits are
269269
established, the counter is set to the first point after the end of this first
270270
calculation period.
271271

272272
3. Main algorithm loop begins
273273

274-
4. If there are fewer than $n_{min}$ data points remaining from the counter,
274+
4. If there are fewer than \(n_{min}\) data points remaining from the counter,
275275
then there are insufficient data points to further re-establish limits, and the
276276
algorithm terminates.
277277

@@ -280,7 +280,7 @@ there is at least one rule-breaking run, the algorithm sets the counter to the
280280
first data point of the first such run, now labelled the triggering run.
281281

282282
6. Again check there is sufficient data remaining from the counter. If not,
283-
terminate. If so, candidate limits are formed from the first $n_{min}$ data
283+
terminate. If so, candidate limits are formed from the first \(n_{min}\) data
284284
points beginning at the counter.
285285

286286
7. Decide whether to accept or reject the candidate limits:

0 commit comments

Comments
 (0)