@@ -132,7 +132,7 @@ onwards.
132132
133133### Rule-breaking run
134134A * 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
137137length 10 starting on day 22. By default, rule-breaking runs are highlighted in
138138blue by ` autospc ` .
@@ -235,19 +235,19 @@ autospc(example_series_2c,
235235
236236### Minimum period length
237237The 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
239239may not often make such a minimum explicit, in a way it is always there
240240implicitly - nobody would compute control limits from two data points would
241241they? In fact, various authors offer guidance on what such a minimum should be,
242242with 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,
245245defaulting to 21. This default is above the commonly recommended minimum values
246246and represents a convenient choice for daily data, since it is a multiple of 7.
247247This means that in the presence of weekly "seasonal" (periodic) variation over
248248the 7 day period the limits are not unduly affected by which day of the week the
249249limit 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:
2562561 . Algorithm counter initialised to the first data point.
257257
2582582 . 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,
263263with limits extended over the remainder of the data. However, in this case there
264264are not sufficient data points to re-establish a second set of limits, so the
265265SSA terminates after establishing this first set of limits.
266266
267267From 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
269269established, the counter is set to the first point after the end of this first
270270calculation period.
271271
2722723 . 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,
275275then there are insufficient data points to further re-establish limits, and the
276276algorithm terminates.
277277
@@ -280,7 +280,7 @@ there is at least one rule-breaking run, the algorithm sets the counter to the
280280first data point of the first such run, now labelled the triggering run.
281281
2822826 . 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
284284points beginning at the counter.
285285
2862867 . Decide whether to accept or reject the candidate limits:
0 commit comments