Template:Nonlinear regression gompz
Nonlinear Regression
Nonlinear regression is similar to linear regression, except that a curve is fitted to the data set instead of a straight line. Just as in the linear scenario, the sum of the squares of the horizontal and vertical distances between the line and the points are to be minimized. In the case of the nonlinear Gompertz model [math]\displaystyle{ R=a{{b}^{{{c}^{T}}}} }[/math] , let:
- [math]\displaystyle{ {{Y}_{i}}=f({{T}_{i}},\delta )=a{{b}^{{{c}^{{{T}_{i}}}}}} }[/math]
- where:
- [math]\displaystyle{ {{T}_{i}}=\left[ \begin{matrix} {{T}_{1}} \\ {{T}_{2}} \\ \vdots \\ {{T}_{N}} \\ \end{matrix} \right],\quad i=1,2,...,N }[/math]
- and:
- [math]\displaystyle{ \delta =\left[ \begin{matrix} a \\ b \\ c \\ \end{matrix} \right] }[/math]
The Gauss-Newton method can be used to solve for the parameters [math]\displaystyle{ a }[/math] , [math]\displaystyle{ b }[/math] and [math]\displaystyle{ c }[/math] by performing a Taylor series expansion on [math]\displaystyle{ f({{T}_{i}},\delta ). }[/math] Then approximate the nonlinear model with linear terms and employ ordinary least squares to estimate the parameters. This procedure is performed in an iterative manner and it generally leads to a solution of the nonlinear problem.
This procedure starts by using initial estimates of the parameters [math]\displaystyle{ a }[/math] , [math]\displaystyle{ b }[/math] and [math]\displaystyle{ c }[/math] , denoted as [math]\displaystyle{ g_{1}^{(0)}, }[/math] [math]\displaystyle{ g_{2}^{(0)} }[/math] and [math]\displaystyle{ g_{3}^{(0)}, }[/math] where [math]\displaystyle{ ^{(0)} }[/math] is the iteration number. The Taylor series expansion approximates the mean response, [math]\displaystyle{ f({{T}_{i}},\delta ) }[/math] , around the starting values, [math]\displaystyle{ g_{1}^{(0)}, }[/math] [math]\displaystyle{ g_{2}^{(0)} }[/math] and [math]\displaystyle{ g_{3}^{(0)}. }[/math] For the [math]\displaystyle{ {{i}^{th}} }[/math] observation:
- [math]\displaystyle{ f({{T}_{i}},\delta )\simeq f({{T}_{i}},{{g}^{(0)}})+\underset{k=1}{\overset{p}{\mathop \sum }}\,{{\left[ \frac{\partial f({{T}_{i}},\delta )}{\partial {{\delta }_{k}}} \right]}_{\delta ={{g}^{(0)}}}}({{\delta }_{k}}-g_{k}^{(0)}) }[/math]
- where:
- [math]\displaystyle{ {{g}^{(0)}}=\left[ \begin{matrix} g_{1}^{(0)} \\ g_{2}^{(0)} \\ g_{3}^{(0)} \\ \end{matrix} \right]\lt /math \lt br\gt :Let: \lt br\gt ::\lt math\gt \begin{align} & f_{i}^{(0)}= & f({{T}_{i}},{{g}^{(0)}}) \\ & \nu _{k}^{(0)}= & ({{\delta }_{k}}-g_{k}^{(0)}) \\ & D_{ik}^{(0)}= & {{\left[ \frac{\partial f({{T}_{i}},\delta )}{\partial {{\delta }_{k}}} \right]}_{\delta ={{g}^{(0)}}}} \end{align} }[/math]
So Eqn. (nl1) becomes:
- [math]\displaystyle{ {{Y}_{i}}\simeq f_{i}^{(0)}+\underset{k=1}{\overset{p}{\mathop \sum }}\,D_{ik}^{(0)}\nu _{k}^{(0)} }[/math]
or by shifting [math]\displaystyle{ f_{i}^{(0)} }[/math] to the left of the equation:
- [math]\displaystyle{ Y_{i}^{(0)}\simeq \underset{k=1}{\overset{p}{\mathop \sum }}\,D_{ik}^{(0)}\nu _{k}^{(0)} }[/math]
In matrix form this is given by:
- [math]\displaystyle{ {{Y}^{(0)}}\simeq {{D}^{(0)}}{{\nu }^{(0)}} }[/math]
- where:
- [math]\displaystyle{ {{Y}^{(0)}}=\left[ \begin{matrix} {{Y}_{1}}-f_{1}^{(0)} \\ {{Y}_{2}}-f_{2}^{(0)} \\ \vdots \\ {{Y}_{N}}-f_{N}^{(0)} \\ \end{matrix} \right]=\left[ \begin{matrix} {{Y}_{1}}-g_{1}^{(0)}g_{2}^{(0)g_{3}^{(0){{T}_{1}}}} \\ {{Y}_{1}}-g_{1}^{(0)}g_{2}^{(0)g_{3}^{(0){{T}_{2}}}} \\ \vdots \\ {{Y}_{N}}-g_{1}^{(0)}g_{2}^{(0)g_{3}^{(0){{T}_{N}}}} \\ \end{matrix} \right] }[/math]
- and:
- [math]\displaystyle{ {{\nu }^{(0)}}=\left[ \begin{matrix} g_{1}^{(0)} \\ g_{2}^{(0)} \\ g_{3}^{(0)} \\ \end{matrix} \right] }[/math]
Note that Eqn. (matr) is in the form of the general linear regression model of Eqn. (linear). According to Eqn. (lincoeff), the estimate of the parameters [math]\displaystyle{ {{\nu }^{(0)}} }[/math] is given by:
- [math]\displaystyle{ {{\widehat{\nu }}^{(0)}}={{\left( {{D}^{{{(0)}^{T}}}}{{D}^{(0)}} \right)}^{-1}}{{D}^{{{(0)}^{T}}}}{{Y}^{(0)}} }[/math]
The revised estimated regression coefficients in matrix form are:
- [math]\displaystyle{ {{g}^{(1)}}={{g}^{(0)}}+{{\widehat{\nu }}^{(0)}} }[/math]
The least squares criterion measure, [math]\displaystyle{ Q, }[/math] should be checked to examine whether the revised regression coefficients will lead to a reasonable result. According to the Least Squares Principle, the solution to the values of the parameters are those values that minimize [math]\displaystyle{ Q }[/math] . With the starting coefficients, [math]\displaystyle{ {{g}^{(0)}} }[/math] , [math]\displaystyle{ Q }[/math] is:
- [math]\displaystyle{ {{Q}^{(0)}}=\underset{i=1}{\overset{N}{\mathop \sum }}\,{{\left[ {{Y}_{i}}-f\left( {{T}_{i}},{{g}^{(0)}} \right) \right]}^{2}} }[/math]
And with the coefficients at the end of the first iteration, [math]\displaystyle{ {{g}^{(1)}} }[/math] , [math]\displaystyle{ Q }[/math] is:
- [math]\displaystyle{ {{Q}^{(1)}}=\underset{i=1}{\overset{N}{\mathop \sum }}\,{{\left[ {{Y}_{i}}-f\left( {{T}_{i}},{{g}^{(1)}} \right) \right]}^{2}} }[/math]
For the Gauss-Newton method to work properly and to satisfy the Least Squares Principle, the relationship [math]\displaystyle{ {{Q}^{(k+1)}}\lt {{Q}^{(k)}} }[/math] has to hold for all [math]\displaystyle{ k }[/math] , meaning that [math]\displaystyle{ {{g}^{(k+1)}} }[/math] gives a better estimate than [math]\displaystyle{ {{g}^{(k)}} }[/math] . The problem is not yet completely solved. Now [math]\displaystyle{ {{g}^{(1)}} }[/math] are the starting values, producing a new set of values [math]\displaystyle{ {{g}^{(2)}} }[/math] . The process is continued until the following relationship has been satisfied:
- [math]\displaystyle{ {{Q}^{(s-1)}}-{{Q}^{(s)}}\simeq 0 }[/math]
When using the Gauss-Newton method or some other estimation procedure, it is advisable to try several sets of starting values to make sure that the solution gives relatively consistent results.
Choice of Initial Values
The choice of the starting values is not an easy task. A poor choice may result in a lengthy computation with many iterations. It may also lead to divergence, or to a convergence due to a local minimum. Therefore, good initial values will result in fast computations with few iterations and if multiple minima exist, it will lead to a solution that is a minimum.
Various methods were developed for obtaining valid initial values for the regression parameters. The following procedure is described by Virene [1] in estimating the Gompertz parameters. This procedure is rather simple. It will be used to get the starting values for the Gauss-Newton method, or for any other method that requires initial values. Some analysts are using this method to calculate the parameters if the data set is divisible into three groups of equal size. However, if the data set is not equally divisible, it can still provide good initial estimates.
Consider the case where [math]\displaystyle{ m }[/math] observations are available in the form shown next. Each reliability value, [math]\displaystyle{ {{R}_{i}} }[/math] , is measured at the specified times, [math]\displaystyle{ {{T}_{i}} }[/math] .
- [math]\displaystyle{ \begin{matrix} {{T}_{i}} & {{R}_{i}} \\ {{T}_{0}} & {{R}_{0}} \\ {{T}_{1}} & {{R}_{1}} \\ {{T}_{2}} & {{R}_{2}} \\ \vdots & \vdots \\ {{T}_{m-1}} & {{R}_{m-1}} \\ \end{matrix} }[/math]
- where:
- • [math]\displaystyle{ m=3n, }[/math] [math]\displaystyle{ n }[/math] is equal to the number of items in each equally sized group
- • [math]\displaystyle{ {{T}_{i}}-{{T}_{i-1}}=const }[/math]
- • [math]\displaystyle{ i=0,1,...,m-1 }[/math]
The Gompertz reliability equation is given by:
- [math]\displaystyle{ R=a{{b}^{{{c}^{T}}}} }[/math]
- and:
- [math]\displaystyle{ \ln (R)=\ln (a)+{{c}^{T}}\ln (b) }[/math]
- Define:
- [math]\displaystyle{ S_1=\sum_{i=0}^{n-1} ln(R_i)= n ln(a)+ln(b)\sum_{i=0}^{n-1} c^{T_i} }[/math]
- [math]\displaystyle{ S_2=\sum_{i=n}^{2n-1} ln(R_i)= n ln(a)+ln(b)\sum_{i=n}^{2n-1} c^{T_i} }[/math]
- [math]\displaystyle{ S_3=\sum_{i=2n}^{m-1} ln(R_i)= n ln(a)+ln(b)\sum_{i=2n}^{m-1} c^{T_i} }[/math]
- Then:
- [math]\displaystyle{ \frac{S_3-S_2}{S_2-S_1}=\frac{\sum_{i=2n}{m-1} c^{T_i}-\sum_{i=n}^{2n-1} c^T_i}{\sum_{i=0}^{n-1} c^{T_i}} }[/math]
- [math]\displaystyle{ \frac{S_3-S_2}{S_2-S_1}=c^T_{2n}\frac{\sum_{i=0}{n-1} c^{T_i}-c^{T_n}\sum_{i=0}^{n-1} c^T_i}{c^{T_n}\sum_{i=0}^{n-1} c^{T_i}} }[/math]
- [math]\displaystyle{ \frac{S_3 - S_2}{S_2-S_1}=\frac{c^{T_2n}-c^{T_n}}{c^{T_n}-1}=c^{T_{a_n}}=c^{n\cdot I+T_0} }[/math]
Without loss of generality, take [math]\displaystyle{ {{T}_{{{a}_{0}}}}=0 }[/math] ; then:
- [math]\displaystyle{ \frac{{{S}_{3}}-{{S}_{2}}}{{{S}_{2}}-{{S}_{1}}}={{c}^{n\cdot I}} }[/math]
Solving for [math]\displaystyle{ c }[/math] yields:
Considering Eqns. (gomp3a) and (gomp3b), then:
- [math]\displaystyle{ \begin{align} & {{S}_{1}}-n\cdot \ln (a)= & \ln (b)\underset{i=0}{\overset{n-1}{\mathop \sum }}\,{{c}^{{{T}_{i}}}} \\ & {{S}_{2}}-n\cdot \ln (a)= & \ln (b)\underset{i=n}{\overset{2n-1}{\mathop \sum }}\,{{c}^{{{T}_{i}}}} \end{align} }[/math]
- or:
- [math]\displaystyle{ \frac{{{S}_{1}}-n\cdot \ln (a)}{{{S}_{2}}-n\cdot \ln (a)}=\frac{1}{{{c}^{n\cdot I}}} }[/math]
Reordering the equation yields:
- [math]\displaystyle{ \begin{align} & \ln (a)= & \frac{1}{n}\left( {{S}_{1}}+\frac{{{S}_{2}}-{{S}_{1}}}{1-{{c}^{n\cdot I}}} \right) \\ & a= & {{e}^{\left[ \tfrac{1}{n}\left( {{S}_{1}}+\tfrac{{{S}_{2}}-{{S}_{1}}}{1-{{c}^{n\cdot I}}} \right) \right]}} \end{align} }[/math]
If the reliability values are in percent then [math]\displaystyle{ a }[/math] needs to be divided by [math]\displaystyle{ 100 }[/math] to return the estimate in decimal format. Consider Eqns. (gomp3a) and (gomp3b) again, where:
Reordering Eqn. (gomp6) yields:
- [math]\displaystyle{ \begin{align} & \ln (b)= & \frac{({{S}_{2}}-{{S}_{1}})({{c}^{I}}-1)}{{{(1-{{c}^{n\cdot I}})}^{2}}} \\ & b= & {{e}^{\left[ \tfrac{\left( {{S}_{2}}-{{S}_{1}} \right)\left( {{c}^{I}}-1 \right)}{{{\left( 1-{{c}^{n\cdot I}} \right)}^{2}}} \right]}} \end{align} }[/math]
For the special case where [math]\displaystyle{ I=1 }[/math] , from Eqns. (gomp4), (gomp5) and (gomp7), the parameters are:
- [math]\displaystyle{ \begin{align} & c= & {{\left( \frac{{{S}_{3}}-{{S}_{2}}}{{{S}_{2}}-{{S}_{1}}} \right)}^{\tfrac{1}{n}}} \\ & a= & {{e}^{\left[ \tfrac{1}{n}\left( {{S}_{1}}+\tfrac{{{S}_{2}}-{{S}_{1}}}{1-{{c}^{n}}} \right) \right]}} \\ & b= & {{e}^{\left[ \tfrac{({{S}_{2}}-{{S}_{1}})(c-1)}{{{\left( 1-{{c}^{n}} \right)}^{2}}} \right]}} \end{align} }[/math]
To estimate the values of the parameters [math]\displaystyle{ a,b }[/math] and [math]\displaystyle{ c }[/math] , do the following:
- 1) Arrange the currently available data in terms of [math]\displaystyle{ T }[/math] and [math]\displaystyle{ R }[/math] as in Table 7.1. The [math]\displaystyle{ T }[/math] values should be chosen at equal intervals and increasing in value by 1, such as one month, one hour, etc.
- 2) Calculate the natural log [math]\displaystyle{ R }[/math] .
- 3) Divide the column of values for log [math]\displaystyle{ R }[/math] into three groups of equal size, each containing [math]\displaystyle{ n }[/math] items. There should always be three groups. Each group should always have the same number, [math]\displaystyle{ n }[/math] , of items, measurements or values.
- 4) Add the values of the natural log [math]\displaystyle{ R }[/math] in each group, obtaining the sums identified as [math]\displaystyle{ {{S}_{1}} }[/math] , [math]\displaystyle{ {{S}_{2}} }[/math] and [math]\displaystyle{ {{S}_{3}} }[/math] , starting with the lowest values of the natural log [math]\displaystyle{ R }[/math] .
- 5) Calculate [math]\displaystyle{ c }[/math] from Eqn. (eq9):
- [math]\displaystyle{ c={{\left( \frac{{{S}_{3}}-{{S}_{2}}}{{{S}_{2}}-{{S}_{1}}} \right)}^{\tfrac{1}{n}}} }[/math]
- 6) Calculate [math]\displaystyle{ a }[/math] from Eqn. (eq10):
- [math]\displaystyle{ a={{e}^{\left[ \tfrac{1}{n}\left( {{S}_{1}}+\tfrac{{{S}_{2}}-{{S}_{1}}}{1-{{c}^{n}}} \right) \right]}} }[/math]
- 7) Calculate [math]\displaystyle{ b }[/math] from Eqn. (eq11):
- [math]\displaystyle{ b={{e}^{\left[ \tfrac{({{S}_{2}}-{{S}_{1}})(c-1)}{{{\left( 1-{{c}^{n}} \right)}^{2}}} \right]}}\lt /m :8) Write the Gompertz reliability growth equation. :9) Substitute the value of \lt math\gt T }[/math] , the time at which the reliability goal is to be achieved, to see if the reliability is indeed to be attained or exceeded by [math]\displaystyle{ T }[/math] .
Group Number | Growth Time [math]\displaystyle{ T }[/math](months) | Reliability [math]\displaystyle{ R }[/math](%) | [math]\displaystyle{ \ln{R} }[/math] |
---|---|---|---|
0 | 58 | 4.060 | |
1 | 1 | 66 | 4.190 |
[math]\displaystyle{ {{S}_{1}} }[/math] = 8.250 | |||
2 | 72.5 | 4.284 | |
2 | 3 | 78 | 4.357 |
[math]\displaystyle{ {{S}_{2}} }[/math] = 8.641 | |||
4 | 82 | 4.407 | |
3 | 5 | 85 | 4.443 |
[math]\displaystyle{ {{S}_{3}} }[/math] = 8.850 |