SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

DEMING FIT

Name:
    DEMING FIT
Type:
    Analysis Command
Purpose:
    Performs a Deming regression for two paired measurement processes.
Description:
    Deming regression is a special case of errors in variables regression. It is used for the case where we have n paired measurements, \( (x_{i},y_{i}) \), where x and y denote measurements from two measurement processes. It is used to compare how comparable the measurement processes are. Specifically, it fits the model

      \( y_{i} = \alpha + \beta x_{i} \)

    where \( y_{i} \) has measurement error \( \epsilon_{i} \) and \( x_{i} \) has measurement error \( \tau_{i} \). It is assumed that the \( \epsilon \) and \( \tau \) errors are independent of each other and that both have normal distributions with a mean of zero.

    If the two measurement processes are equal, the slope should be approximately equal to one and the intercept should be approximately equal to zero.

    Let \( \delta \) equal the ratio of the variances of \( \epsilon \) and \( \tau \). This ratio is typically assumed to be known (possibly from prior data). If prior data is not available, estimates of these variances can be determined if we have multiple measurements for each \( i \). In that case, the variances can be estimated with

      \( s_{\tau}^2 = \sum_{i=1}^{n}{\sum_{j=1}^{k_{i}} {\frac{(x_{ij} - \bar{x}_{i})^2} {\sum_{i=1}^{n}{k_{i}-1}}}} \)

      \( s_{\epsilon}^2 = \sum_{i=1}^{n}{\sum_{j=1}^{m_{i}} {\frac{(y_{ij} - \bar{y}_{i})^2} {\sum_{i=1}^{n}{m_{i}-1}}}} \)

    with \( k_{i} \) denoting the number of replications for \( x_{i} \) and \( m_{} \) the number of replications for \( y_{i} \), respectively. Then

      \( \delta = \frac{s_{\tau}^{2}} {s_{\epsilon}^{2}} \)

    Note that \( k_{i} \) does not need to equal \( m_{i} \), but all \( k_{i} \) and \( m_{i} \) should be greater than one. Also, the means for \( x_{i} \) and \( y_{i} \) are used in the DEMING FIT command.

    If prior estimates of the variances are not available and we do not have replicate measurements, the following ratio will be used by default

      \( \delta = \frac{SS_{x}} {SS_{y}} \)

    where \( SS_{x} \) and \( SS_{y} \) are defined below. Alternatively, you can chose to set \( \delta \) to 1 (i.e., we assume equal error variances for both measurement processes).

    The estimates for \( \beta \) and \( \alpha \) are:

      \( \beta = \frac{ \delta SS_{y} - SS_{x} + \sqrt{(\delta SS_{y} - SS_{x})^2 + r \delta SS_{xy}}} {(2 \delta SS_{xy}} \)

      \( \alpha = \bar{y} - \beta \bar{x} \)

    where

      \( SS_{y} = \sum_{i=1}^{n}{(y_{i} - \bar{y})^2} \)

      \( SS_{x} = \sum_{i=1}^{n}{(x_{i} - \bar{x})^2} \)

      \( SS_{xy} = \sum_{i=1}^{n}{(x_{i} - \bar{x})(y_{i} - \bar{y})} \)

    The estimated "true" values for \( x_{i} \) and \( y_{i} \) are

      \( \hat{x}_{i} = x_{i} + \frac{\delta \beta e_{i}} {\delta \beta^2 + 1} \)

      \( \hat{y}_{i} = y_{i} - \frac{e_{i}} {\delta \beta^2 + 1} \)

    The \( e_{i} \) are the "raw" residuals

      \( e_{i} = y_{i} - (\alpha + \beta x_{i}) \)

    In addition to the raw residuals, the following residuals are defined

      x residual: \( e_{i}^{x} = x_{i} - \hat{x_{i}} \)
      y residual: \( e_{i}^{y} = y_{i} - \hat{y_{i}} \)
      optimized residual: \( e_{i}^{\ast} = sign(e_{i}) \sqrt{(e_{i}^{x})^2 + \delta (e_{i}^{y})^2} \)

    Dataplot generates the following outputs

    1. Estimates for \( \alpha \) and \( \beta \)

    2. Standard errors for \( \alpha \) and \( \beta \)

      These standard errors are computed using the jacknife procedure developed by Linnett (1990). See the Note section below for details.

    3. Confidence limits for alpha and beta

        \( \beta \pm \mbox{tppf}(1-\alpha/2,n-2) SE_{\beta} \)

        \( \alpha \pm \mbox{tppf}(1-\alpha/2,n-2) SE_{\alpha} \)

      with \( SE_{\beta} \) and \( SE_{\alpha} \) denoting the standard errors of \( \beta \) and \( \alpha \), respectively, and tppf is the percent point function of the t distribution (the \( \alpha \) in tppf is the significance level, not the estimate of the intercept).

    4. A hypothesis test that the slope is equal to one (i.e., the two measurement process are equivalenet with the possible exception of a different of location).

      The test statistic is

        \( t = \frac{\beta - 1} {SE_{\beta}} \)

      Reject the hypothesis if \( |t| > \mbox{tppf}(1-\alpha/2,n-1) \) where tppf is the t percent point function.

    5. A hypothesis test that \( \bar{y} - \bar{x} = 0 \) (or \( \bar{y} = \bar{x} \) ).

      The test statistic is

        \( t = \frac{\bar{y} - \bar{x}} {SE_{\bar{y} - \bar{x}}} \)

      Reject the hypothesis if \( |t| > \mbox{tppf}(1-\alpha/2,n-1) \) where tppf is the t percent point function.

      The \( SE_{\bar{y} - \bar{x}} \) is obtained from the same jacknife procedure that generates the standard errors for \( \alpha \) and \( \beta \).

    If the hypothesis that the slope is equal to one and the means of the two processes are equal, this provides evidence that the two measurement processes can be considered equivalent.

    Additional information is written to files. Specifically,

    1. The file dpst1f.dat contains

        Column 1: the \( \hat{x} \) values
        Column 2: the \( \hat{y} \) values
        Column 3: the raw residuals
        Column 4: the x residuals
        Column 5: the y residuals
        Column 6: the optimized residuals
        Column 7: the predicted values for Y given X

    2. The files dpst2f.dat and dpst3f.dat contain information related to the jacknife procedure. These will typically not be viewed and are primarily used for diagnostic purposes.

    3. The file dpst4f.dat contains

        Column 1: the \( x_{i} \) values
        Column 2: the standard errors for the predicted values
        Column 3: the lower 90% confidence interval for the predicted value of Y given X
        Column 4: the upper 90% confidence interval for the predicted value of Y given X
        Column 5: the lower 95% confidence interval for the predicted value of Y given X
        Column 6: the upper 95% confidence interval for the predicted value of Y given X
        Column 7: the lower 99% confidence interval for the predicted value of Y given X
        Column 8: the upper 99% confidence interval for the predicted value of Y given X

      The standard errors for the predicted values are obtained from the jacknife procedure. The confidence intervals are obtained by

        \( \mbox{predicted value} \pm \mbox{tppf}(1-\alpha/2,n-2) SE_{\mbox{predicted value}} \)
    The variables PRED and RES will contain the predicted values of Y given X and the optimized residuals, respectively.

    This procedure was popularized by Deming which is why it is commonly referred to as Deming regression. However, it was initially developed by Adcock and Kummell.

    The Deming regression assumes that the ratio of the variances (i.e., the delta) is constant across the range of the measurements. If this assumption is not met, then a weighted Deming regression may provide a better fit. Dataplot uses the weighting scheme recommended by Linnet. Specifically,

      \( w_{i} = 1/ \left( \frac {x_{i} + \delta y_{i}} {1 + \delta} \right) ^{2} \)

    Then the formulas for \( SS_y \), \(SS_x \) and \( SS_{xy} \) are updated to use the weights

      \( SS_{y} = \sum_{i=1}^{n}{w_{i}(y_{i} - \bar{y_w})^2} \)

      \( SS_{x} = \sum_{i=1}^{n}{w_{i}(x_{i} - \bar{x_w})^2} \)

      \( SS_{xy} = \sum_{i=1}^{n}{w_{i}(x_{i} - \bar{x_w}) w_{i}(y_{i} - \bar{y_w})} \)

    where \( \bar{y_w} \) and \( \bar{x_w} \) are the weighted means.

      \( \bar{y_w} = \frac{\sum_{i=1}^{n}{w_{i} y_{i}}} {\sum_{i=1}^{n}{w_{i}}} \)

      \( \bar{x_w} = \frac{\sum_{i=1}^{n}{w_{i} x_{i}}} {\sum_{i=1}^{n}{w_{i}}} \)

    Optionally, an iterative reweighting scheme can be be employed to fine tune the weights. The algorithm for this (suggested by Linnett) is

    1. Generate predicted values using the unweighted Deming regression.

    2. Compute the weights using these predicted values. If delta is computed from the data, recalculate it using these predicted values.

    3. Use the weighted algorithm to generate an updated set of predicted values for the X and Y measurements. Note that the original data, not the new predicted values, are used in the weighted fit. This will generate an updated set of predicted values.

    4. Compare the coefficents from the new fit to the previous fit. If the change in coefficient values is below a specified threshold, stop. Otherwise, use the current predicted values and go back to step 2.
Syntax 1:
    DEMING FIT <y> <x>             <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable for the first measurement process;
                <x> is the response variable for the second measurement process;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax performs the unweighted Deming fit.

Syntax 2:
    WEIGHTED DEMING FIT <y> <x>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable for the first measurement process;
                <x> is the response variable for the second measurement process;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax performs the weighted Deming fit.

Syntax 3:
    REPLICATED DEMING FIT <y1> <x1> <y2> <x2>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable for the first measurement process;
                <x1> is the group-id variable for the first measurement process;
                <y2> is the response variable for the second measurement process;
    <x2> is the group-id variable for the second measurement process;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax is used when there is replication in the data. The advantage of replication is that a more accurate estimate of \( \delta \) can be obtained.

    The <y1> and <x1> variables should be of the same length and the <y2> and <x2> variables should be of the same length. However, <y1> and <y2> do not need to be the same length. The <x1> and <x2> group-id variables should have the same group-id's and each group should have at least two values.

    Note that average, rather than the individual observations, for each group is used in the Deming fit.

Syntax 4:
    WEIGHTED REPLICATED DEMING FIT <y1> <x1> <y2> <x2>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable for the first measurement process;
                <x1> is the group-id variable for the first measurement process;
                <y2> is the response variable for the second measurement process;
    <x2> is the group-id variable for the second measurement process;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax is similar to Syntax 3. However, the weighted Deming fit is used.

Examples:
    DEMING FIT Y X
    DEMING FIT Y X SUBSET TAG > 1
    WEIGHTED DEMING FIT Y X
    REPLICATED DEMING FIT Y1 X1 Y2 X2
Note:
    The Deming regression is typically used to determine if two measurements are equivalent. If the confidence interval for the slope contains the value 1, then the two measurement processes can be considered equivalent with the possible exception of a bias. The intercept term is a measure of this bias. If the confidence limit for the intercept term contains the value 0, then this indicates there is not a statistically signficant bias between the two measurement processes.
Note:
    To specify the value for delta, enter the command

      LET DELTA = <value>

    To specify that delta should be computed from the data, enter a negative value for DELTA. Using a value of 1 specifies that the variances from the two measurement processes are equal.

Note:
    If you would like the weighted Deming regression to perform the iterative reweighting, enter the command

      SET DEMING FIT ITERATIVE REWEIGHTING ON

    To turn off the iterative reweighting, set this switch to OFF. The default is OFF. To specificy the threshold for determining convergence, enter the command

      SET DEMING FIT ITERATIVE THRESHOLD <value>

    The default is 0.00005.

Note:
    The jacknife procedure for obtaining the standard error of a statistic, \( \theta \), is as follows:

    1. Compute the estimate of \( \theta \) based on the full data set. This will be \( \hat{\theta} \).

    2. Compute the estimate of \( \theta \) based on omitting a single row of the data. Do this for all rows. This will result in n estimates of \( \theta \). Call these n estimates \( \hat{\theta}_{i} \).

    3. Compute \( \hat{\theta}_{i}^{\ast} = n \hat{\theta} - (n-1) \hat{\theta}_{i} \). Note that the \( \hat{\theta}_{i} \) and \( \hat{\theta}_{i}^{\ast} \) values for \( \alpha \) and \( \beta \) are written to dpst2f.dat (the \( \hat{\theta}_{i}^{\ast} \) values are called the adjusted values and the \( \hat{\theta}_{i} \) values are called the unadjusted values). The \( \hat{\theta}_{i}^{\ast} \) values for the predicted values are written to dpst3f.dat.

    4. Compute the mean of the \( \hat{\theta}_{i}^{\ast} \) values. This is the jacknife estimate of \( \theta \). The difference between \( \hat{\theta} \) and the jacknife estimate of \( \theta \) is a measure of bias.

    5. The jacknife estimate of the variance is

        \( V(\hat{\theta}) = \sum_{i=1}^{n} {\frac{(\hat{\theta}_{i}^{\ast} - \hat{\hat{\theta}}_{jacknife})^2} {n-1}} \)

      and the jacknife estimate of the standard error is

        \( \hat{SE}_{\hat{theta}} = \sqrt{\frac{V(\hat{theta})}{n}} \)
Note:
    The following parameters are saved by the DEMING FIT command

      ALPHA = the estimate of the intercept parameter.
      SDALPHA = the estimate of the standard error of the intercept parameter.
      ALPHAJN = the Jacknife estimate of the intercept parameter.
      BETA = the estimate of the slope parameter.
      SDBETA = the estimate of the standard error of the slope parameter.
      ALPHAJN = the Jacknife estimate of the intercept parameter.
      SDDIFF = the standard error of the \( \bar{y} \) - \( \bar{x} \) statistic.
      SSY = the sum of squares for Y.
      SSX = the sum of squares for X.
      SSXY = the sum of squares for Y-X.
Default:
    None
Synonyms:
    DEMING REGRESSION
    REPLICATED WEIGHTED DEMING FIT
Related Commands: References:
    Adcock (1878), "A problem in least square," The Analyst, Vol. 5, No. 2, pp. 53-54.

    Kummel (1879), "Reduction of observation equations which contain more than one observed quantity," The Analyst, Vol. 6, No. 4, pp. 97-105.

    Deming (1943), "Statistical Adjustment of Data," John Wiley and Sons.

    Linnet (1990), "Estimation of the linear relationship between the measurements of two methods with proportional errors," Statistics in Medicine, Vol. 9, No. 12, pp. 1463-1473.

    Linnet (1993), "Evaluation of Regression Procedures for Method Comparison Studies," Clinical Chemistry, 39 (3), pp. 424-432.

    NCSS (2016), "Deming Regression," https://www.ncss.com/wp-content/themes/ncss/pdf/Procedures/NCSS/Deming_Regression.pdf.

Applications:
    Fitting
Implementation Date:
    2026/03
Program 1:
     
    . Step 1:   Define the Input Data, example from NCSS web site
    .
    read x y
     7.0   7.9
     8.3   8.2
    10.5   9.6
     9.0   9.0
     5.1   6.5
     8.2   7.3
    10.2  10.2
    10.3  10.6
     7.1   6.3
     5.9   5.2
    end of data
    let n = size x
    .
    . Step 2:   Perform the Deming Regression
    .
    set list new window off
    let delta = 4
    deming fit y x
    print " "
    print " "
    list dpst1f.dat
    print " "
    print " "
    list dpst4f.dat
        
The following output is generated
             Deming Fit (Non-Weighted Case)
                Y        versus X
  
 Number of Observations:                              10
 Delta (Ratio of Variances):                     4.00000
 Sum of Squares Y:                              19.40000
 Sum of Squares X:                              26.20889
 Sum of Squares XY:                             20.24000
  
 Estimate of Intercept:                         -0.08974
 SD(Intercept):                                  1.72199
 Jacknife Estimate of Intercept:                -0.04481
 Estimate of Slope:                              1.00119
 SD(Slope):                                      0.18718
 Jacknife Estimate of Slope:                     0.99766
  
 Ybar:                                           8.08000
 Xbar:                                           8.16000
 Ybar-Xbar:                                     -0.08000
 SD(Ybar-Xbar):                                  0.22988
 Jacknife Estimate of Ybar-Xbar:                -0.08000
  
  
  
       Confidence Interval for the Intercept
  
  
  
 ------------------------------------------------------------------------
   Confidence              t      t-Value X          Lower          Upper
    Value (%)          Value         StdErr          Limit          Limit
 ------------------------------------------------------------------------
       90.000        1.85955        3.20212       -3.29186        3.11237
       95.000        2.30600        3.97091       -4.06066        3.88117
       99.000        3.35539        5.77794       -5.86768        5.68819
  
  
  
       Confidence Interval for the Slope
  
  
  
 ------------------------------------------------------------------------
   Confidence              t      t-Value X          Lower          Upper
    Value (%)          Value         StdErr          Limit          Limit
 ------------------------------------------------------------------------
       90.000        1.85955        0.34806        0.65313        1.34926
       95.000        2.30600        0.43163        0.56956        1.43283
       99.000        3.35539        0.62805        0.37314        1.62925
  
  
             Two-Tailed Test for Slope Equal to One
  
 H0: Beta = 1; Ha: Beta <> 1
 ------------------------------------------------------------
                                                         Null
    Significance           Test       Critical     Hypothesis
           Level      Statistic    Value (+/-)     Conclusion
 ------------------------------------------------------------
           90.0%        0.00638        1.83311         ACCEPT
           95.0%        0.00638        2.26216         ACCEPT
           99.0%        0.00638        3.24984         ACCEPT
  
  
             Two-Tailed Test for Ybar - Xbar = 0
  
 H0: Ybar - Xbar = 0; Ha: Ybar - Xbar <> 0
 ------------------------------------------------------------
                                                         Null
    Significance           Test       Critical     Hypothesis
           Level      Statistic    Value (+/-)     Conclusion
 ------------------------------------------------------------
           90.0%       -0.34801        1.83311         ACCEPT
           95.0%       -0.34801        2.26216         ACCEPT
           99.0%       -0.34801        3.24984         ACCEPT
  
 
 
                                                                                  OPTIMIZED
           X-HAT          Y-HAT   RAW RESIDUAL     X RESIDUAL     Y RESIDUAL       RESIDUAL  PREDICTED Y|X
   0.7784546E+01  0.7704097E+01  0.9813853E+00 -0.7845459E+00  0.1959025E+00  0.8769398E+00  0.6918615E+01
   0.8283878E+01  0.8204026E+01 -0.2016719E-01  0.1612220E-01 -0.4025742E-02  0.1802087E-01  0.8220167E+01
   0.9842236E+01  0.9764245E+01 -0.8227945E+00  0.6577641E+00 -0.1642449E+00  0.7352273E+00  0.1042279E+02
   0.9063152E+01  0.8984231E+01  0.7899685E-01 -0.6315221E-01  0.1576922E-01  0.7058948E-01  0.8921003E+01
   0.6286073E+01  0.6203835E+01  0.1483654E+01 -0.1186073E+01  0.2961646E+00  0.1325754E+01  0.5016346E+01
   0.7544432E+01  0.7463697E+01 -0.8200478E+00  0.6555683E+00 -0.1636966E+00  0.7327729E+00  0.8120048E+01
   0.1026201E+02  0.1018452E+02  0.7756378E-01 -0.6200657E-01  0.1548315E-01  0.6930893E-01  0.1012244E+02
   0.1060174E+02  0.1052466E+02  0.3774444E+00 -0.3017392E+00  0.7534482E-01  0.3372742E+00  0.1022256E+02
   0.6525425E+01  0.6443473E+01 -0.7187341E+00  0.5745754E+00 -0.1434725E+00  0.6422417E+00  0.7018734E+01
   0.5406513E+01  0.5323225E+01 -0.6173010E+00  0.4934871E+00 -0.1232246E+00  0.5516038E+00  0.5817301E+01
 
 
                      PREDICTED          LOWER          UPPER          LOWER          UPPER          LOWER          UPPER
            X(I) STANDARD ERROR         90% CI         90% CI         95% CI         95% CI         99% CI         99% CI
   0.7000000E+01  0.4602022E+00  0.6062847E+01  0.7774383E+01  0.5857387E+01  0.7979843E+01  0.5374458E+01  0.8462771E+01
   0.8300000E+01  0.2801083E+00  0.7699292E+01  0.8741042E+01  0.7574236E+01  0.8866098E+01  0.7280295E+01  0.9160039E+01
   0.1050000E+02  0.3501491E+00  0.9771675E+01  0.1107391E+02  0.9615349E+01  0.1123024E+02  0.9247909E+01  0.1159768E+02
   0.9000000E+01  0.2360495E+00  0.8482058E+01  0.9359949E+01  0.8376672E+01  0.9465334E+01  0.8128966E+01  0.9713041E+01
   0.5100000E+01  0.7871850E+00  0.3552537E+01  0.6480154E+01  0.3201094E+01  0.6831598E+01  0.2375035E+01  0.7657657E+01
   0.8200000E+01  0.2907099E+00  0.7579459E+01  0.8660637E+01  0.7449669E+01  0.8790426E+01  0.7144603E+01  0.9095492E+01
   0.1020000E+02  0.3108288E+00  0.9544435E+01  0.1070044E+02  0.9405664E+01  0.1083921E+02  0.9079485E+01  0.1116539E+02
   0.1030000E+02  0.3233838E+00  0.9621208E+01  0.1082390E+02  0.9476831E+01  0.1096828E+02  0.9137478E+01  0.1130763E+02
   0.7100000E+01  0.4442138E+00  0.6192697E+01  0.7844771E+01  0.5994375E+01  0.8043093E+01  0.5528225E+01  0.8509244E+01
   0.5900000E+01  0.6458274E+00  0.4616354E+01  0.7018248E+01  0.4328020E+01  0.7306582E+01  0.3650300E+01  0.7984302E+01
    
.
. Step 3:   Generate some diagnostic plots
.
skip 2
set read format 60X,2e15.7
read dpst4f.dat pred95l pred95u
skip 0
set read format
.
let alpha = round(alpha,4)
let beta  = round(beta,4)
title offset 8
title Deming Fit of Y versus Xcr()Model: Y = ^alpha + ^beta*x
y1label Y
x1label X
.
line blank solid dotted dotted
character circle blank blank blank
character hw 1.0 0.75
character fill on
.
plot y       x and
plot pred    x and
plot pred95l x and
plot pred95u x
.
    
.
set 4plot multiplot on
multiplot corner coordinates 5 5 95 95
character hw 2 1.5
tic mark label size 4
label
title
.
4-plot res
justification center
move 50 98
text 4-Plot of Optimized Residuals
    
Program 2:
     
    . Step 1:   Define the Input Data
    .
    read x y
     7.0   7.9
     8.3   8.2
    10.5   9.6
     9.0   9.0
     5.1   6.5
     8.2   7.3
    10.2  10.2
    10.3  10.6
     7.1   6.3
     5.9   5.2
    end of data
    .
    . Step 2:   Perform the Deming Regression
    .
    let delta = 4
    deming fit y x
    weighted deming fit y x
    set deming fit iterative reweighting on
    weighted deming fit y x
        
    The following output is generated
                 Unweighted Deming Fit (Standard Errors by Jackknife)
                               Y        versus X
      
     Number of Observations:                              10
     Delta (Ratio of Variances):                     4.00000
     Sum of Squares Y:                              28.61600
     Sum of Squares X:                              31.88400
     Sum of Squares XY:                             27.47200
     Residual Standard Deviation:                    0.83416
      
     Estimate of Intercept:                         -0.08974
     SD(Intercept):                                  1.72199
     Jacknife Estimate of Intercept:                -0.04481
     Estimate of Slope:                              1.00119
     SD(Slope):                                      0.18718
     Jacknife Estimate of Slope:                     0.99766
      
     Ybar:                                           8.08000
     Xbar:                                           8.16000
     Ybar-Xbar:                                     -0.08000
     SD(Ybar-Xbar):                                  0.24846
     Jacknife Estimate of Ybar-Xbar:                -1.52000
      
      
      
           Confidence Interval for the Intercept
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.85955        3.20212       -3.29186        3.11237
           95.000        2.30600        3.97091       -4.06066        3.88117
           99.000        3.35539        5.77794       -5.86768        5.68819
      
      
      
           Confidence Interval for the Slope
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.85955        0.34806        0.65313        1.34926
           95.000        2.30600        0.43163        0.56956        1.43283
           99.000        3.35539        0.62805        0.37314        1.62925
      
      
                 Two-Tailed Test for Slope Equal to One
      
     H0: Beta = 1; Ha: Beta <> 1
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%        0.00638        1.83311         ACCEPT
               95.0%        0.00638        2.26216         ACCEPT
               99.0%        0.00638        3.24984         ACCEPT
      
      
                 Two-Tailed Test for Ybar - Xbar = 0
      
     H0: Ybar - Xbar = 0; Ha: Ybar - Xbar <> 0
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%       -0.32198        1.83311         ACCEPT
               95.0%       -0.32198        2.26216         ACCEPT
               99.0%       -0.32198        3.24984         ACCEPT
      
      
                 Weighted Deming Fit (Standard Errors by Jackknife)
                              Y        versus X
      
     Number of Observations:                              10
     Delta (Ratio of Variances):                     4.00000
     Sum of Squares Y:                               0.48269
     Sum of Squares X:                               0.52677
     Sum of Squares XY:                              0.44519
     Residual Standard Deviation:                    0.85586
      
     Estimate of Intercept:                         -0.32512
     SD(Intercept):                                  1.96090
     Jacknife Estimate of Intercept:                -0.53165
     Estimate of Slope:                              1.03093
     SD(Slope):                                      0.21892
     Jacknife Estimate of Slope:                     1.05630
      
     Ybar:                                           7.34390
     Xbar:                                           7.43896
     Ybar-Xbar:                                     -0.09505
     SD(Ybar-Xbar):                                  0.33413
     Jacknife Estimate of Ybar-Xbar:                -1.79903
      
      
      
           Confidence Interval for the Intercept
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.85955        3.64640       -3.97152        3.32128
           95.000        2.30600        4.52185       -4.84697        4.19673
           99.000        3.35539        6.57959       -6.90472        6.25447
      
      
      
           Confidence Interval for the Slope
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.85955        0.40710        0.62383        1.43802
           95.000        2.30600        0.50483        0.52609        1.53576
           99.000        3.35539        0.73457        0.29636        1.76550
      
      
                 Two-Tailed Test for Slope Equal to One
      
     H0: Beta = 1; Ha: Beta <> 1
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%        0.14127        1.83311         ACCEPT
               95.0%        0.14127        2.26216         ACCEPT
               99.0%        0.14127        3.24984         ACCEPT
      
      
                 Two-Tailed Test for Ybar - Xbar = 0
      
     H0: Ybar - Xbar = 0; Ha: Ybar - Xbar <> 0
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%       -0.28448        1.83311         ACCEPT
               95.0%       -0.28448        2.26216         ACCEPT
               99.0%       -0.28448        3.24984         ACCEPT
      
      
     THE FORTRAN COMMON CHARACTER VARIABLE DEMI  FIT  HAS JUST BEEN SET TO ON
      
                 Iterative Weighted Deming Fit (Standard Errors by Jackknife)
                                   Y        versus X
      
     Number of Observations:                              10
     Delta (Ratio of Variances):                     4.00000
     Sum of Squares Y:                               0.48285
     Sum of Squares X:                               0.52659
     Sum of Squares XY:                              0.44523
     Residual Standard Deviation:                    0.85609
      
     Estimate of Intercept:                         -0.32838
     SD(Intercept):                                  1.95830
     Jacknife Estimate of Intercept:                -0.53688
     Estimate of Slope:                              1.03123
     SD(Slope):                                      0.21865
     Jacknife Estimate of Slope:                     1.05680
      
     Ybar:                                           7.34363
     Xbar:                                           7.43968
     Ybar-Xbar:                                     -0.09605
     SD(Ybar-Xbar):                                  0.33370
     Jacknife Estimate of Ybar-Xbar:                -1.81777
      
      
      
           Confidence Interval for the Intercept
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.85955        3.64155       -3.96992        3.31317
           95.000        2.30600        4.51584       -4.84422        4.18747
           99.000        3.35539        6.57085       -6.89922        6.24247
      
      
      
           Confidence Interval for the Slope
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.85955        0.40659        0.62463        1.43782
           95.000        2.30600        0.50421        0.52702        1.53544
           99.000        3.35539        0.73366        0.29757        1.76489
      
      
                 Two-Tailed Test for Slope Equal to One
      
     H0: Beta = 1; Ha: Beta <> 1
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%        0.14282        1.83311         ACCEPT
               95.0%        0.14282        2.26216         ACCEPT
               99.0%        0.14282        3.24984         ACCEPT
      
      
                 Two-Tailed Test for Ybar - Xbar = 0
      
     H0: Ybar - Xbar = 0; Ha: Ybar - Xbar <> 0
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%       -0.28783        1.83311         ACCEPT
               95.0%       -0.28783        2.26216         ACCEPT
               99.0%       -0.28783        3.24984         ACCEPT
      
        
Program 3:
     
    . Step 1:   Read the data.  This data is from the
    .           R package "deming".
    .
    skip 25
    read ferritin.dat id period y1 y2
    .
    let delta = 1
    deming fit y1 y2
    weighted deming fit y1 y2
    set deming fit iterative reweighting on
    weighted deming fit y1 y2
        
    The following output is generated
                 Unweighted Deming Fit (Standard Errors by Jackknife)
                               Y1       versus Y2
      
     Number of Observations:                             162
     Delta (Ratio of Variances):                     1.00000
     Sum of Squares Y:                         6234908.53975
     Sum of Squares X:                         6711375.16623
     Sum of Squares XY:                        6446538.77506
     Residual Standard Deviation:                   16.35996
      
     Estimate of Intercept:                          5.21567
     SD(Intercept):                                  2.18603
     Jacknife Estimate of Intercept:                 5.45149
     Estimate of Slope:                              0.96373
     SD(Slope):                                      0.02505
     Jacknife Estimate of Slope:                     0.96113
      
     Ybar:                                         129.80123
     Xbar:                                         129.27469
     Ybar-Xbar:                                      0.52654
     SD(Ybar-Xbar):                                  1.42827
     Jacknife Estimate of Ybar-Xbar:               170.07346
      
      
      
           Confidence Interval for the Intercept
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.65443        3.61663        1.59904        8.83231
           95.000        1.97490        4.31719        0.89849        9.53286
           99.000        2.60691        5.69876       -0.48309       10.91444
      
      
      
           Confidence Interval for the Slope
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.65443        0.04144        0.92229        1.00516
           95.000        1.97490        0.04946        0.91427        1.01319
           99.000        2.60691        0.06529        0.89844        1.02902
      
      
                 Two-Tailed Test for Slope Equal to One
      
     H0: Beta = 1; Ha: Beta <> 1
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%       -1.44828        1.65437         ACCEPT
               95.0%       -1.44828        1.97481         ACCEPT
               99.0%       -1.44828        2.60671         ACCEPT
      
      
                 Two-Tailed Test for Ybar - Xbar = 0
      
     H0: Ybar - Xbar = 0; Ha: Ybar - Xbar <> 0
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%        0.36866        1.65437         ACCEPT
               95.0%        0.36866        1.97481         ACCEPT
               99.0%        0.36866        2.60671         ACCEPT
      
      
                 Weighted Deming Fit (Standard Errors by Jackknife)
                              Y1       versus Y2
      
     Number of Observations:                             162
     Delta (Ratio of Variances):                     1.00000
     Sum of Squares Y:                             138.19075
     Sum of Squares X:                             130.15446
     Sum of Squares XY:                            133.65215
     Residual Standard Deviation:                   22.00621
      
     Estimate of Intercept:                         -0.02616
     SD(Intercept):                                  0.03322
     Jacknife Estimate of Intercept:                -0.03267
     Estimate of Slope:                              1.03052
     SD(Slope):                                      0.00626
     Jacknife Estimate of Slope:                     1.03071
      
     Ybar:                                           4.16195
     Xbar:                                           4.06408
     Ybar-Xbar:                                      0.09786
     SD(Ybar-Xbar):                                  0.15216
     Jacknife Estimate of Ybar-Xbar:                31.69897
      
      
      
           Confidence Interval for the Intercept
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.65443        0.05496       -0.08112        0.02880
           95.000        1.97490        0.06560       -0.09176        0.03945
           99.000        2.60691        0.08660       -0.11276        0.06044
      
      
      
           Confidence Interval for the Slope
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.65443        0.01036        1.02016        1.04088
           95.000        1.97490        0.01237        1.01815        1.04288
           99.000        2.60691        0.01633        1.01419        1.04684
      
      
                 Two-Tailed Test for Slope Equal to One
      
     H0: Beta = 1; Ha: Beta <> 1
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%        4.87290        1.65437         REJECT
               95.0%        4.87290        1.97481         REJECT
               99.0%        4.87290        2.60671         REJECT
      
      
                 Two-Tailed Test for Ybar - Xbar = 0
      
     H0: Ybar - Xbar = 0; Ha: Ybar - Xbar <> 0
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%        0.64315        1.65437         ACCEPT
               95.0%        0.64315        1.97481         ACCEPT
               99.0%        0.64315        2.60671         ACCEPT
      
      
     THE FORTRAN COMMON CHARACTER VARIABLE DEMI  FIT  HAS JUST BEEN SET TO ON
      
                 Iterative Weighted Deming Fit (Standard Errors by Jackknife)
                                   Y1       versus Y2
      
     Number of Observations:                             162
     Delta (Ratio of Variances):                     1.00000
     Sum of Squares Y:                             138.18109
     Sum of Squares X:                             130.16739
     Sum of Squares XY:                            133.65385
     Residual Standard Deviation:                   21.99278
      
     Estimate of Intercept:                         -0.02617
     SD(Intercept):                                  0.03318
     Jacknife Estimate of Intercept:                -0.03254
     Estimate of Slope:                              1.03043
     SD(Slope):                                      0.00626
     Jacknife Estimate of Slope:                     1.03062
      
     Ybar:                                           4.16153
     Xbar:                                           4.06403
     Ybar-Xbar:                                      0.09750
     SD(Ybar-Xbar):                                  0.15163
     Jacknife Estimate of Ybar-Xbar:                31.58043
      
      
      
           Confidence Interval for the Intercept
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.65443        0.05489       -0.08106        0.02873
           95.000        1.97490        0.06553       -0.09169        0.03936
           99.000        2.60691        0.08650       -0.11266        0.06033
      
      
      
           Confidence Interval for the Slope
      
      
      
     ------------------------------------------------------------------------
       Confidence              t      t-Value X          Lower          Upper
        Value (%)          Value         StdErr          Limit          Limit
     ------------------------------------------------------------------------
           90.000        1.65443        0.01036        1.02006        1.04079
           95.000        1.97490        0.01237        1.01806        1.04280
           99.000        2.60691        0.01633        1.01410        1.04676
      
      
                 Two-Tailed Test for Slope Equal to One
      
     H0: Beta = 1; Ha: Beta <> 1
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%        4.85723        1.65437         REJECT
               95.0%        4.85723        1.97481         REJECT
               99.0%        4.85723        2.60671         REJECT
      
      
                 Two-Tailed Test for Ybar - Xbar = 0
      
     H0: Ybar - Xbar = 0; Ha: Ybar - Xbar <> 0
     ------------------------------------------------------------
                                                             Null
        Significance           Test       Critical     Hypothesis
               Level      Statistic    Value (+/-)     Conclusion
     ------------------------------------------------------------
               90.0%        0.64298        1.65437         ACCEPT
               95.0%        0.64298        1.97481         ACCEPT
               99.0%        0.64298        2.60671         ACCEPT
      
        
Date created: 03/10/2026
Last updated: 03/10/2026

Please email comments on this WWW page to [email protected].