-----CALIBRATION --------------------------------------------

CALIBRATION
 
Name:
    CALIBRATION
 
Type:
    Analysis Command
 
Purpose:
    Compute a linear or quadratic calibration using multiple
    methods.
 
Description:
    The goal of calibration is to quantitatively convert measurements
    made on one of two measurement scales to the other measurement
    scale.  There is also a model that describes the relationship
    between the two measurement scales.

    The primary measurement scale is usually the scientifically
    relevant scale and measurements on this scale are typically
    more precise (relatively) than measurements on the secondary
    scale.  However, the secondary scale is typically the easier
    measurement to obtain (i.e., it is typically cheaper or faster
    or more readily available).

    So given a measurement on the secondary scale, we want to convert
    that to an estimate of the measurement on the primary scale. The
    steps involved are:

       1) We start with a series of points that have been measured
          on both scales.  The secondary measurement is treated
          as the response variable, Y, and the primary measurement
          is treated as the independent variable, X.

       2) We perform a fit of Y and X.  Currently, Dataplot supports
          calibration for the case where Y and X can be fit with
          either a linear fit

             Y = A0 + A1*X

          or a quadratic fit

             Y = A0 + A1*X + A2 *X**2

          This is typically referred to as the calibration curve.

          Although these are the most common calibration models in
          practice, more sophisticated calibration models are
          also used.  For example, the fit could be multi-linear
          (i.e., more than one X variable), a higher order
          polynomial, or non-linear.  These cases are not supported
          directly.  However, you can use a bootstrap approach
          for many of these problems.
          
       3) We then have one or more points measured on the secondary
          scale with no corresponding measurement on the primary
          scale.

          We use the calibration curve to estimate the value of
          the measurement on the primary scale.  In addition, we
          estimate a confidence interval for the estimated value
          on the primary scale.

          The calibration problem has recieved significant
          attention and a number of different methods have
          been proposed for the calibration estimates.  Most of
          these methods return the same value for the point
          estimate.  However, the method for obtaining the
          confidence interval is typically different.  The methods
          supported in Dataplot are given in the Description of
          Methods section below.

    When Dataplot performs a calibration, it first prints out a
    summary of the initial fit.  It then loops through each point
    being calibrated and prints the estimate for the primary
    scale and the corresponding confidence limits.

Description of Methods:
    Dataplot generates the linear calibration using the
    following methods:

    1) Inverse Prediction Limits (Eisenhart)

       This method was originally recommended by Churchill
       Eisenhart and is considered the "classical" solution
       to the linear calibration problem.

       Given a calibration point, Y0, the X0 is estimated from
       the original fit by

           X0 = (Y0 - A0)/A1

       with A0 and A1 denoting the coefficients from the original fit:

          Y = A0 + A1*X

       The uncertainty is obtained from the linear regression
       prediction interval

          Yhat +/- t(1-alpha/2,nu)*sigmahat(p)

       with sigmahat(p) denoting the standard deviation of the
       predicted value.  The formula for sigmahat(p) is

           sigmahat(p) = SQRT(sigmahat**2 + sigmahat(f)**2)

       with 

           sigmahat**2    = variance of the residuals
                          = SUM(Y-Yhat)**2/(N-2)

           sigmahat(f)**2 = variance of the predicted values

                          = 
       To find the confidence limits for X0, X0L and X0U,
       we solve

           X0L = (A0 + A1*X0) - t(1-alpha/2,nu)*sigmahat(p)
         

    2) Graybill-Iyer

       This method was originally recommended by Churchill
       Eisenhart.

    3) Neter-Wasserman-Kutner

       This method was originally recommended by Churchill
       Eisenhart.

    4) Propogation of Error

       This method was originally recommended by Churchill
       Eisenhart.

    5) Inverse (Krutchkoff)

       This method was originally recommended by Churchill
       Eisenhart.

    6) Maximum Likelihood

       This method was originally recommended by Churchill
       Eisenhart.

    7) Bootstrap (residuals)

       This method was originally recommended by Churchill
       Eisenhart.

    8) Bootstrap (data)

       This method was originally recommended by Churchill
       Eisenhart.

    Additional methods may be supported in future releases.

    Dataplot generates the quadratic calibration using the
    following methods:

    1) Inverse Prediction Limits (Eisenhart)

       This method was originally recommended by Churchill
       Eisenhart.

    2) Bootstrap (residuals)

       This method was originally recommended by Churchill
       Eisenhart.

    3) Bootstrap (data)

       This method was originally recommended by Churchill
       Eisenhart.

    Additional methods may be supported in future releases.

Syntax 1:
    LINEAR CALIBRATION  <y>  <x> <y0>
                        <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable (secondary measurements);
          <x> is the independent variable (primary measurements);
          <y0> is a number, parameter, or variable containing the
              secondary measurements where the calibration is to
              be performed;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax computes a linear calibration analysis.

Syntax 2:
    QUADRATIC CALIBRATION  <y>  <x> <y0>
                        <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable (secondary measurements);
          <x> is the independent variable (primary measurements);
          <y0> is a number, parameter, or variable containing the
              secondary measurements where the calibration is to
              be performed;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    This syntax computes a quadratic calibration analysis.

Examples:
    LINEAR CALIBRATION Y  X Y0
    QUADRATIC CALIBRATION Y  X Y0
    LINEAR CALIBRATION Y  X  Y0SUBSET X > 2
 
Note:
    To simplify the generation of additional plots and analysis, a
    number of results are written to external files.

    The following variables are written to the file
    dpst1f.dat.

       Column 1 - method id
       Column 2 - Y0 (i.e., calibration point on secondary scale)
       Column 3 - X0 (i.e., for Y0, the estimate on the primary scale)
       Column 4 - lower confidence limit
       Column 5 - upper confidence limit

    The following variables are written to the file dpst2f.dat.

       Column 1         - Y0
       Columns 2 thru 9 - X0 for each of the 8 methods (only 3
                          methods for quadratic calibration)

    The following variables are written to the file dpst3f.dat.

       Column 1         - Y0
       Columns 2 thru 9 - lower limit for X0 for each of the 8
                          methods (only 3 methods for quadratic
                          calibration)

    The following variables are written to the file dpst4f.dat.

       Column 1         - Y0
       Columns 2 thru 9 - upper limit for X0 for each of the 8
                          methods (only 3 methods for quadratic
                          calibration)

Note:
    The default confidence limits are for a 95% confidence interval
    (i.e., alpha = 0.05).  To use a different alpha, enter the
    command (before entering the CALIBRATION command):

       LET ALPHA = <value>

    For example, to generate 90% confidence intervals, enter

       LET ALPHA = 0.10

Default:
    None
 
Synonyms:
    None
 
Related Commands:
    FIT                 = Perform a fit.
    BOOTSTRAP PLOT      = Generate a bootstrap plot.
 
Reference:
    Churchill Eisenhart (1939).  "The Interpretation of Certain
    Regression Methods and Their Use in Biological and Industrial
    Research", Annals of Mathematical Statistics, Vol. 10,
    pp. 162-182.

    R. G. Krutchkoff (1967).  "Classical and Inverse Methods of
    Calibration", Technometrics, Vol. 9, pp. 425-439.

    Neter, Wasserman, and Kuttner.  "Applied Linear Statistical
    Models", Third Edition, Irwin, pp. 173-175.

    F. Graybill and H. Iyer.  "Regression Anaysis", First Edition,
    Duxbury Press, pp. 427-431.

    B. Hoadley (1970).  "A Bayesian Look at Inverse Linear
    Regresssion", JASA, Vol. 65, pp. 356-369.

    H. Scheffe (1973).  "A Statistical Theory of Calibration",
    Annals of Statistics, Vol. 1, pp. 1-37.

    P. J. Brown (1982).  "Multivariate Calibration", (with
    discussion), JRSBB, Vol. 44, pp. 287-321.

    A. Racine-Poon (1988).  "A Bayesian Approach to Nonlinear
    Calibration Problems", JASA, Vol. 83, pp. 650-656.

    C. Osborne (1991).  "Statistical Calibration: A Review",
    International Statistical Review, Vol. 59, pp. 309-336.

Applications:
    Calibration
 
Implementation Date:
    2003/7
 
Program:
    SKIP 25
    READ NATR533.DAT Y X
    LET Y0 = DATA 150 200 250 300
    .
    LINEAR CALIBRATION Y X X0
 
    The following output is generated:

                 LINEAR CALIBRATION ANALYSIS
      
           SUMMARY OF THE LINEAR FIT BETWEEN Y        AND X
     NUMBER OF OBSERVATIONS:                     16
     ESTIMATE OF INTERCEPT              13.50581
     SD(INTERCEPT)                      21.04761
     T(INTERCEPT)                      0.6416793
     ESTIMATE OF SLOPE                 0.7902125
     SD(SLOPE)                         0.7103873E-01
     T(SLOPE)                           11.12368
     RESIDUAL STANDARD DEVIATION:        26.20780
      
      
           LINEAR CALIBRATION SUMMARY
      
                                                         95%            95%
                  METHOD                  X0        LOWER LIMIT      UPPER LIMIT
     ---------------------------------------------------------------------------
     Y0 =    150.0000
      1. INVERSE PREDICTION LIMITS:   172.7310        90.69107        246.3665
      2. GRAYBILL-IYER:               172.7310        90.69109        246.3665
      3. NETER-WASSERMAN-KUTNER:      172.7310        96.46526        248.9967
      4. PROPOGATION OF ERROR:        172.7310        83.35057        262.1115
      5. INVERSE (KRUTCHKOFF):        183.7930        106.8873        260.6987
      6. MAXIMUM LIKELIHOOD:          172.7310        142.7455        194.8588
      7. BOOTSTRAP (RESIDUALS):       172.7310        145.7335        192.7618
      8. BOOTSTRAP (DATA):            172.7310        146.6037        193.8465
      
     Y0 =    200.0000
      1. INVERSE PREDICTION LIMITS:   236.0051        158.9669        309.5252
      2. GRAYBILL-IYER:               236.0051        158.9669        309.5252
      3. NETER-WASSERMAN-KUTNER:      236.0051        162.1587        309.8515
      4. PROPOGATION OF ERROR:        236.0051        134.6395        337.3708
      5. INVERSE (KRUTCHKOFF):        240.6357        168.0773        313.1942
      6. MAXIMUM LIKELIHOOD:          236.0051        216.1080        253.3034
      7. BOOTSTRAP (RESIDUALS):       236.0051        217.8169        251.9631
      8. BOOTSTRAP (DATA):            236.0051        220.3723        254.0829
      
     Y0 =    250.0000
      1. INVERSE PREDICTION LIMITS:   299.2792        225.1549        374.7718
      2. GRAYBILL-IYER:               299.2792        225.1549        374.7718
      3. NETER-WASSERMAN-KUTNER:      299.2792        225.8776        372.6809
      4. PROPOGATION OF ERROR:        299.2792        185.8826        412.6759
      5. INVERSE (KRUTCHKOFF):        297.4785        225.7040        369.2529
      6. MAXIMUM LIKELIHOOD:          299.2792        283.0276        316.7070
      7. BOOTSTRAP (RESIDUALS):       299.2792        283.5742        316.0866
      8. BOOTSTRAP (DATA):            299.2792        283.3301        318.4212
      
     Y0 =    300.0000
      1. INVERSE PREDICTION LIMITS:   362.5534        289.2165        442.1447
      2. GRAYBILL-IYER:               362.5534        289.2164        442.1448
      3. NETER-WASSERMAN-KUTNER:      362.5534        287.5867        437.5200
      4. PROPOGATION OF ERROR:        362.5534        237.0930        488.0137
      5. INVERSE (KRUTCHKOFF):        354.3212        279.7673        428.8751
      6. MAXIMUM LIKELIHOOD:          362.5534        343.2002        387.2146
      7. BOOTSTRAP (RESIDUALS):       362.5534        345.3757        384.6494
      8. BOOTSTRAP (DATA):            362.5534        342.0918        388.3067
      
     ---------------------------------------------------------------------------

