Journal of Data Science 7(2009), 61-72 Approximate Graphical Methods for Inverse Regression

Graphical procedures can be useful for illustrating and evaluating the process of inverse regression. We first review some simple and well-known graphical approaches for univariate linear and nonlinear models. We then propose a new graphical tool applicable to situations where the response is bivariate and repeated measures data are available. The proposed method is illustrated with an example of the age determination of tern chicks using measurements on body weight and wing length.


Introduction
In inverse regression, or statistical calibration, the relationship between a response Y and a covariate x is first estimated using a set of training data (x 1 , Y 1 ), . . .(x n , Y n ).This relationship is then used to infer the covariate value x 0 corresponding to an observed response Y 0 .A comprehensive summary of the theory is given by Brown (1993).
Our interest here is in approximate graphical methods for estimating the unknown x 0 once the relationship between Y and x has been established.It is sometimes the case that a quick approximate answer is all that is required, so that a method which involves merely referring to a graph without the need for computing equipment has much to recommend it, particularly when many estimates are needed in a field situation.Moreover graphical methods can give insights into the nature and reliability of the process, since aspects of statistical uncertainty can be incorporated into the graph.
Our aim in this paper is to illustrate the above points with some fairly wellknown approaches, and to introduce a new graphic for inverse regression with bivariate longitudinal data.In the first section we consider inverse regression with a univariate response, focussing on the method of inverting a prediction interval.This is illustrated with some examples chosen to demonstrate the range of applicability of this method.In the next section the case of bivariate Y is considered.The statistical issues here are more complex, and graphical approaches can provide useful insights.In the third section we consider repeated measures data and introduce a new graphic.We discuss some issues in the construction and use of this graph.
Inverse regression estimation will usually involve adding some new lines to a graph developed from the training data.This may require actually drawing the new lines on the graph, but since we are only expecting approximate answers it may be sufficient to add the new lines "in the mind's eye".These may then be imagined to move, giving a dynamic image of the estimation and perhaps insights into its characteristics.This dynamic use of a graph is a key feature of the approach.To aid in illustrating this process, we have created some dynamic images which are available on request from the authors.

Univariate Response
Figure 1 shows a graphical analysis of two simulated calibration data sets from the model where ∼ N (0, σ 2 ).In each case a straight line has been fitted to the six "training data" points by least squares, and 95% and 99% prediction intervals have been added (dashed and dotted lines respectively).Suppose we now observe Y 0 = 6 and want to estimate the corresponding x 0 .By adding a horizontal line to the graph, we can read off the x coordinate where this crosses the line of best fit.This is equivalent to using the estimator It is well-known that a confidence interval for x 0 can be obtained by the process of "inverting a prediction interval" (see for example Carroll and Ruppert, 1988, p56).This is illustrated in both panels of Figure 1, with the 95% confidence limits being given by the points where y = 6 crosses the 95% prediction bands.This gives a simple graphical estimation of the uncertainty in x 0 , but also illustrates some of the theoretical peculiarities in the use of the CLS estimator.In the second panel we can see that a 99% confidence interval for x 0 would have infinite width, since the line y = 6 does not intersect the lower 99% prediction band.The occurrence of this phenomenon is related to the significance of the slope coefficient, which can also be assessed from the graph.If the slope of the regression line is not significantly non-zero then inverse regression seems a dismal prospect.But there will always be some level at which the slope is non-significant.The usually benign assumption of normality leads in this instance to pathological behaviour.This was noted by Hoadley (1970)and resolved using a Bayesian analysis.
Examination of the form of the CLS estimator in equation (2.1) shows that it is related to a Cauchy distribution, being a ratio of normally distributed variables.It does not have a finite mean or variance.This generated considerable controversy in the 1960s, with Krutchkoff (1967) proposing the estimation of x 0 via a regression of x on Y , even for the "controlled calibration" case where the xs in the training data are fixed by design.This can be justified in a Bayesian framework (see Brown, 1993, p98).This graphical method for obtaining estimates and confidence intervals is particularly useful when the relationship between Y and x is nonlinear or when the errors are heteroscedastic, or both.In cases where a transformation produces approximate linearity and homoscedasticity, it may be advantageous to plot the graph using the untransformed variables for ease of use. Figure 2 shows the PCB data from Bates and Watts (1988), giving ages and PCB concentration in lake trout from Cayuga Lake, NY.They point out that log transformation of Concentration and cube-root of Age seems to produce a straight line with constant variance.In Figure 2 the fitted line and 95% prediction bands have been transformed back to the original scales.The prediction bands give a visual summary of how informative the PCB analysis of a sample would be about the age of the fish from which it is taken.Only at very low concentrations can we get a useful upper limit on the age, but for high concentrations we may be able to say something about the lower age limit.It is unlikely, for example, that a sample with a concentration above 20 ppm would have come from a trout below 8 years old.An important principle of the graphical approach is that once the graph has been produced, it is very easy to use, even though a considerable amount of difficulty may lie in its production.Figure 3 is based on the Toluene data from Rocke and Lorenzato (1995) and uses their two-component model for measurement error where Y i is the measured response from a sample with concentration x i of an analyte.It is assumed that in the absence of error Y i would be linearly related to x i .In addition to the usual additive error i , this model postulates an additional error term η i whose effect depends on the concentration level x i as shown in Equation (2.2).This results in a variance function for Y i which increases with x i but does not reduce to zero when x i = 0, thus mimicking the behaviour often observed in analytical measurements.It assumed that both i and η i are normally distributed.One motivation for this model is to assume that random disturbances in the measurement process can be partitioned into those which affect the measurement additively, i , and those which have a multiplicative effect, η i .Further details are given in Rocke and Lorenzato (1995).We focus here on examining the limit of detection of the assay, which measures amounts of toluene by gas chromatography/mass spectrometry (GCMS).The scales of the graph have been restricted to amounts close to zero.Prediction limits could be added using an "exact approximate" method, estimating the parameters by maximum likelihood and using a delta-method approximation.Here we employ instead an "approximate exact" MCMC method suggested by Jones (2004) which accounts properly for the distributions and uncertainty in the estimates, thus giving an accurate picture of the prediction intervals close to zero concentration.
To illustrate the limit of detection, we add a horizontal line at the point where the upper prediction band meets x = 0; this corresponds to a peak area of 28.Any sample having a GCMS peak area above this value would be regarded as positive for toluene.By adding vertical lines we can see that an amount of 11pg would have a 50% chance of being detected, whereas 22pg would have a 95% chance.There are a number of competing definitions and calculations for limits of detection and limits of quantitation (see Cox, 2005).Perhaps the best answer would be the graph itself.

Bivariate Response
In this section we consider bivariate Y = (Y 1 , Y 2 ) and univariate x.An interesting nonlinear example was given by Clarke (1992).Figure 4 plots the lengths of the anterior (Y 1 ) and posterior (Y 2 ) horns of a sample of rhinoceros against their known ages in years.The fitted lines are with a common horizontal asymptote α, the parameter values being those given by Clarke (1992).The graph has been plotted on the original, rather than the log scale, so the variation increases considerably with age.Clarke (1992) discusses computational methods for inferring the unknown age of a further animal, adding (x 0 , Y 0 ) to the training data and estimating all parameters simultaneously by maximum likelihood or generalized least squares.Here we examine approximate graphical methods.Suppose a new rhinoceros presents itself with an anterior horn of 400 mm and posterior horn of 200 mm.Horizontal lines for these two values have been added to the graph in Figure 4. We now try to add a vertical line which intersects the two horizontal ones at values which seem to fit in with the existing data.This suggests an age of around eight years.A more careful consideration might suggest minimizing in some way the vertical distances of the intersection points from the respective curves.Inspection of the scatter of points around the curves suggests that the anterior horn measurement is more variable.The covariance estimate given by Clarke (1992) confirms this, and also suggests that the departures from the two curves are correlated.Both of these facts argue for moving our estimate towards nine or ten years.From a theoretical perspective we are employing a rough conditional least squares procedure.We could add 95% confidence bands and try to develop a confidence interval for x 0 as in the previous section.Perhaps with a little practice one could imagine moving the vertical line until the intersection points no longer seem to fit in with the existing data.
An alternative viewpoint plots the two horn lengths against each other, as in Figure 5, with age as a parameter tracing out the "response path" as it varies.Such plots have been used before, for example Jones and Rocke (2001) who use multiple response paths for different herbicides to identify and quantitate unknown samples with two immunoassays.
4.0 4.5 5.0 5.5 6.0 6.5 3.5 4.0 4.5 5.0 5.5 6.0 6.5 A minor innovation here is that the age values have been added as text along the response path.We are using a log scale for both axes since the model assumes constant error covariance on the log scale; however the spread of points around the response path suggests that the variances are still increasing with age.Our new rhinoceros is plotted as an asterisk at the point (log 400, log 200) in Figure 5.Its age is determined by the point on the response path nearest to this new point, that is we project the observed point onto the response path.The direction of this projection should take account of the error covariance, so we have added to the plot a 95% probability ellipse based on the estimated error covariance matrix.We now imagine this ellipse centered on the new point and expanding or contracting until it just touches the response path, at around nine years, as shown in Figure 5.This is a CLS estimator since the response path is regarded as fixed.In contrast to the univariate case, it does not coincide with MLE because the latter would move the estimated response path nearer to the new point.Note that the 95% ellipse does not yield a satisfactory 95% confidence interval by its intersection with the response path; indeed it is possible that there will be no intersection if the new point is far enough away.This situation is discussed by Brown (1993, p89).In the linear case the departure of a new point from the response path can be resolved into orthogonal components along and perpendicular to the path, and a confidence interval developed by considering only the first component.Perhaps a reasonable graphical technique would be, having determined the point of projection, to center the 95% error ellipse on this point and use its intersection with the response path.This suggests an interval estimate of around 8 to 12 years.Maximum likelihood gives an estimated age of 10.1 years, and a profile-likelihood based confidence interval is approximately (7,14).The extra width of the calculated interval perhaps reflects the uncertainty in the model estimated from quite a small sample.

Repeated Measures
If the training data have a hierarchical structure, for example a series of measurements on each of a number of individuals, the model needs to allow different parameters for each individual to reflect population heterogeneity.Such models are variously known as mixed effects, repeated measures, longitudinal or hierarchical models, and have been widely studied (Laird and Ware, 1982;Diggle, Liang and Zeger, 1994;Goldstein, 1995;Davidian and Giltinan, 1995).In the linear case we might have, for i = 1, . . ., I and j = 1, . . ., n i : 1998) demonstrated the use of MCMC methods for inverse regression in a univariate linear (in parameters) hierarchical model, using as an example the tensile index of paper pulp as a function of beating time.Here we use a bivariate nonlinear example from Jones, Keedwell, Noble and Hedderley (2005).The motivation for this work was to investigate the possibility of accurately determining the age of a tern chick using easily-obtained measurements of wingspan (Y 1 ) and weight (Y 2 ).The model ) for i = 1, . . ., I and j = 1, . . ., n i , was fitted using MCMC with d as a fixed parameter and (α i , β i , b i , c i ) as multivariate normal.We have made some changes to the model of Jones et al (2005), dropping the "slow" group, whose existence was questionable, and assuming a lognormal distribution for the growth rate parameter b i .
Figure 6 shows the response paths for 150 simulated terns from the fitted model.Age has been shown by changing the color of the response path every two days.Inverse regression for tern chicks of unknown age would be accomplished by plotting the wingspan and weight, and referring the local color(s) to the key.The "braiding" of the response paths produces some mixing of colors and gives an impression of the uncertainty due to the variability in growth parameters.Uncertainty due to the error terms 1 , 2 can be incorporated by referring to the error ellipse.(Jones et al., 2005), with color changing every two days.Suppose, using an example from Jones et al (2005), that a new chick is observed with wing length 108 mm and weight 78 g.The color at this point on the graph gives the approximate age of the chick.If an error ellipse is drawn centered at this point, it gives an impression of the uncertainty in the estimate.In our case, the color is mostly that of 19 and 21 days.The Bayesian analysis given by Jones et al (2005) gives a 95% credible interval of (19.7, 21.6).
In constructing such a graph, there are a number of parameters to consider which can have an important bearing on the useability of the result: the number of simulated paths, the thickness of the lines, the rate at which the color changes, and the colors themselves.If the colors change too rapidly (for example, every day in the tern chick graph) there is too much mixing of colors; if they change too slowly, precision is lost.To aid in exploring the effects of these parameters on visualization of the information and in optimizing the design of the graph, we have created some software which can be obtained from the authors on request.The software allows the user to specify the band width -the range of ages represented by a single color on the display.It then calculates the number of colors required (age range/bandwidth), and allocates them to age ranges in hue sequence, with saturation and lightness both alternating between high and low.That is, increasing ages are represented by colors in color-wheel order, but dull, dark colors alternate with light, bright colors.This alternation between high and low values of saturation and lightness ensure that adjacent colors on the graph are clearly distinguishable.

Discussion
We have summarized and illustrated the ways in which graphical methods can aid in visualizing the process of inverse regression, and can be used to derive estimates when only an approximate value is required.Some computational issues have not been carefully addressed.We have focussed mostly on conditional least squares -although the uncertainty in the model estimates is incorporated in the inversion of prediction intervals in our univariate examples, it is not allowed for in the bivariate cases.Generally, as the situation becomes more complex the approximation becomes cruder.In the rhinoceros example it would be much easier and more intuitive to take the point on the response path nearest to the new data.Allowing for the covariance of the errors by using a Mahalonobis distance is more accurate but much more difficult, although the use of an error ellipse makes it possible.In examining the colors inside the error ellipse of the tern chick graph, more weight should be given to points nearer the center of the ellipse, but also to points on response paths closer to the average path.Again this detracts from the intuitive appeal and ease of use of the graphical method.
We have not distinguished here between single use and multiple use of calibration curves.Computational methodologies can be adapted for making joint probability statements about multiple inverse estimates.We have also not considered the case of uncontrolled calibration, where the distribution of x values in the training data is informative about the unknown x 0 .Both of these issues are discussed by Brown (1993).
We have introduced a new graphic for illustrating bivariate growth patterns and performing approximate age estimation.This could easily be extended to situations in which different groups have different growth characteristics, so that discrimination as well as inverse regression would be required.Good design is always important for producing useful graphs, but it is of particular importance in this case.The choice of colors requires a combination of theory (the colorwheel) and trial-and-error if an adequate visualization is to be achieved.Good design can be facilitated by software that allows the parameters to be changed interactively before a final version is printed.

Figure 1 :
Figure1: Inverse regression for Y 0 = 6 from a simple linear model.The dashed and dotted lines are respectively 95% and 99% prediction intervals.In the second panel the 95% confidence interval for x 0 is finite but the 99$ interval is infinite.

Figure 4 :
Figure4: Lengths in mm of the anterior and posterior horns of a sample of 12 rhinocereos, with fitted curves(Clarke, 1992).

Figure 5 :
Figure 5: Bivariate response paths for the Rhino data of Figure 4.

Figure 6 :
Figure6: Response paths for growth in wingspan and weight of tern chicks(Jones et al., 2005), with color changing every two days.
This we could call the Conditional Least Squares (CLS) estimator since it chooses x 0 to minimize the squared error in Y 0 conditional on the estimated values of parameters α, β, σ.It is also the Maximum Likelihood Estimator (MLE), which we can argue as follows.If we add the new point (x 0 , Y 0 ) to the training data, then for any values of the other parameters we can always place this point on the corresponding line, so that its contribution to the log-likelihood is not a function of α, β.Hence these parameters can be chosen based only on the training data, and x, α, β as defined for CLS will jointly maximize the overall likelihood.This argument still applies if there are multiple unknowns x 01 , ..., x 0m , and can be extended to the situation of replicates Y 01 , ..., Y 0r of the same x 0 (seeBrown,  1993 p27), but it will not work for the bivariate response of the next section, or in general if the dimension of Y is greater than the dimension of x.It can also break down in the univariate nonlinear case when there is a horizontal asymptote and the observed Y 0 does not correspond to a fitted value.