Peltier Tech Blog

Excel Chart Add-Ins | Training | Custom Solutions | Charts and Tutorials | PTS Blog

 

Main menu:

 
Peltier Tech
Chart Add-Ins

Peltier Tech Waterfall Chart Utility
Peltier Tech Cluster-Stack Chart Utility
Peltier Tech Box and Whisker Chart Utility
Peltier Tech Marimekko Chart Utility
Peltier Tech Dot Plot Utility
Peltier Tech Cascade Chart Utility

 
Excel Dashboards

Subscribe

Site search

Subscribe

Site search


Recent Posts

Recently Commented

Popular Posts

Archive


 

Categories


 

Privacy Policy

Creative Commons License
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Deming Regression

by Jon Peltier
Monday, October 5th, 2009
Peltier Technical Services, Inc., Copyright © 2010.
Licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.

Linear Regression

People are familiar with a standard linear regression (LR) method that makes assumptions about the X and Y variables in the analysis. Excel’s built-in regression methods make these same assumptions.

The X variable, also called the independent variable, is assumed to be known precisely, and all error in the regression is assumed to be in the measurement of the Y variable, the dependent variable.

This assumption is reasonable enough. But there are cases where errors in the values of X cannot be discounted. For example, X and Y may be comparisons of the output of two different machines for given inputs. When the outputs are compared, both machines are subject to errors in measurement, so the usual assumptions are invalid.

Deming Regression Example

Suppose Machines A and B had the following output. At each nominal output value, the results of two runs of each machine are tabulated. There is some variability in measurements of each machine’s output. The averages of each machine at each nominal output level are shown next to the individual measurements.

Data for Deming Regression

We may be tempted to plot each machine’s outputs as Y values against the nominal X values.

Simple Regression

We may even compute the lines of best fit for the two machines. We can see that they are close, but not exactly the same. The problem with this analysis is that we are not directly regressing one machine against the other.

Simple Regression

In the Deming Regression, outputs of the two machines are plotted against each other. Pairs of actual outputs are measured for each nominal output, and the differences between the two measurements from each machine will be used to estimate the variation of each machine’s outputs. The averages of each pair form the basis of the regression, corrected for the machine variation.

Deming Regression

The table below shows three sets of calculations. The first row shows a standard linear regression of the measured data. The second row shows a standard linear regression performed on the averages of each pair of values. The third shows the Deming regression analysis. Details of the Deming regression calculations are not given here, but a motivated reader can check the links in the references at the end of this article.

Deming Regression Results

The data are not too different, and in fact the correlation in the LR of the average values and of the Deming regression are identical. In the plot below, lines have been added to show the three sets of results in the table above, as well as the 45 degree line, where Machine B = Machine A. The lines are practically on top of each other.

Deming Regression

In the example above, there is little difference in the output of the various LR models. However, if Machines A and B exhibit greater variation in their output, there can be noticeable differences.

Deming Regression

Deming Regression Utility

I’ve created a small utility that facilitates Deming Regression analysis in Excel. Read about it and follow the download link in Deming Regression Utility.

References

Chapter 17:  Creating  Custom  Functions, Excel for Chemists: A Comprehensive Guide, 2nd Edition. by E. Joseph Billo, Copyright 2001 by John Wiley & Sons, Inc.

Incorrect Least-Squares Regression Coefficients in Method-Comparison Analysis by P. Joanne Cornbleet and Nathan Gochman, Clin. Chem. 25/3, 432-438 (1979).

Related Posts:

Bookmark and share this entry:
  • Twitter
  • Digg
  • Facebook
  • LinkedIn
  • del.icio.us
  • Technorati
  • StumbleUpon
  • Google Bookmarks
  • Reddit
  • MySpace
  • Slashdot
  • Yahoo! Buzz
  • Tumblr

Learn how to create Excel dashboards.

Comments


Comment from Jan Karel Pieterse
Time: Monday, October 5, 2009, 6:15 am

Nice post Jon.

As a (former) process engineer I can relate to subjects like this one.
Of course if you’d want to do this research properly (no pun intended), you’d set up an experiment using Design of Experiments, factoring in the machine as a qualitative variable in the design.


Comment from jeff weir
Time: Monday, October 5, 2009, 6:14 pm

Hi Jon. I was initially uncertain how regression analysis would be relevant in your example above of the regression of one machine output on another…I didn’t think there was a dependent variable i.e. how would the output of one machine (your Y value) be dependent on the output of another (your X value) given that these machines are independent from one another.

However, after a bit of internet reading, I see that Deming Regression is often used to evaluate a manufacturer’s claims regarding a product, or to judge acceptability of say different clinical chemistry methods.

You learn something every post, as the saying goes…


Comment from DaleW
Time: Monday, October 5, 2009, 8:40 pm

Hi, Jon. When I used this somewhat more robust linear regression technique it was going by the name of orthogonal regression, which I now see is a superset of two variable linear Deming regression. Your example is a special case where X and Y might be expected to have similar values in the same units, but of course Deming regression can be handy whenever BOTH X and Y are known to have significant measurement error, and we want to estimate the underlying linear relationship.

Anyway, I’d downloaded and modified and stashed away a workbook from 2005 by sj00 that performed this using VBA, but it would trust the coding and documentation of the PTS version much more. Thanks for bringing more numerical methods to Excel!


Comment from Jon Peltier
Time: Monday, October 5, 2009, 9:48 pm

Jeff – I guess the test would be to use machine A as X and machine B as Y and do the analysis, then reverse the machines and repeat it. I actually looked at it as two variables which were dependent on independent variables which are not shown in the analysis (such as inputs into the machines, raw materials, operating conditions).

Dale – Tune in tomorrow. I’ve built a little tool to carry out the analysis more easily.


Comment from DaleW
Time: Tuesday, October 6, 2009, 10:46 pm

Jon – It’s a nice utility. And it would be really cool if it could be generalized to do X v. Y orthogonal regression in the absence of that special replicated pair structure you require for Deming regression now.

From additional reading, the key to this problem seems to be having a decent estimate of the ratio of random error in Y to random error in X. While not elegant, one option is to simply ask the user for his best estimate of the variance ratio of these errors, with a default of 1 (which can sometimes be appropriate when X and Y are the same units — that’s what the other Excel VBA code I mentioned assumes but doesn’t document).

A variance ratio of 0 is the same as reverse OLS regression; a variance ratio approaching infinity is the same as Ordinary Least Squares regression. Those are easy with Excel. Orthogonal regression is for the intermediate cases where both X and Y have residual error. It would be good to add X-Y orthogonal regression to your growing list of solutions that are readily available without leaving Excel . . . ?


Comment from Jan Karel Pieterse
Time: Wednesday, October 7, 2009, 3:50 am

If I understand this problem correctly, what we’re trying to determine here is the effect of using two machines on product characteristics.
Unlike continuous process variables which you can control by e.g. turning a dial or entering a setpoint, the effect of machine is a qualitative variable.
The statistics needed to determine the effect of a machine differ from those to determine the effect of a “normal” process variable.
By using a Design of Experiments (DoE) software package, you can set up an experiment scheme which lets you determine the machine effects and (more importantly) the interactions between various process settings and the machine effects.

So if your goal is to determine machine effects, consider buying DoE (Design of Experiments) software and (even more important) taking a DoE course. Let me take this further:

I’d strongly advice ANY (yes, ANY) researcher, process engineer, …, anyone doing tests, to take a DoE course.


Comment from Jon Peltier
Time: Wednesday, October 7, 2009, 6:43 am

JK -

The DOE suggestion is a good one for two machines used in production. In another scenario, consider that the two machines are used for measurement of some property. This regression is useful for comparing the measurements of the two machines.


Comment from Jan Karel Pieterse
Time: Thursday, October 8, 2009, 12:24 am

Jon: Yes, that is an important distinction. Good post by the way.


Comment from Bill Harris
Time: Wednesday, December 2, 2009, 11:35 am

Jon, very helpful for slope intercept and correlation, but I need the 95% CIs for the slope and intercept to know if the slope is sig diff from 1.0 and if the intercept is sig diff from 0. Is that information buried somewhere in here? Thx


Comment from Jon Peltier
Time: Wednesday, December 2, 2009, 12:01 pm

Hi Bill -

The confidence interval information isn’t buried in the calculations. I didn’t implement the algorithms for these quantities.

Write a comment

I welcome comments from my readers. If you have an opinion on this post, if you have a question or if there is anything to add, I want to hear from you. Whether you agree or disagree, please join the discussion.

If you want to include an image in your comment, post it on your own site or on one of the many free image sharing sites, and include a link in your comment. I'll download your image and insert the necessary html to display the image inline.

Read the PTS Blog Comment Policy.





Subscribe without commenting

Peltier Tech Waterfall Chart Utility Peltier Tech Cluster-Stack Chart Utility Peltier Tech Box and Whisker Chart Utility Peltier Tech Marimekko Chart Utility Peltier Tech Dot Plot Utility Peltier Tech Cascade Chart Utility

Create Excel dashboards quickly with Plug-N-Play reports.