23.2 Linearity
In RDC 166, the “linearity” parameter is discussed between articles 23 and 27. The resolution sets that the linearity of an analytical method must be demonstrated through its ability to obtain analytical responses directly proportional to the concentration of an analyte in a sample. Furthermore, a linear relationship must be evaluated throughout the range established for the analytical procedure. Within the established range, the experimental procedure must be conducted via the following strategy:
- We must use at least 5 (five) concentrations different from the SQR for solutions prepared in at least triplicate;
- The solutions used to evaluate linearity must be prepared independently, and diluted solutions from the same SQR stock solution may be used;
By independent preparation, we mean that, for each replica, a weighing must be carried out. Furthermore, the resolution defines that the calculations carried out to assess linearity must be carried out based on real concentration data and individual analytical responses. From the data obtained via the described experiment, some analyzes must be conducted. Here, we discuss the analyzes and criteria highlighted by RDC 166. In general, we can represent the linearity study according to the following flowchart:
Figure 23.2.1: Linearity study flowchart
Step 1: At this stage we collected the data according to the procedure described previously. The modeling of the calibration curve data will be carried out according to chemical principles, generally linear,
$$Y_{ij} = \beta_0 + \beta_1 x_{ij} + \varepsilon_{ij}, \quad j=1, \cdots , n_i \quad \text{e} \quad i=1, \cdots k,$$
where:
- $ Y_{ij} $ represents the analytical signal;
- $ x_{ij} $ represents concentration;
- $ \beta_{0} $ represents the linear coefficient or intercept;
- $ \beta_{1} $ represents the angular coefficient;
- $ \varepsilon $ represents the experimental error;
- $ n_i $ represents the number of replicas of the point $ i $ concentration;
- $ k $ represents the number of points or levels.
At this point it is interesting to discuss the sampling process. In general, laboratories prepare several stock solutions, with independent weighing. From these solutions, they prepare the appropriate dilutions. In this case, the three or more dilutions of each point are what statisticians call “quasi-replicas”, as they were prepared (weighed) independently. As we have independent weighings, we have different values for each dilution, but the dilutions were obtained from the same stock solution, which leads us to the quasi-replica phenomenon.
A fundamental point in our analysis is experimental error $ \varepsilon $. It represents noise related to phenomena that we do not have full control over, such as the weighing process, analyst interference, environmental conditions, glassware, equipment, among others. To perform the statistical analysis of the calibration curve data, we will assume that the experimental errors are independent and normally distributed with zero mean and constant variance $ \sigma^2 $. Note that we admit three fundamental hypotheses for our statistical analysis: Independence, Normal Distribution and Homoscedasticity. Obviously, these hypotheses must be checked and treated appropriately.
Step 2: Here, we are interested in estimating and evaluating the significance of the coefficients of the simple linear regression equation of y (analytical signal) on x (concentration). The resolution indicates the estimation via the least squares method. It is important to emphasize that least squares estimates are obtained only with the hypotheses of uncorrelated errors (which is weaker than independence) and homoscedasticity of error variance. The assumption of normality of experimental errors is not used to obtain least squares estimates. Using the least squares method, initially proposed by Gauss in 1806, we obtain that
$$\hat{\beta_1} = \frac{S_{xy}}{S_{xx}} \quad \text{e} \quad \hat{\beta_0}=\bar{y} - \hat{\beta_1} \bar{x}$$
in which $ S_{xy} = \sum xy - n \bar{y} \bar{x} $, $ S_{xx} = \sum x^2 - n (\bar{x})^2 $ and $ n $ the total data.
Once estimated, we evaluate the significance of the parameters via hypothesis testing. We can evaluate the significance of the slope using the ANOVA table. Another strategy is to perform a t-test for each parameter. In the scenario imposed for the study of linearity, both techniques are equivalent with regard to the angular coefficient. Through the regression model, it is also possible to evaluate the linear association between the variables through the correlation coefficients (r) and determination coefficients (r²), which are descriptive measures of the quality of the model adjustment. At this stage, the criteria defined by the RDC are:
- The angular coefficient must be significant at a significance level of 5%;
- The linear coefficient (or intercept) must not be significant at a 5% significance level;
- The correlation coefficient ($ r=\sqrt{r^2} $) must be above 0.990.
A critical point for step 2 is the evaluation of the linear coefficient or intercept. In pharmaceutical routine, samples are quantified using a single standard, as illustrated in Figure “Management Problem”.
(image missing) Figure 23.2.2
If the curve that represents linearity passes through zero (blue curve), we can quantify it with a single pattern in the routine, as the second point to draw the straight line is represented by the origin $ (0,0) $. In general, the linearity of the method will need to be re-evaluated when the value of the linear coefficient is statistically different from zero and has a significant magnitude for the analytical signal at the working concentration. Furthermore, if an intercept is found that is statistically different from zero and has a significant magnitude compared to the analytical responses, it is recommended that a calibration curve be used instead of a single point for standardization in the analysis routine.
Note that the fact that the linear coefficient (or intercept) is significantly different from zero results in a calibration curve that does not pass through the origin. On the other hand, when using a single pattern in the routine, we assume that the curve passes through the origin. In the routine we use the blue curve in the “Management Problem” graph, while the correct curve would be one of the dotted red curves. This inconsistency results in an accuracy error in the analytical method. In practice, we can evaluate this accuracy error through the magnitude of the intercept in the analytical signal, as recommended in the ANVISA guide. We can also carry out an accuracy study at several concentration points to evaluate the impact of quantifying with a single standard.
If the impact of the linear coefficient is high, the ANVISA Guide suggests using the calibration curve in the routine. In our opinion, we could replace the origin $ (0,0) $ at any other point. From two points, we derive the linear calibration curve. For example, we can use the points of $ 90 \char37 $ and $ 110 \char37 $ to obtain the calibration curve.
Step 3: For the tests proposed in Step 2, we assume that the experimental errors are independent and follow a normal distribution with zero mean and constant variance. In this step, we will evaluate the assumption that experimental errors follow a normal distribution. The remaining assumptions will be checked in the following steps. Note that the assumption of normality is related to experimental errors. Unfortunately, in practice, we do not have access to them. The closest we come to experimental errors are the residuals given by
$$e_{ij} = Y_{ij} - \hat{\beta_0} - \hat{\beta_1} x_{ij}, \quad j=1, \cdots , n_i \quad \text{e} \quad i=1, \cdots k.$$
Since experimental errors cannot be observed, we evaluate the assumptions made about them using the model residuals. The most common way to evaluate the normality of residuals is the “probability paper” graph or the “QQPlot” graph. The two graphs are similar in the case of normal distribution. In these graphs, we compare the residuals with the normal distribution, the closer the points are to the straight line that represents the normal distribution, the better the adherence of the residuals to the normal distribution. In our opinion, the graphical form is the best way to evaluate the normality of the residues. As described in ANVISA guide 10, the graphical analysis is enough to carry out the analysis of the normality of the residues.
We can also use hypothesis tests to check the normality of the residuals. There are numerous statistics associated with the normality hypothesis. For example: Kolmogorov-Smirnov, Anderson-Darling, Shapiro-Wilk and Ryan-Joiner. We know that the residues are given by $ e = (I-H)Y $, in which $ H $ is the hat matrix and $ Y $ the vector with the analytical signals. Like the hat matrix $ H=X(X^\prime X)^{-1} X^\prime $ is deterministic we obtain that $ Var(e)=(I-H) \sigma^2 $. Since the projection matrix $ (I-H) $ It is not necessarily diagonal, we have that, in general, the residuals are correlated. On the other hand, the usual tests for data normality assume the hypothesis of independence, a fact that is not valid for residuals.
Normal distribution adherence tests are used to test the null hypothesis that the residuals follow a normal distribution versus the alternative hypothesis that the residuals do not follow the normal distribution. In general, normality tests do not “work well” for small samples (under 30 observations) and for large samples (over 1000 observations). With small samples, in general, the tests do not reject the hypothesis of normality, even if the QQ Plot graph shows declines with respect to the normal distribution. On the other hand, for large samples (over 1000 observations) normality tests, in general, reject the hypothesis of data normality, even if the QQ Plot shows a good adherence of the data with respect to normal distribution.
Step 4: As mentioned in Step 3, we assume that the experimental errors have equal variances. At this stage, we are interested in evaluating whether this assumption is reasonable. This assessment can be done in two ways: visual analysis and hypothesis testing. In the visual analysis, we use the graph of residuals versus adjusted values. On the other hand, there are several tests to assess homoscedasticity. At Action Stat, we work with the Cochran, Brown-Forsythe, Breusch Pagan and Goldfeld Quandt tests.
The Cochran test compares the variances at each point on the calibration curve. As, in general, we have few replications of each point to calculate variances, we do not consider the Cochran test appropriate to evaluate homoscedasticity in the context of linearity. We propose the Breuch-Pagan test to evaluate homoscedasticity in a linearity study. In this test, we take the squared residuals
$$u_i=\frac{e_i^2}{SQE} n,$$
in which $ SQE $ is the sum of squares of the experimental error. From the squared residuals, we fit the linear regression model between $ u $ and the adjusted values $ \widehat{Y} $. If the model is homoscedastic, then the squared residuals $ (u) $ behave “constantly” along the adjusted straight line $ (\widehat{Y}) $. In this case the angular coefficient must be equal to zero. The Breuch-Pagan statistic $ SQR /2 $ has an asymptotic chi-square distribution with 1 degree of freedom, in which $ SQR $ is the sum of squares of the regression.
The Brown-Forsythe test is a test for homoscedasticity that does not use the normality of the residuals. Here, we take the variable $ z_{ij}= \mid e_{i,j} - me_i \mid $, in which $ j=1, \cdots ,n_i $ and $ me_i $ is the median of the residues at the concentration point $ i=1, \cdots k $. From the observations $ z_{ij} $ we carry out the test $ F $ of ANOVA to evaluate the homoscedasticity of the simple linear regression model. This test is very simple and can be safely applied in the context of linearity.
If the assumption of homoscedasticity is not valid, we must include this characteristic in the model. In this case, the model adjustment (contemplated in Step 2) must be carried out using Weighted Least Squares Estimators. After making the adjustment, we can proceed with the analyses.
If the assumption of homoscedasticity is valid, we can proceed with the analyzes without readjusting the model.
Step 5: In this step we will evaluate the presence of “outliers” or “extreme values” and observations that have a major impact on the model, called “influential points”.
To assess whether an observation is an “outlier” (or “extreme value”), we generally evaluate some criterion related to the regression residual associated with that observation. In order to leave all waste on the same scale, we use some standardization instead. The most commonly used standardizations are “standardized residues” and “studentized residues”. In general, we compare these standardizations with the quantiles of the standard normal distribution. For example, we can consider an observation to be an “outlier” if the standardized residual related to that observation is less than -3 or greater than 3, which corresponds to an interval with $ 99,73\char37 $ of the standard normal distribution.
On the other hand, we assess whether an observation is a leverage point by analyzing some measure related to the covariate x. In general, we pay attention to the diagonal of the hat matrix (hat matrix; hat matrix; H). The elements of the hue diagonal are termed “leverage” so that the ith element is associated with the “influence” of the ith observation in the study. In this analysis, we used the following measures:
- DFFITS: measures the influence that observation i has on its own adjusted value;
- DFBETA: measures the influence of observation i on the coefficient of Xj;
- Cook’s Distance: Cook’s distance combines DFFITS and DFBETA measurements.
Again, we associate these statistics with cutoff points to arbitrate whether or not an observation is an influential point.
Step 6: Here we are interested in evaluating the last assumption under experimental errors: independence. We use graphical methods and hypothesis tests. An appropriate graph for this analysis is “standardized waste” by “collection order”. If the points do not show any pattern (for example, a cone shape), we have evidence that the assumption is satisfied. If it does, we must investigate the cause(s) of this phenomenon. We can also use the Durbin-Watson test, in which H0 is the hypothesis that the observations are independent.
HPLC Linearity Example
Consider the experiment for linearity of an analytical methodology with HPLC. Data were obtained from three independently weighed stock solutions. In this experiment, we have 5 concentration points and three replicates obtained from dilutions of the stock solutions.
| Concentration | Area |
|---|---|
| 31800 | 88269 |
| 31680 | 86954 |
| 31600 | 88492 |
| 36080 | 99580 |
| 36600 | 101235 |
| 36150 | 100228 |
| 39641 | 108238 |
| 40108 | 109725 |
| 40190 | 110970 |
| 43564 | 118102 |
| 43800 | 119044 |
| 43800 | 119044 |
| 43776 | 118292 |
| 47680 | 129714 |
| 47800 | 129481 |
| 47341 | 130213 |
Table 23.2.1: Data set for the linearity study (Analyte 1)
In this example, we use the following notation:
- X: Concentration
- Y: Area
We estimated the parameters of the linear model using the ordinary least squares method. For this, we use the following quantities:
- $ \bar{X} $ = 39854
- $ \bar{Y} $ = 109235,8
- $ S_{xx} $ = 463741158
- $ S_{yy} $ = 3135113424
- $ S_{xy} $ = 1204279553
| Estimate | Standard Deviation | Stat.t | P-Value | Lower limit | Upper limit | |
|---|---|---|---|---|---|---|
| Intercept | 5739,7948 | 1442,3545 | 3,9795 | 0,0016 | 2623,7772 | 8855,8123 |
| Concentration | 2,5969 | 0,03358 | 72,4499 | 0 | 2,5194 | 2,6743 |
Table 23.2.2: Estimates
Thus, the adjusted model is given by:
Area = 5739.7948 + 2.5969 * Concentration
With the table above, in addition to the parameter estimates, we can evaluate the significance of the parameters using the T test. Regarding the intercept parameter, we have that the hypotheses are given by:
$\begin{cases} H_0: \ \hbox{Intercept equals zero.} \cr H_1: \ \hbox{Intercept is non-zero.} \end{cases}$
The test statistic is given by:
$$ T = \frac{\hat{\beta_{0}}}{\sqrt{\hat{Var(\beta_{0})}}} = \frac{5739,7948}{1442,3545} = 3,9795 ,$$
in which $ \sqrt{\hat{Var(\beta_{0})}} $ is the standard deviation of the intercept given in the table above.
The quantile of the T distribution to obtain the critical region is given by $ t_{(0,95, 13)} = 1,770933 $. As the p-value associated with the test, $ \text{P-valor} = 2 P( t_{(0,95, 13)} > | \text{t} | ) = 0,0016 $, is less than 0.05, we reject $ H_0 $ and we conclude that the intercept is different from zero at the 5% significance level.
Regarding the angular coefficient, the hypotheses are:
$\begin{cases} H_0: \ \hbox{Angular coefficient is equal to zero.} \cr H_1: \ \hbox{Angular coefficient is non-zero.} \end{cases}$
The test statistic is given by:
$$ T = \frac{\hat{\beta_{1}}}{\sqrt{\hat{Var(\beta_{1})}}} = \frac{2,5969}{0,03358} = 72,4499 ,$$
in which $ \sqrt{\hat{Var(\beta_{1})}} $ is the standard deviation of the slope given in the table above.
The quantile of the T distribution to obtain the critical region is given by $ t_{(0,95, 13)} = 1,770933 $. As the p-value associated with the test, $ \text{P-valor} = 2 P( t_{(0,95, 13)} > | \text{t} | ) = \ 0 \ $, is less than 0.05, we reject $ H_0 $ and we conclude that the angular coefficient is different from zero at the 5% significance level.
We also evaluated the significance of the parameters using the ANOVA F test. It is worth mentioning that we have a simple regression model, so the ANOVA F test is equivalent to the T test. Below, we present the ANOVA Table.
| Factors | Degrees of freedom | Sum of squares | Medium square | Stat. F | P-Value |
|---|---|---|---|---|---|
| Concentration | 1 | 3127367965,4155 | 3127367965,4155 | 5248,9831 | 0 |
| Waste | 13 | 7745758,9845 | 595804,5373 | ||
| Total | 14 | 31355113424 |
Table 23.2.3: ANOVA table
To test the significance of the model’s angular coefficient with the ANOVA F test, we present the following hypotheses:
$\begin{cases} H_0: \ \hbox{Angular coefficient is equal to zero.} \cr H_1: \ \hbox{Angular coefficient is non-zero.} \end{cases}$
The test statistic is given by:
$$ F_{OBS} = \frac{QMR}{QME} = \frac{ \frac{SQR}{1} }{ \frac{SQE}{13} } = \frac{\frac{3127367965,4155}{1}}{\frac{7745458,9845}{13} } = \frac{3127367965,4155}{595804,5373} = 5248,9831 $$
The critical region for the F test is given by $ F_{(0,95, 1, 13)} = 4,667193 $. As the statistic observed $ F_{OBS} > \ \text{4,667193} $ is greater than the quantile of the distribution for determining the critical region (the observed statistic belongs to the critical region) and the p-value associated with the test $ \text{P-valor} = 2 P( F_{(0,95, 1, 13)} > F_{OBS} ) = 0 $, we reject the null hypothesis at the 5% significance level.
The following table presents the exploratory analysis of waste.
| Minimum | 1Q | Median | Average | 3Q | Maximum |
|---|---|---|---|---|---|
| -1129 | -444,7 | -51,54 | 0 | 611 | 1534 |
Table 23.2.4: Exploratory analysis of waste
Observing the table above, we note that the minimum and maximum values, in modules, do not present a notable difference, as do the median and mean, which gives us evidence that the distribution of residuals is symmetrical.
In addition to the hypothesis test for the linear coefficient, we also evaluate the impact of the intercept on the analytical response, which is given in the following table.
| Concentration | Answer | Impact of linear coefficient (%) |
|---|---|---|
| 31800 | 88269 | 6,5026 |
| 31680 | 86954 | 6,601 |
| 31600 | 88492 | 6,4862 |
| 36080 | 99580 | 6,4862 |
| 36600 | 101235 | 5,6698 |
| 36150 | 100228 | 5,7267 |
| 39641 | 108238 | 5,3029 |
| 40108 | 109725 | 5,2311 |
| 40190 | 110970 | 5,1724 |
| 43564 | 118102 | 4,86 |
| 43800 | 119044 | 4,8216 |
| 43776 | 118292 | 4,8522 |
| 47680 | 129714 | 4,425 |
| 47800 | 129481 | 4,4329 |
| 47241 | 130213 | 4,408 |
Table 23.2.5: Impact of the intercept on the analytical response
From the table above, we observe that for all concentration points, we have an impact of the linear coefficient greater than 2%, a value defined as the maximum acceptable impact in quantification. Furthermore, the impact result is in accordance with the intercept test result. Therefore, the ideal would be to quantify the results of the routine with a calibration curve, but if a single point is used, it will be necessary to investigate the impact.
Let’s analyze Pearson’s correlation coefficient, as previously stated, it measures the degree of proportionality between the explanatory variable (concentration) and the response variable (area).
| Standard deviation of residuals | Degrees of freedom | $ R^2 $ | Correlation coefficient |
|---|---|---|---|
| 771,8838 | 13 | 0,9975 | 0,9988 |
Table 23.2.6: Pearson correlation coefficient
We have the coefficient of determination $ R^2 $ and the correlation coefficient $ r $ are given by:
$$ R^2 = \frac{SQR}{SQT} = \frac{\hat{\beta_{1}}S_{xy}}{S_{yy}} = \frac{2,5969*1204279553}{3135113424} = 0,9975\ \text{e} \ r = \sqrt{R^{2}} = 0,9988 $$
Therefore, the RDC criterion in relation to the coefficient is satisfied, since $ r = 0,9988 $ is above the value specified, 0.990, by the regulatory agency. Note that the coefficient of determination represents the signal/noise ratio, where $ SQR $ is related to the analytical signal and the noise is related to the $ SQT $.
Figure 23.2.3: Linearity Adjustment
Observing the graph of adjusted values, we notice that the difference between the response variable and the adjusted line is low, but it is worth highlighting that the magnitude of the response (y axis) is high.
Next, we analyze the main assumptions imposed on experimental errors using the 4-in-1 graph.
Figure 23.2.4: Waste Analysis
Observing the graph of standardized residual vs adjusted values, we notice that we do not have possible outliers, that is, none of the points have a high residual value.
Observing the QQPlot, we notice that the points approach the dotted line - in blue -, and that all results are contained in the confidence band, which gives us evidence that the assumption of normality for experimental errors is satisfied.
Observing the plot of residuals This gives us evidence that the variance of experimental errors is homoscedastic. It is interesting to highlight that the most common behavior is that of a cone, this behavior indicates that as the adjusted values increase, the residuals also increase.
Observing the graph of residues x collection order, we want to check if we found a behavior at the points. A behavior can mean dirt on the glassware, dirt on the needle, tiredness of the analyst, etc. We noticed that the points seem to be distributed randomly, which gives us evidence of the independence of the experimental errors and that we did not have any behavior like those exemplified.
To validate our suspicions based on graphical analysis, we will verify each hypothesis raised through statistical tests.
Next, we analyze the normality of experimental errors, in which the hypotheses are:
$\begin{cases} H_0: \ \hbox{The distribution of experimental errors is normal.} \cr H_1: \ \hbox{The distribution of experimental errors is not normal.} \end{cases}$
| Test | Statistics | P-Value |
|---|---|---|
| Anderson-darling | 0,1538 | 0,9446 |
| Kolmogorov-Smirnov | 0,0998 | 0,9542 |
| Ryan-Joiner | 0,9899 | 0,9241 |
| Shapiro-Wilk | 0,9759 | 0,9340 |
Table 23.2.7: Residue Normality Tests
Here we adopted the Shapiro-Wilk test to assess normality. As the p-value of the Shapiro-Wilk test, p-value 0.9340, is greater than 0.05, we do not reject the hypothesis of normality of experimental errors at the 5% significance level. Note that the result of the Shapiro-Wilk test is in accordance with the graphical analysis of QQPlot.
Next, we analyze homoscedasticity using the Breusch-Pagan test, in which the hypotheses are:
The distribution of experimental errors is not normal.
$\begin{cases} H_0: \ \hbox{The variances are equal.} \cr H_1: \ \hbox{At least one variance differs.} \end{cases}$
| Statistics | P-Value |
|---|---|
| 0,5829 | 0,4452 |
Table 23.2.8: Breusch-Pagan test
As the p-value of the test is greater than 0.05, we do not reject the hypothesis of equality of variances at the 5% significance level. Note that the test result is in accordance with the graphical analysis of residuals X fitted values. Therefore, we have a homoscedastic model.
The Breusch-Pagan test is the one that best suits our objective, since we assume normality for experimental errors. The Cochran and Brown-Forsythe tests are not suitable for our objective as they require groups and, as the data in the example were collected independently, the tests in question could not be carried out. The Goldfeld-Quandt test has the limitation of requiring relatively large samples.
Next, we analyze the extreme values. To do this, we evaluate the standardized residuals and the studentized residuals.
| Number obs. | Concentration | Waste | Studentized Waste | Standardized Waste |
|---|---|---|---|---|
| 1 | 31800 | -51,5386 | -0,072 | -0,075 |
| 2 | 31680 | -1054,9132 | -1,6342 | -1,5384 |
| 3 | 31600 | 690,8371 | 1,01 | 1,0092 |
| 4 | 36080 | 144,8204 | 0,19 | 0,1975 |
| 5 | 36600 | 449,4434 | 0,5949 | 0,6102 |
| 6 | 36150 | 611,0388 | 0,8223 | 0,8327 |
| 7 | 39641 | -444,6648 | -0,5809 | -05963 |
| 8 | 40108 | -170,4072 | -0,22 | -0,2285 |
| 9 | 40190 | 861,6487 | 1,1721 | 1,1556 |
| 10 | 43564 | -768,2201 | -1,0512 | -1,047 |
| 11 | 43800 | -439,0835 | -0,5843 | -0,5997 |
| 12 | 43776 | -1128,7584 | -1,638 | -1,5413 |
| 13 | 47680 | 155,027 | 0,216 | 0,2244 |
| 14 | 47800 | -389,5984 | -0,5499 | -,05653 |
| 15 | 47341 | 1534,3689 | 2,6783 | 2,2054 |
Table 23.2.9: Waste Table
As a criterion for analysis, extreme values in the response will be considered observations with studentized and/or standardized residuals greater than 3, in module.
Figure 23.2.5: Standardized Waste
Figure 23.2.6: Studentized Residues
Observing the table above and the graphs of standardized residuals vs adjusted values and studentized residuals vs adjusted values, we note that there are no studentized and standardized residuals with values greater than three, in module, so we do not have outliers.
Next, we analyze the influential points using DFFITS, DFBETA and Cook’s distance measurements. The criteria for analyzing influential points are given by:
| Diagnosis | Formula | Value |
|---|---|---|
| DFFITS | $ 2 \sqrt{(p+1)/n} $ | 0,73 |
| DCOOK | $ 4/n $ | 0,2667 |
| DFBETA | $ 2/\sqrt{n} $ | 0,52 |
Table 23.2.10: Criteria for influential points
Figure 23.2.7: Analysis of leverage points
Figure 23.2.8: Influential points (DFFITS)
| Observations | DFFITS | Criterion |
|---|---|---|
| 2 | -0,84 | $ \pm $ 0,73 |
| 15 | 1,29 | $ \pm $ 0,73 |
Table 23.2.11: Influential points (DFFITS)
Figure 23.2.9: Influential points (Dcook)
| Observations | DCOOK | Criterion |
|---|---|---|
| 2 | 0,3159 | 0,2667 |
| 15 | 0,5613 | 0,2667 |
Table 23.2.12: Influential points (Dcook)
Figure 23.2.10: Influential points - Concentration
| Observations | DFBETA | Criterion |
|---|---|---|
| 2 | 0,6982 | 0,5164 |
| 15 | 1,033 | 0,5164 |
Table 23.2.13: Influential points - Concentration
Based on the criteria established by the measurements and observation of the measurement graphs, observations 2 and 15 are influential points for all three measurements mentioned.
Finally, we will analyze the independence of observations.
Figure 23.2.11: Waste graph x Collection order
Observing the graph of residues To confirm this, we will apply the Durbin-Watson test. The test hypotheses are:
$ \begin{cases} H_0: \ \hbox{Observations are independent.} \cr H_1: \ \hbox{Observations are not independent.} \end{cases}$
| Statistics | P-Value | |
|---|---|---|
| Durbin-Watson | 2,0158 | 0,3943 |
Table 23.2.14: Independence test
Applying the Durbin-Watson test, we obtain a p-value of 0.3943, a value greater than 0.05. Therefore, we do not reject the hypothesis of independence of observations at the 5% significance level.
Therefore, the RDC 166 criteria that were met are:
- Significant angular coefficient at the 5% significance level;
- R = 0.9988: Correlation coefficient greater than 0.990;
- Homoscedasticity;
- Normality of experimental errors;
- Independence of observations.
However, the criterion in relation to the linear coefficient was not met, as it was significant at a significance level of 5%, so we need to analyze the impact of the linear coefficient. the impact of the coefficient for each observation was greater than 3%, a value defined as the maximum acceptable.
Example Linearity: independent weighing
Below, we present the collected data.
| Concentration | Area |
|---|---|
| 12,1442 | 3,0575 |
| 12,1385 | 3,0408 |
| 12,1442 | 3,0358 |
| 13,6644 | 3,4189 |
| 13,6606 | 3,4071 |
| 13,6526 | 3,408 |
| 15,1759 | 3,7866 |
| 15,1683 | 3,7858 |
| 15,1835 | 3,7958 |
| 16,6912 | 4,1651 |
| 16,684 | 4,145 |
| 16,6859 | 4,1415 |
| 18,2019 | 4,5253 |
| 18,1996 | 4,524 |
| 18,1909 | 4,5363 |
Table 23.2.15: Data set for the linearity study (Analyte 2)
Before starting the study of the Linearity parameter, it is interesting to highlight that the data come from different mother solutions, that is, for each concentration a weighing took place, so the experiments were carried out independently. That said, we begin the study of linearity. In this example, we use the following notation:
- X: Concentration
- Y: Area
Using the ordinary least squares method, we estimate the model parameters, but to estimate the parameters we need the following quantities:
- $ \bar{X} $ = 15,17237
- $ \bar{Y} $ = 3,7849
- $ S_{xx} $ = 68,74924
- $ S_{yy} $ = 4,123262
- $ S_{xy} $ = 16,83467
| Estimate | Standard Deviation | Stat.t | P-Value | Lower limit | Upper limit | |
|---|---|---|---|---|---|---|
| Intercept | 0,0696 | 0,0157 | 4,4228 | 0,0007 | 0,0356 | 0,1036 |
| Concentration | 0,2449 | 0,001 | 238,3242 | 0 | 0,2427 | 0,2471 |
Table 23.2.16: Coefficients
Therefore, the adjusted model is:
Area = 0.0696 + 0.2449 * Concentration
Using the table above, in addition to the calculated estimates, we can evaluate the significance of the parameters using the T test, as seen in example 1.2.1.1, so the test statistics will be similar to those in the previous example.
Regarding the intercept parameter, the hypotheses are:
$\begin{cases} H_1: \ \hbox{Intercept equals zero.} \cr H_1: \ \hbox{Intercept is non-zero.}$
The quantile of the T distribution to obtain the critical region is given by $ t_{(0,95, 13)} = 1,770933 $. As the p-value associated with the test, $ \text{P-valor} = 2 P( t_{(0,95, 13)} > | \text{t} | ) = 0,0007 $, is less than 0.05, we reject $ H_0 $ and we conclude that the intercept is different from zero at the 5% significance level.
Regarding the angular coefficient, the hypotheses are:
$\begin{cases} H_1: \ \hbox{Angular coefficient is equal to zero.} \cr H_1: \ \hbox{Angular coefficient is non-zero.}$
The quantile of the T distribution to obtain the critical region is given by $ t_{(0,95, 13)} = 1,770933 $. As the p-value associated with the test, $ \text{P-valor} = 2 P( t_{(0,95, 13)} > | \text{t} | ) = \ 0 \ $, is less than 0.05, we reject $ H_0 $ and we conclude that the angular coefficient is different from zero at the 5% significance level.
We also evaluated the significance of the parameters using the ANOVA F test. It is worth mentioning that we have a simple regression model, so the ANOVA F test is equivalent to the T test.
Next, we tested the significance of the model parameters.
| Factors | Degrees of freedom | Sum of squares | Medium square | Stat. F | P-Value |
|---|---|---|---|---|---|
| Concentration | 1 | 4,1223 | 4,1223 | 56798,4007 | 0 |
| Waste | 13 | 0,0009 | 0,0001 | ||
| Total | 14 | 4,1232 |
Table 23.2.17: ANOVA Table
To test the angular coefficient of the model we use the ANOVA F test, in this case we test the hypotheses:
$\begin{cases} H_1: \ \hbox{Angular coefficient is equal to zero.} \cr H_1: \ \hbox{Angular coefficient is non-zero.}$
The critical region for the F test is given by $ F_{(0,95, 1, 13)} = 4,667193 $. As the statistic observed $ \ | \text{F} | > \ \text{4,667193} $ is greater than the quantile of the distribution for determining the critical region, that is, the observed statistic belongs to the critical region, and the p-value associated with the test $ \text{P-valor} = 2 P( F_{(0,95, 1, 13)} > | \text{F} | ) = 0 $, we reject the null hypothesis at the 5% significance level.
The following table presents the exploratory analysis of waste.
| Minimum | 1Q | Median | Average | 3Q | Maximum |
|---|---|---|---|---|---|
| -0,014 | -0,0076 | -0,0012 | 0 | 0,0082 | 0,0141 |
Table 23.2.18: Exploratory analysis of waste
Observing the table above, we notice that the median and mean values, in modulus, are extremely close, as are the minimum and maximum values, this gives evidence that the distribution of residuals is symmetrical.
In addition to the hypothesis test for the linear coefficient, we also evaluated the impact of the intercept on the analytical response. The impact is given in the following table.
| Concentration | Answer | Impact of linear coefficient (%) |
|---|---|---|
| 12,1442 | 3,0575 | 2,2776 |
| 12,1385 | 3,0408 | 2,2901 |
| 12,1442 | 3,0358 | 2,2939 |
| 13,6644 | 3,4189 | 2,0369 |
| 13,6606 | 3,4071 | 2,0439 |
| 13,6526 | 3,408 | 2,0434 |
| 15,1759 | 3,7866 | 1,8391 |
| 15,1683 | 3,7858 | 1,8395 |
| 15,1835 | 3,7958 | 1,8346 |
| 16,6912 | 4,1651 | 1,6720 |
| 16,684 | 4,145 | 1,6801 |
| 16,6859 | 4,1415 | 1,6815 |
| 18,2019 | 4,5253 | 1,5389 |
| 18,1996 | 4,524 | 1,5393 |
| 18,1909 | 4,5363 | 1,5351 |
Table 23.2.19: Impact of the linear coefficient (Intercept)
From the table above we observe that, for the lowest concentration points, that is, for points 12.1442 to 13.6526, we have $ ICL_{i} > 2\char37 $, value defined as the maximum acceptable impact on quantification. Therefore, it is recommended to use a calibration curve with at least 2 points instead of a single point for standardization in the analysis routine. If a single point is used, the impact must be investigated.
Next, we analyze the Pearson correlation coefficient.
| Standard deviation of residuals | Degrees of freedom | $ R^2 $ | Correlation coefficient |
|---|---|---|---|
| 0,0085 | 13 | 0,9998 | 0,9999 |
Table 23.2.20: Descriptive measure of fit quality
As the correlation coefficient, $ r = 0,9999 $, is greater than 0.9900 as specified by the regulatory agency, we conclude that an adequate linear relationship exists. As stated in the previous example, the coefficient of determination represents the signal/noise ratio.
Figure 23.2.12: Scatter Diagram
Looking at the graph above, we notice that the difference between the response and the fitted line is extremely low.
Next, we analyze the main assumptions imposed on experimental errors using the 4-in-1 graph.
Figure 23.2.13: Waste analysis graph
Observing the graph of standardized residual vs adjusted values, we notice that we do not have possible extreme values, that is, none of the points have a high residual value.
Observing the QQPlot we notice that the points approach the dotted line - in blue -, and that all results are contained in the confidence band, which indicates that the assumption of normality for experimental errors is satisfied.
Observing the graph of residuals x adjusted values, we notice that the points do not have a clear behavior, such as a smile or a smile. Therefore, we have evidence that the variance of experimental errors is homoscedastic.
Observing the graph of residues x collection order, we notice that the points appear to be distributed randomly, that is, we do not have any apparent behavior, such as an increasing or decreasing sequence of points. Therefore, we have evidence of the independence of experimental errors.
To validate our suspicions based on graphical analysis, we will verify the hypotheses raised through statistical tests.
Next, we analyze the normality of experimental errors, in which the hypotheses are:
$\begin{cases} H_1: \ \hbox{The distribution of experimental errors is normal.} \cr H_1: \ \hbox{The distribution of experimental errors is not normal.}$
| Test | Statistics | P-Value |
|---|---|---|
| Anderson-darling | 0,1727 | 0,911 |
| Kolmogorov-Smirnov | 0,1073 | 0,913 |
| Ryan-Joiner | 0,9917 | 0,9585 |
| Shapiro-Wilk | 0,9748 | 0,9221 |
Table 23.2.21: Normality Tests
Here we adopted the Shapiro-Wilk test to assess normality. As the p-value of the Shapiro-Wilk test, p-value 0.9221, is greater than 0.05, we do not reject the hypothesis of normality of experimental errors at the 5% significance level.
Next, we analyze homoscedasticity using the Breusch-Pagan test, in which the hypotheses are:
$\begin{cases} H_1: \ \hbox{The variances are equal.} \cr H_1: \ \hbox{At least one variance differs.}$
| Statistics | P-Value | |
|---|---|---|
| Breusch-Pagan | 0,0216 | 0,8832 |
Table 23.2.22: Homoscedasticity test
As the p-value of the test is greater than 0.05, we do not reject the hypothesis of equality of variances at the 5% significance level. Therefore, we have a homoscedastic model. Note that the result of the Breusch-Pagan test is in accordance with the graphical analysis.
Next, we analyze the extreme values. To do this, we evaluate the standardized residuals and the studentized residuals.
| Number obs. | Concentration | Waste | Studentized Waste | Standardized waste |
|---|---|---|---|---|
| 1 | 12,1442 | 0,0141 | 2,0742 | 1,8523 |
| 2 | 12,1385 | -0,0012 | -0,1509 | -0,157 |
| 3 | 12,1442 | -0,0076 | -0,9953 | -0,9957 |
| 4 | 13,6644 | 0,0033 | 0,3898 | 0,4031 |
| 5 | 13,6606 | -0,0076 | -0,9376 | -0,9419 |
| 6 | 13,6526 | -0,0048 | -0,5742 | -0,5896 |
| 7 | 15,1759 | 0,0008 | 0,098 | 0,1019 |
| 8 | 15,1683 | 0,0019 | 0,2217 | 0,2303 |
| 9 | 15,1835 | 0,0082 | 0,9941 | 0,9945 |
| 10 | 16,6912 | 0,0083 | 1,0286 | 1,0263 |
| 11 | 16,684 | -0,01 | -1,2717 | -1,2426 |
| 12 | 16,6859 | -0,014 | -1,8991 | -1,7332 |
| 13 | 18,2019 | -0,0014 | -0,1818 | -0,189 |
| 14 | 18,1996 | -0,0022 | -0,2762 | -0,2866 |
| 15 | 18,1909 | 0,0122 | 1,7243 | 1,6067 |
Table 23.2.23: Summary of waste analysis
As a criterion for analysis, extreme values in the response will be considered observations with studentized and/or standardized residuals greater than 3, in module.
Figure 23.2.14: Standardized Waste
Figure 23.2.15: Studentized Residues
Observing the table above and the graphs of standardized residuals vs adjusted values and studentized residuals vs adjusted values, we note that there are no studentized and standardized residuals with values greater than three, in module, so we do not have extreme values.
Next, we analyze the influential points using DFFITS, DFBETA and Cook’s distance measurements. The criteria for analyzing influential points are given by:
| Diagnosis | Formula | Value |
|---|---|---|
| DFFITS | $ 2 \sqrt{(p+1)/n} $ | 0,73 |
| DCOOK | $ 4/n $ | 0,2667 |
| DFBETA | $ 2/\sqrt{n} $ | 0,52 |
Table 23.2.24: criteria for influential points
Figure 23.2.16: Analysis of leverage points
Figure 23.2.17: Influential points (DFFITS)
| Observations | DFFITS | Criterion |
|---|---|---|
| 1 | 1,04 | $ \pm $ 0,73 |
| 15 | 0,86 | $ \pm $ 0,73 |
Table 23.2.25: Influential points (DFFITS)
Figure 23.2.18: Influential points (Dcook)
| Observations | DCOOK | Criterion |
|---|---|---|
| 1 | 0,429 | 0,2667 |
| 15 | 0,3211 | 0,2667 |
Table 23.2.26: Influential points (Dcook)
Figure 23.2.19: Influential points - Concentration
| Observations | DFBETA | Criterion |
|---|---|---|
| 1 | -0,847 | 0,5164 |
| 15 | 0,7015 | 0,5164 |
Table 23.2.27: Influential points - Concentration
Based on the criteria established by the measurements and the observation of the DFFITS, D-COOK and DFBETA graphs, we see that observations 1 and 15 are influential points.
Next, we analyze the independence of observations.
Figure 23.2.20: Residue vs. graph Collection order
Observing the graph above, we notice that there is no apparent trend in the points, that is, we do not have sequences of decreasing or increasing points. Therefore, we have evidence that there is no dependence on observations. To validate this suspicion we will apply the Durbin-Watson test. The test hypotheses are:
$\begin{cases} H_1: \ \hbox{Observations are independent.} \cr H_1: \ \hbox{Observations are not independent.}$
| Statistics | P-Value | |
|---|---|---|
| Durbin-Watson | 1,3885 | 0,0577 |
Table 23.2.28: Independence test
Applying the test, we obtain a p-value of 0.0577. As the p-value is greater than 0.05, we do not reject the hypothesis of independence of observations at a significance level of 5%.
Therefore, the RDC 166 criteria that were met are:
- Significant angular coefficient at the 5% significance level;
- R = 0.9999: Correction coefficient greater than 0.990;
- Homoscedastic model;
- Normality of experimental errors;
- Independence of observations.
However, the criterion regarding the intercept was not met, as it proved to be significant at the 5% significance level. It is interesting to highlight that the impact was, for the lowest concentration points, greater than 2%, a value defined as the maximum acceptable. Therefore, the impact should be investigated if a single point is used.
Chromatograph Linearity Example: Heteroscedastic
Below, we present the collected data.
| Concentration | Area |
|---|---|
| 1,998 | 91287,2967 |
| 1,998 | 92634,5279 |
| 1,998 | 87717,324 |
| 3,9959 | 181620,124 |
| 3,9959 | 183739,1996 |
| 3,9959 | 175633,4481 |
| 5,9939 | 288422,6727 |
| 5,9939 | 276836,9997 |
| 5,9939 | 271491,458 |
| 7,9918 | 371431,3043 |
| 7,9918 | 378810,2832 |
| 7,9918 | 361987,7019 |
| 8,9908 | 445930,366 |
| 8,9908 | 425366,3293 |
| 8,9908 | 440825,634 |
| 9,9898 | 470969,3284 |
| 9,9898 | 453986,2756 |
| 9,9898 | 592596,0537 |
| 10,9887 | 543081,3348 |
| 10,9887 | 480101,757 |
| 10,9887 | 529028,7698 |
| 11,9877 | 602909,3744 |
| 11,9877 | 523645,5587 |
| 11,9877 | 586988,7449 |
Before starting the study of the Linearity parameter, it is interesting to highlight that the data come from diluted solutions of the same mother solution, so we have “quasi-replicas”, that is, for each concentration point a weighing took place, so the experiments were carried out independently. That said, we begin the study of linearity. In this example we use the following notation:
- X: Concentration
- Y: Area
Using the ordinary least squares method, we estimate the model parameters, but to estimate the parameters we need the following quantities:
- $ \bar{X} $ = 7,742075
- $ \bar{Y} $ = 331960,1
- $ S_{xx} $ = 2559726
- $ S_{yy} $ = 785903657767
- $ S_{xy} $ = 11190952
In the table below we present the estimates, standard deviation and the hypothesis test for the intercept and angular coefficient.
| Estimate | Standard Deviation | Stat.t | P-Value | Lower limit | Upper limit | |
|---|---|---|---|---|---|---|
| Intercept | -9442,9682 | 10136,1715 | -0,9316 | 0,3616 | -30464,1012 | 11578,1649 |
| Concentration | 48402,5767 | 1206,3004 | 40,1248 | 0 | 45900,8629 | 50904,2906 |
Therefore, the adjusted model is:
Area = -9442.9682 + 48402.5767 * Concentration
Using the table above, in addition to the calculated estimates, we can evaluate the significance of the parameters using the T test, as seen in example 1.1.2.1.
Regarding the intercept parameter, the hypotheses are:
$ H_{0} $ : Intercept equals zero.
$ H_{1} $ : Intercept is non-zero.
The quantile of the T distribution to obtain the critical region is given by $ t_{(0,95, 22)} = \ 1,717144 $. As the p-value associated with the test, $ \text{P-valor} = 2 P( t_{(0,95, 22)} > | \text{t} | ) = \ 0,3616 \ $, is greater than 0.05, we do not reject $ H_0 $ and we conclude that the intercept is equal to zero at the 5% significance level.
Regarding the angular coefficient, the hypotheses are:
$ H_{0} $ : Angular coefficient is equal to zero.
$ H_{1} $ : Angular coefficient is non-zero.
The quantile of the T distribution to obtain the critical region is given by $ t_{(0,95, 22)} = \ 1,717144 $. As the p-value associated with the test, $ \text{P-valor} = 2 P( t_{(0,95, 22)} > | \text{t} | ) = \ 0 \ $, is less than 0.05, we reject $ H_0 $ and we conclude that the angular coefficient is different from zero at the 5% significance level.
We also evaluated the significance of the parameters using the ANOVA F test. Note that we have a simple regression model, so, as previously stated, the ANOVA F test is equivalent to the T test.
Next, we tested the significance of the model parameters.
ANOVA table
| Factors | Degrees of freedom | Sum of squares | Medium square | Stat. F | P-Value |
|---|---|---|---|---|---|
| Concentration | 1 | 599694955424,175 | 599694955424,175 | 1610,0007 | 0 |
| Waste | 22 | 8194586069,4757 | 372481184,9762 | ||
| Total | 23 | 607889541494 |
To test the angular coefficient of the model we use the ANOVA F test, in this case we test the hypotheses:
$ H_{0} $ : Angular coefficient is equal to zero.
$ H_{1} $ : Angular coefficient is non-zero.
The critical region for the F test is given by $ F_{(0,95, 1, 22)} = 4,30095 $. As the statistic observed $ \ | \text{F} | > \ \text{4,30095} $ is greater than the quantile of the distribution for determining the critical region, that is, the observed statistic belongs to the critical region, and the p-value associated with the test $ \text{P-valor} = 2 P( F_{(0,95, 1, 22)} > | \text{F} | ) = 0 $, we reject the null hypothesis at the 5% significance level.
The following table presents the exploratory analysis of waste.
| Minimum | 1Q | Median | Average | 3Q | Maximum |
|---|---|---|---|---|---|
| -47150 | -7739 | 111,1 | 0 | 13250 | 32120 |
Observing the table above, we note that the minimum and maximum values, in module, present a notable difference, as do the median and mean values, which gives evidence that the distribution of residuals is asymmetric.
In addition to testing the hypothesis for the linear coefficient, we also evaluate its impact on the analytical response. The impact is given in the following table.
| Concentration | Area | Impact of linear coefficient (%) |
|---|---|---|
| 1,998 | 91287,2967 | 10,3442 |
| 1,998 | 92634,5279 | 10,1938 |
| 1,998 | 87717,324 | 10,7652 |
| 3,9959 | 181620,124 | 5,1993 |
| 3,9959 | 183739,1996 | 5,1393 |
| 3,9959 | 175633,4481 | 5,3765 |
| 5,9939 | 288422,6727 | 3,274 |
| 5,9939 | 276836,9997 | 3,411 |
| 5,9939 | 271491,458 | 3,4782 |
| 7,9918 | 371431,3043 | 2,5423 |
| 7,9918 | 378810,2832 | 2,4928 |
| 7,9918 | 361987,7019 | 2,6086 |
| 8,9908 | 445930,366 | 2,1176 |
| 8,9908 | 425366,3293 | 2,22 |
| 8,9908 | 440825,634 | 2,1421 |
| 9,9898 | 470969,3284 | 2,005 |
| 9,9898 | 453986,2756 | 2,08 |
| 9,9898 | 592596,0537 | 1,8788 |
| 10,9887 | 543081,3348 | 1,7388 |
| 10,9887 | 480101,757 | 1,9669 |
| 10,9887 | 529028,7698 | 1,785 |
| 11,9877 | 602909,3744 | 1,5662 |
| 11,9877 | 523645,5587 | 1,8033 |
| 11,9877 | 586988,7449 | 1,6087 |
Note that we have impacts greater than 2% at concentration levels from 1.998 to 9.9898. Therefore, the ideal would be to quantify the results of the routine with a calibration curve, but if a single point is used, it will be necessary to investigate the impact. Furthermore, the impact result does not conform to the intercept test result.
Next, we analyze the Pearson correlation coefficient.
| Standard deviation of residuals | Degrees of freedom | $ R^2 $ | Correlation coefficient |
|---|---|---|---|
| 19299,7716 | 22 | 0,9865 | 0,9932 |
Like the correlation coefficient, $ r = 0,9932 $, is above the value specified 0.9900 by the regulatory agency, we conclude that there is an adequate linear relationship. As stated in the previous example, the coefficient of determination represents the signal/noise ratio.
(image missing)
Observing the graph above, we notice that the points follow the adjusted straight line. However, we observed a low difference between the response variable and the adjusted line. We have that the magnitude of the area scale (y axis) is extremely low compared to the concentration scale (x axis).
Next, we analyze the assumptions made about the experimental errors, using the 4 in 1 graph, given below.
(image missing)
Observing the graph of standardized residuals vs adjusted values, we notice that there are no points with a high residual value, so we do not have possible outliers. However, we observed that their arrangement is in the shape of a funnel.
Observing the QQPlot we notice that some points are far from the dotted line - in blue -, and that points 28 and 20 are outside the confidence band. Therefore, we have evidence that the assumption of normality of experimental errors is not satisfied.
Observing the plot of residuals
Observing the waste x collection order graph, we notice that the points show a trend, as the collection order grows, the waste also grows. Therefore, we have evidence that experimental errors are dependent.
To validate our suspicions based on graphical analysis, we will verify the hypotheses raised through statistical tests.
Next, we analyze the normality of experimental errors, in which the hypotheses are:
$ H_{0} $ : The distribution of experimental errors is normal.
$ H_{1} $ : The distribution of experimental errors is not normal.
| Test | Statistics | P-Value |
|---|---|---|
| Anderson-darling | 0,5552 | 0,1357 |
| Kolmogorov-Smirnov | 0,1466 | 0,2010 |
| Ryan-Joiner | 0,9652 | 0,0976 |
| Shapiro-Wilk | 0,9363 | 0,1246 |
Here we adopted the Shapiro-Wilk test to assess normality. As the p-value of the Shapiro-Wilk test, p-value 0.1246, is greater than 0.05, we do not reject the hypothesis of normality of experimental errors at the 5% significance level.
Next, we analyzed homoscedasticity using the Breusch-Pagan test. As previously stated, the Breusch-Pagan test is the one that best suits the objective of the test. The hypotheses are:
$ H_{0} $ : The variances are equal.
$ H_{1} $ : At least one variance differs.
| Statistics | P-Value |
|---|---|
| 7.5689 | 0,0059 |
As the p-value of the test is less than 0.05, we reject the hypothesis of equality of variances at the 5% significance level. Therefore, we have a heteroscedastic model. Note that the result of the Breusch-Pagan test is in accordance with the graphical analysis.
RDC 166 defines the criterion that the model is homoscedastic. The example does not meet this criterion, since we have a heteroscedastic model, so we must look for ways to deal with this criterion. We will then apply the weighted least squares method
The idea of the weighted least squares method is to transform the observations, so that we can apply the regression model. We must look for a transformation that best fits the data, that is, the best weighting is the one that results in lower residual values, in module.
Below we present the weighting factors that will be applied:
- $ w_{1} = \frac{1}{x} $
- $ w_{2} = \frac{1}{x^2} $
- $ w_{3} = \frac{1}{y} $
- $ w_{4} = \frac{1}{y^2} $
- $ w_{5} = \frac{1}{s_{i}^{2}} $
- $ w_{6} =\frac{\frac{1}{s_{i}^{2}}}{\sum_{i = 1}^{k} \frac{1}{s_{i}^{2}}} \times k $
In which $ x_i $ represents the concentration at the ith point, $ y_i $ represents the area at the ith point and $ s_i $ represents the variance at the ith point.
Next, we present the residuals, considering the ordinary least squares method, MMQO, and the weighted least squares method for each weighting factor, $ w_i, i $ = 1 to 6.
| MMQO | $ w_1 $ | $ w_2 $ | $ w_3 $ | $ w_4 $ | $ w_5 $ | $ w_6 $ |
|---|---|---|---|---|---|---|
| 021,916568 | 1978,418146 | 896,8962031 | 8,861215302 | 0,019320913 | 0,784587699 | 4431,821069 |
| 5369,147768 | 2931,531139 | 1571,186093 | 13,22299396 | 0,033583429 | 1,3147949 | 7426,748781 |
| 451,9438684 | -547,1968823 | -889,87692 | -3,014014208 | -0,020591358 | -0,620386615 | -3504,315037 |
| -2348,764198 | -1574,783806 | -899,7617689 | -6,988747808 | -0,017289498 | -0,728224927 | -4113,450386 |
| -229,688598 | -514,7025747 | -369,4492986 | -2,004704865 | -0,005557035 | -0,22414483 | -1266,104197 |
| -8335,440098 | -4569,657022 | -2397,966404 | -21,39192179 | -0,051965026 | -2,152319551 | -12157,58945 |
| 7745,436178 | 3011,337557 | 1248,30505 | 14,58119628 | 0,029196592 | 0,964589247 | 5448,577581 |
| -3840,236822 | -1720,899804 | -684,6055754 | -7,136406717 | -0,011431687 | -0,373999535 | -2112,573292 |
| -9185,778522 | -3904,318252 | -1576,435886 | -17,46552385 | -0,03134631 | -0,991614252 | -5601,23099 |
| -5949,440289 | -2085,678417 | -654,3377868 | -8,448680105 | -0,010249839 | -0,477977394 | -2699,90249 |
| 1429,538611 | 524,5226631 | 268,9809774 | 3,623079017 | 0,009429173 | 0,397099261 | 2243,054372 |
| -15393,04269 | -5426,208526 | -1835,99929 | -24,25424084 | -0,036605425 | -1,597898741 | -9025,88877 |
| 20195,44725 | 6824,103277 | 2381,015869 | 31,97659334 | 0,051737262 | 2,126723572 | 12013,00803 |
| -368,5894507 | -34,0818136 | 93,78484366 | 1,210207154 | 0,005894165 | 0,206231567 | 1164,919365 |
| 15090,71525 | 5121,655582 | 1813,243034 | 24,47274091 | 0,040756441 | 1,649988526 | 9320,123061 |
| -3119,764513 | -835,345526 | -141,7733719 | -2,337800231 | 0,001039227 | 0,004661142 | 26,3289223 |
| -20102,81731 | -6208,599432 | -1841,812692 | -27,5865725 | -0,036330633 | -0,683754478 | -3862,254662 |
| 28506,96079 | 9171,007704 | 3024,128378 | 42,34823039 | 0,06390056 | 1,286664558 | 7267,851767 |
| 20642,90798 | 6436,209706 | 2078,318846 | 30,55304825 | 0,04600689 | 0,74215206 | 4192,119173 |
| -42336,66982 | -12562,60847 | -3652,984929 | -58,39827259 | -0,079137587 | -1,162860295 | -6568,531168 |
| 6590,342983 | 2197,023979 | 799,4992407 | 11,63578521 | 0,020666018 | 0,317088716 | 1791,106914 |
| 32116,77342 | 9537,667475 | 2903,273722 | 44,23486888 | 0,061688854 | 0,874494623 | 4939,6692 |
| -47147,04228 | -13355,56098 | -3708,82165 | -62,07100182 | -0,080342565 | -1,015905069 | -5738,440063 |
| 16196,14392 | 4939,420406 | 1575,193315 | 24,050746 | 0,036239466 | 0,494796108 | 2794,904659 |
Below, we present the graph of the residuals of the ordinary least squares method and the graphs for each weighting factor of the ordinary least squares method.
(image missing)
(image missing)
Observing the table and graphs given above, we have that the weight $ w_4 $ presents the lowest residue values. We will then apply the weighted least squares method considering this weighting factor.
Below, we present the estimates for the model parameters:
| Estimate | Standard Deviation | Stat.t | P-Value | Lower limit | Upper limit | |
|---|---|---|---|---|---|---|
| Intercept | -5717,9259 | 2964,786 | -1,9286 | 0,0668 | -11866,5157 | 430,6638 |
| Concentration | 47668,4028 | 673,6381 | 70,7626 | 0 | 46271,3629 | 49065,4427 |
Therefore, the adjusted model is:
Area = -5717.9259 + 47668.4028 * Concentration
Next, we evaluate the significance of the parameters using the T test. Regarding the intercept parameter, the hypotheses are:
$ H_{0} $ : Intercept equals zero.
$ H_{1} $ : Intercept is non-zero.
The quantile of the T distribution to obtain the critical region is given by $ t_{(0,95, 22)} = \ 1,717144 $. As the p-value associated with the test, $ \text{P-valor} = 2 P( t_{(0,95, 22)} > | \text{t} | ) = 0,0668 $, is greater than 0.05, we do not reject $ H_0 $ and we conclude that the intercept is equal to zero at the 5% significance level.
Regarding the angular coefficient, the hypotheses are:
$ H_{0} $ : Angular coefficient is equal to zero.
$ H_{1} $ : Angular coefficient is non-zero.
The quantile of the T distribution to obtain the critical region is given by $ t_{(0,95, 22)} = \ 1,717144 $. As the p-value associated with the test, $ \text{P-valor} = 2 P( t_{(0,95, 22)} > | \text{t} | ) = \ 0 \ $, is less than 0.05, we reject $ H_0 $ and we conclude that the angular coefficient is different from zero at the 5% significance level.
We also evaluated the significance of the parameters using the ANOVA F test.
ANOVA table
| Factors | Degrees of freedom | Sum of squares | Medium square | Stat. F | P-Value |
|---|---|---|---|---|---|
| Concentration | 1 | 8,7884 | 8,7884 | 5007,3499 | 0 |
| Waste | 22 | 0,0386 | 0,0018 | ||
| Total | 23 | 8,8270 |
To test the angular coefficient of the model we use the ANOVA F test, in this case we test the hypotheses:
$ H_{0} $ : Angular coefficient is equal to zero.
$ H_{1} $ : Angular coefficient is non-zero.
The critical region for the F test is given by $ F_{(0,95, 1, 22)} = 4,30095 $. As the statistic observed $ \ | \text{F} | > \ \text{4,30095} $ is greater than the quantile of the distribution for determining the critical region, that is, the observed statistic belongs to the critical region, and the p-value associated with the test $ \text{P-valor} = 2 P( F_{(0,95, 1, 22)} > | \text{F} | ) = 0 $, we reject the null hypothesis at the 5% significance level.
The following table presents the exploratory analysis of waste.
| Minimum | 1Q | Median | Average | 3Q | Maximum |
|---|---|---|---|---|---|
| -0,0803 | -0,0287 | 0,0035 | 0,0016 | 0,0356 | 0,0639 |
Observing the table above, we note that the minimum and maximum values, in module, are similar, as are the median and mean values, which gives evidence that the distribution of residues is symmetrical.
In addition to testing the hypothesis for the linear coefficient, we also evaluate its impact on the analytical response. The impact is given in the following table.
| Concentration | Area | Impact of linear coefficient (%) |
|---|---|---|
| 1,998 | 91287,2967 | 6,2637 |
| 1,998 | 92634,5279 | 6,1726 |
| 1,998 | 87717,324 | 6,5186 |
| 3,9959 | 181620,124 | 3,1483 |
| 3,9959 | 183739,1996 | 3,112 |
| 3,9959 | 175633,4481 | 3,2556 |
| 5,9939 | 288422,6727 | 1,9825 |
| 5,9939 | 276836,9997 | 2,0654 |
| 5,9939 | 271491,458 | 2,1061 |
| 7,9918 | 371431,3043 | 1,5394 |
| 7,9918 | 378810,2832 | 1,5094 |
| 7,9918 | 361987,7019 | 1,5796 |
| 8,9908 | 445930,366 | 1,2822 |
| 8,9908 | 425366,3293 | 1,3442 |
| 8,9908 | 440825,634 | 1,2971 |
| 9,9898 | 470969,3284 | 1,2141 |
| 9,9898 | 453986,2756 | 1,2595 |
| 9,9898 | 592596,0537 | 1,1377 |
| 10,9887 | 543081,3348 | 1,0529 |
| 10,9887 | 480101,757 | 1,191 |
| 10,9887 | 529028,7698 | 1,0808 |
| 11,9877 | 602909,3744 | 0,9484 |
| 11,9877 | 523645,5587 | 1,0919 |
| 11,9877 | 586988,7449 | 0,9741 |
In comparison to the impact of the ordinary least squares model, levels 1.998, 3.9959 and 5.9939 maintained an impact greater than the maximum acceptable, 2%. However, as previously stated, the ideal would be to quantify the routine results in a calibration curve, but if a single point is used, it will be necessary to investigate the impact. Note that we have three levels that do not conform to the intercept test result.
Next, we analyze the Pearson correlation coefficient.
| Standard deviation of residuals | Degrees of freedom | $ R^2 $ | Correlation coefficient |
|---|---|---|---|
| 0,419 | 22 | 0,9956 | 0,9978 |
Like the correlation coefficient, $ r = 0,9978 $, is above the value specified by the regulatory agency, we conclude that there is an adequate linear relationship.
(image missing)
Observing the graph above, we notice that the points follow the adjusted straight line. However, we observed a difference between the response variable and the adjusted line. It is worth mentioning that the magnitude of the area scale (y-axis) is extremely low compared to the concentration scale (x-axis).
Next, we analyze the assumptions made about the experimental errors, using the 4 in 1 graph, given below.
(image missing)
Observing the graph of standardized residuals vs adjusted values, we notice that there are no points with a high residual value, so we do not have possible outliers. However, we observed that their arrangement is in the shape of a funnel.
Observing the QQPlot we notice that the points approach the dotted line - in blue -, and that these are contained in the confidence band. Therefore, we have evidence that the assumption of normality of experimental errors is satisfied.
Observing the plot of residuals
Observing the graph of residues x order of collection, we notice that the points do not present a trend, that is, they seem to be distributed randomly. Therefore, we have evidence that the experimental errors are independent.
To validate our suspicions based on graphical analysis, we will verify the hypotheses raised through statistical tests.
Next, we analyze the normality of experimental errors, in which the hypotheses are:
$ H_{0} $ : The distribution of experimental errors is normal.
$ H_{1} $ : The distribution of experimental errors is not normal.
| Test | Statistics | P-Value |
|---|---|---|
| Anderson-darling | 0,2098 | 0,8429 |
| Kolmogorov-Smirnov | 0,0840 | 0,9321 |
| Ryan-Joiner | 0,9876 | 0,7059 |
| Shapiro-Wilk | 0,9650 | 0,5476 |
Here we adopted the Shapiro-Wilk test to assess normality. As the p-value of the Shapiro-Wilk test, p-value 0.5476, is greater than 0.05, we do not reject the hypothesis of normality of experimental errors at the 5% significance level.
Next, we analyzed homoscedasticity using the Breusch-Pagan test. The hypotheses are:
$ H_{0} $ : The variances are equal.
$ H_{1} $ : At least one variance differs.
| Statistics | P-Value |
|---|---|
| 3,6845 | 0,0549 |
As the p-value of the test is greater than 0.05, we do not reject the hypothesis of equality of variances at the 5% significance level. Therefore, we have a homoscedastic model.
Next, we analyze the extreme values. To do this, we evaluate the standardized residuals and the studentized residuals.
| Number obs. | Concentration | Weights | Waste | Studentized Waste | Standardized Waste |
|---|---|---|---|---|---|
| 1 | 1,998 | 1.1999E-10 | 0,0193 | 0,5366 | 0,5455 |
| 2 | 1,998 | 1.16534E-10 | 0,9403 | 0,9403 | 0,9428 |
| 3 | 1,998 | 1.29966E-10 | -0,0206 | -0,5823 | -0,5913 |
| 4 | 3,9959 | 3.0316E-11 | -0,0173 | -0,4165 | -0,4245 |
| 5 | 3,9959 | 2.96208E-11 | -0,0056 | -0,1333 | -0,1364 |
| 6 | 3,9959 | 3.24179E-11 | -0,052 | -1,2982 | -1,2785 |
| 7 | 5,9939 | 1.2021E-11 | 0,0292 | 0,703 | 0,7112 |
| 8 | 5,9939 | 1.30482E-11 | -0,0114 | -0,273 | -0,279 |
| 9 | 5,9939 | 1.35671E-11 | -0,0313 | -0,7582 | -0,7656 |
| 10 | 7,9918 | 7.24841E-12 | -0,0102 | -0,2456 | -0,251 |
| 11 | 7,9918 | 6.96878E-12 | 0,0094 | 0,2256 | 0,2307 |
| 12 | 7,9918 | 7.63154E-12 | -0,0366 | -0,8935 | -0,8976 |
| 13 | 8,9908 | 5.02882E-12 | 0,0517 | 1,2838 | 1,2653 |
| 14 | 8,9908 | 5.5268E-12 | 0,0059 | 0,1413 | 0,1445 |
| 15 | 8,9908 | 5.14596E-12 | 0,0408 | 0,9972 | 0,9973 |
| 16 | 9,9898 | 4.50832E-12 | 0,001 | 0,0249 | 0,0255 |
| 17 | 9,9898 | 4.85193E-12 | -0,0363 | -0,8905 | -0,8948 |
| 18 | 9,9898 | 3.95878E-12 | 0,0639 | 1,6214 | 1,5645 |
| 19 | 10,9887 | 3.39055E-12 | 0,046 | 1,1369 | 1,1294 |
| 20 | 10,9887 | 4.33844E-12 | -0,0791 | -2,1059 | -1,9586 |
| 21 | 10,9887 | 3.57307E-12 | 0,0207 | 0,4994 | 0,5081 |
| 22 | 11,9877 | 2.75103E-12 | 0,0617 | 1,5642 | 1,5152 |
| 23 | 11,9877 | 3.64691E-12 | -0,0803 | -2,1504 | -1,9925 |
| 24 | 11,9877 | 2.90229E-12 | 0,0362 | 0,8872 | 0,8915 |
As a criterion for analysis, extreme values in the response will be considered observations with studentized and/or standardized residuals greater than 3, in module.
(image missing)
(image missing)
Observing the table above and the graphs of standardized residuals vs adjusted values and studentized residuals vs adjusted values, we note that there are no studentized and standardized residuals with values greater than three, in module, so we do not have outliers.
Next, we analyze the influential points using DFFITS, DFBETA and Cook’s distance measurements. The criteria for analyzing influential points are given by:
| Diagnosis | Formula | Value |
|---|---|---|
| DFFITS | $ 2 \sqrt{(p+1)/n} $ | 0,58 |
| DCOOK | $ 4/n $ | 0,1667 |
| DFBETA | $ 2/\sqrt{n} $ | 0,4082 |
(image missing)
(image missing)
(image missing)
| Observations | DFFITS | Criterion |
|---|---|---|
| 2 | 0,58 | $ \pm $ 0,58 |
| 23 | -0,61 | $ \pm $ 0,58 |
According to the DFFITS measurement criterion, observations 2 and 23 are influential points.
| Observations | DCOOK | Criterion |
|---|---|---|
| 2 | 0,1703 | 0,1667 |
According to the DCOOK measurement criterion, observation 2 is an influential point.
| Observations | DFBETA | Criterion |
|---|---|---|
| 20 | -0,5443 | 0,4082 |
| 23 | 1,033 | 0,4082 |
According to the DFBETA measurement criterion, observations 20 and 23 are influential points. Based on the criteria established by the measurements and observation of the measurement graphs, observations 2, 20 and 23 are influential points.
Next, we analyze the independence of observations.
(image missing)
Observing the graph above, we notice that there is no apparent trend in the points, that is, we do not have sequences of decreasing or increasing points. Therefore, we have evidence that there is no dependence on observations. To validate this suspicion we will apply the Durbin-Watson test. The test hypotheses are:
$ H_{0} $ : Observations are independent.
$ H_{1} $ : Observations are not independent.
| Statistics | P-Value |
|---|---|
| 11,7043 | 0,0006 |
Applying the test, we obtain a p-value of 0.0006. As the p-value is less than 0.05, we reject the hypothesis of independence of observations at a significance level of 5%. The rejection of the independence hypothesis occurs because the solutions were diluted from the same mother solution.
Finally, we evaluate the fit of the model, for this we test the lack of fit. In which the hypotheses are:
$ H_{0} $ : The model is well adjusted.
$ H_{1} $ : The model is not well adjusted.
| Degrees of freedom | Sum of Squares | Medium Square | Stat. F | P-Value | |
|---|---|---|---|---|---|
| Concentration | 1 | 8,7884 | 8,7884 | 4351,9734 | 0 |
| Waste | 22 | 0,0386 | 0,0018 | ||
| Lack of adjustment | 6 | 0,0063 | 0,0011 | 0,5201 | 0,7848 |
| Pure error | 16 | 0,0323 | 0,002 |
From the table above, we have that the p-value for lack of adjustment was 0.7848, a value greater than 0.05. So we don’t reject $ H_0 $ and therefore the model is adequate and the linearity of the model is validated at the 5% level of significance.
Therefore, the DRC criteria that were met are:
- Significant angular coefficient at the 5% significance level;
- Non-significant linear coefficient at the 5% significance level;
- Correlation coefficient greater than 0.9900;
- Model homoscedasticity;
- Normality of experimental errors.
However, we have dependent observations, so we must analyze the cause of the dependence of the observations. Note that the concentrations come from the same mother solution, that is, the solutions are diluted from a single mother solution, so we must analyze whether this influenced the dependence of the observations.