3.1 Example taken from Huang et al. (2018)
Huang et al. (2018) provide an example of a curve which is divided into two subregions (Fig. 1).
The first portion of the curve is fitted to the function:
f 5 (x) = 49998x− 0.7 (3)
whilst the second portion is linear with the equation:
f 6 (x) = -4063x + 36462 (4)
The linking function for this example is:
f 7 (x) = 1-(1/(1+(x/5)^300)) (5)
Therefore, in the new method described here the curve in Fig. 1 can be described by the single function f8:
f 8 = f5(1-f7) + f6f7 (6)
3.2 Example of a double sigmoid plot taken from Caglar et al. (2018)
Caglar et al. (2018) provide a diagram of a double sigmoid curve as an example without giving exact details. Therefore, the following sigmoid equations have been generated as representing the type of double-sigmoid curve discussed in that paper, as shown in Fig. 2.
f 9 (x) = 4.06–4.07/(1 + (x/5.31)^9.56) (7)
f 10 (x) = 2.19 + 1.82/(1 + (x/12.8)^18.2) (8)
The two function are linked at position x = 9, therefore the linking function is:
f 11 (x) = 1-(1/(1+(x/9)^300)) (9)
and the curve shown in Fig. 2 can be fully described by the single function f12:
f 12 = f9(1-f11) + f10f11 (10)
3.3 Example with three subregions.
In their paper Huang et al. (2018) separated some curves into three subregions. There are no details given, so in order to demonstrate three subregions the curve in Fig. 1 has been chosen with the addition of an exponential term added beyond the point x = 8. This is shown in Fig. 3.
The worked example 1 above has demonstrated that the first two functions (x = 1 to 8) can be combined into one function (f8). The last part of the curve (the third subregion) with x = 8 to 13 is given in Eq. 11.
f 13 (x) = 42.07e0.568x (11)
The linking function for this subregion is:
f 14 (x) = 1-(1/(1+(x/8)^300)) (12)
and the three subregions shown in Fig. 3 can expressed by the single function f15:
f 15 = f8(1-f14) + f13f14 (13)
3.4 Example demonstrating smoothing at the knot
The examples given above the curves in the different subregions have given the same value at the knot, and therefore no smoothing of the curve was required. However, it may be the case that the lines either side of the knot do not meet exactly. An example is shown in Fig. 4.
The straight lines before and after 12 months do not meet at the same point. These straight lines have the following equations:
f 16 (x) = -1.1677x + 60 (14)
f 17 (x) = 1.9x + 19.2 (15)
The two function are linked at position x = 12 and the linking function is shown in Eq. (16):
f 18 (x) = 1-(1/(1+(x/12)^b)) (16)
where b is the slope at the knot (x = 12) and the overall curve can be expressed by the function f19:
f 19 = f16(1-f18) + f17f18 (17)
In order to demonstrate how the two lines may be joined at the knot, different values for (b) in Eq. 16 have been used which affects the degree of smoothing. With the slope (b) equal to 1000 a very close match to the original curve can be found. This is shown in Fig. 5, which also shows the curves achieved with value of (b) equal to 100 and 10 resulting in variation in smoothing of the curve.
Figure 5 shows that using the method outlined in this article it is possible to find a single function to model complex data without the aid of dummy variables whilst easily changing the degree of smoothing at the knot where different subregions are joined.