Skip to main content
Chemistry LibreTexts

11.4: Multivariate Linear Regression

  • Page ID
    329316
  • In Chapter 11.2 we used a cluster analysis of the spectra for 24 samples measured at 16 wavelengths to show that we could divide the samples into three distinct groups, speculating that the samples contained three analytes and that in each group one of the analytes was present at a concentration greater than that of the other two analytes. In Chapter 11.3 we used a principal component analysis of the same set of samples to suggest that the three analytes are Cu2+, Cr3+, and Co2+. In this section we will use a multivariate linear regression analysis to determine the concentration of these analytes in each of the 24 samples.

    How Does a Calibration Using Multivariate Regression Work?

    In a simple linear regression analysis, as outlined in Chapter 8, we model the relationship between a single dependent variable, y, and a single dependent variable, x, using the equation

    \[y = \beta_0 + \beta_1 x \nonumber \]

    where y is a vector of measured responses for the dependent variable, where x is a vector of values for the independent variable, where \(\beta_0\) is the expected y-intercept, and where \(\beta_1\) is the expected slope. For example, to complete a Beer's law calibration curve for a single analyte, where A is the absorbance and C is the analyte's concentration

    \[ A = \epsilon b C \nonumber \]

    we prepare a set of n standard solutions, each with a known concentration of the analyte and measure the absorbance for each of the standard solutions at a single wavelength. A linear regression analysis returns values for \(\epsilon b\), allowing us to determine the concentration of analyte in a sample by measuring its absorbance. See Chapter 8 for a review of how to complete a linear regression analysis using R.

    In a multivariate linear regression we have j dependent variables, Y, and k independent variables, X, and we measure the dependent variable for each of the n values for the independent variables; we can represent this using matrix notation as

    \[ [ Y ]_{n \times j} = [X]_{n \times k} \times [\beta_1]_{k \times j} \nonumber \]

    In this case, to complete a Beer's law calibration curve we prepare a set of n standard solutions, each of which contains known concentrations of the k analytes, and measure the absorbance of each standard at each of the j wavelengths

    \[ [ A ]_{n \times j} = [C]_{n \times k} \times [\epsilon b]_{k \times j} \nonumber \]

    where [A] is a matrix of absorbance values, [C] is a matrix of concentrations, and [\(\epsilon b\)] is a matrix of \(\epsilon b\) values for each analyte at each wavelength.

    Because matrix algebra does not allow for division, we solve for [\(\epsilon b\)] by first pre-multiplying both sides of the equation by the transpose of the matrix of concentrations

    \[ [C]_{k \times n}^{\text{T}} \times [ A ]_{n \times j} = [C]_{k \times n}^{\text{T}} \times [C]_{n \times k} \times [\epsilon b]_{k \times j} \nonumber \]

    and then pre-multiplying both sides of the equation by \( \left( [C]_{k \times n}^{\text{T}} \times [C]_{n \times k} \right)^{-1} \) to give

    \[ \left( [C]_{k \times n}^{\text{T}} \times [C]_{n \times k} \right)^{-1} \times [C]_{k \times n}^{\text{T}} \times [ A ]_{n \times j} = \left( [C]_{k \times n}^{\text{T}} \times [C]_{n \times k} \right)^{-1} \times [C]_{k \times n}^{\text{T}} \times [C]_{n \times k} \times [\epsilon b]_{k \times j} \nonumber \]

    Multiplying \(\left( [C]_{k \times n}^{\text{T}} \times [C]_{n \times k} \right)^{-1}\) by \(\left( [C]_{k \times n}^{\text{T}} \times [C]_{n \times k} \right)\) is equivalent to multiplying a value by its inverse, which is equal to 1; thus, we have

    \[ \left( [C]_{k \times n}^{\text{T}} \times [C]_{n \times k} \right)^{-1} \times [C]_{k \times n}^{\text{T}} \times [ A ]_{n \times j} = [\epsilon b]_{k \times j} \nonumber \]

    With the \(\epsilon b\) matrix in hand, we can determine the concentration of the analytes in a set of samples using the same general approach, as shown here

    \[ [ A ]_{n \times j} = [C]_{n \times k} \times [\epsilon b]_{k \times j} \nonumber \]

    \[ [ A ]_{n \times j} \times [\epsilon b]_{j \times k}^{\text{T}} = [C]_{n \times k} \times [\epsilon b]_{k \times j} \times [\epsilon b]_{j \times k}^{\text{T}} \nonumber \]

    \[ [ A ]_{n \times j} \times [\epsilon b]_{j \times k}^{\text{T}} \times \left( [\epsilon b]_{k \times j} \times [\epsilon b]_{j \times k}^{\text{T}} \right)^{-1} = [C]_{n \times k} \times [\epsilon b]_{k \times j} \times [\epsilon b]_{j \times k}^{\text{T}} \times \left( [\epsilon b]_{k \times j} \times [\epsilon b]_{j \times k}^{\text{T}} \right)^{-1} \nonumber \]

    \[ [ A ]_{n \times j} \times [\epsilon b]_{j \times k}^{\text{T}} \times \left( [\epsilon b]_{k \times j} \times [\epsilon b]_{j \times k}^{\text{T}} \right)^{-1} = [C]_{n \times k} \nonumber \]

    Note

    Completing these calculations by hand is a chore; see Chapter 11.7 to see how you can complete a multivariate linear regression using R.

    How Do We Evaluate the Results of a Calibration Using a Multivariate Linear Regression?

    One way to evaluate the results of a calibration based on a multivariate linear regression is to use it to examine the values for each analyte's \(\epsilon b\) values from the calibration and compare them to the spectra of the individual analytes; the shape of the two plots should be similar. Another way to evaluate a calibration based on a multivariate regression calibration is to use it to analyze a set of samples with known concentrations of the analytes.

    • Was this article helpful?