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 Dataplot Pages

Dataplot Solution to the Non-Linear Fitting Problem

Problem Setup An analyst has a data set consisting of (x,y) pairs. Read the data into the computer. Plot them. Carry out a non-linear fit for the model
    y = exp(-alpha*x)/(a+b*x)
Generate a superimposed plot of raw data and predicted values from the fit. Generate a plot of residuals versus x. Generate a normal probability plot of the residuals.
Dataplot Code This is demonstrated with the built-in data file CHWIRUT1.DAT (stored in the Dataplot auxiliary directory). The following Dataplot program
    SKIP 25
    READ CHWIRUT1.DAT Y X
    TITLE AUTOMATIC
    PLOT Y X
    .
    LET A = 0.01
    LET B = 0.01
    LET ALPHA = 0.1
    FIT Y = EXP(-ALPHA*X)/(A+B*X)
    .
    CHARACTERS X BLANK
    LINES BLANK SOLID
    PLOT Y PRED VS X
    PLOT RES X
    NORMAL PROBABILITY PLOT RES
Plot of Raw Data generated the following output

Plot of original data

Fit Output
LEAST SQUARES NON-LINEAR FIT
      SAMPLE SIZE N =      214
      MODEL--Y =EXP(-ALPHA*X)/(A+B*X)
      REPLICATION CASE
      REPLICATION STANDARD DEVIATION =     0.3281762600D+01
      REPLICATION DEGREES OF FREEDOM =         192
      NUMBER OF DISTINCT SUBSETS     =          22
 
ITERATION  CONVERGENCE  RESIDUAL  *  PARAMETER
 NUMBER      MEASURE    STANDARD  *  ESTIMATES
                        DEVIATION *
----------------------------------*-----------
    1--  0.10000E-01  0.72640E+01 * 0.10000E+00 0.10000E-01 0.10000E-01
    2--  0.50000E-02  0.40184E+01 * 0.12438E+00 0.41130E-02 0.13518E-01
    3--  0.25000E-02  0.33689E+01 * 0.18239E+00 0.60968E-02 0.10633E-01
    4--  0.12500E-02  0.33617E+01 * 0.18967E+00 0.61251E-02 0.10549E-01
 
  FINAL PARAMETER ESTIMATES           (APPROX. ST. DEV.)    T VALUE
 1  ALPHA               0.190378       (0.2203E-01)          8.6
 2  A                   0.613290E-02   (0.3495E-03)          18.
 3  B                   0.105271E-01   (0.8027E-03)          13.
 
      RESIDUAL    STANDARD DEVIATION =         3.3616721630
      RESIDUAL    DEGREES OF FREEDOM =         211
      REPLICATION STANDARD DEVIATION =         3.2817625999
      REPLICATION DEGREES OF FREEDOM =         192
      LACK OF FIT F RATIO =       1.5474 = THE  92.6461% POINT OF THE
      F DISTRIBUTION WITH     19 AND    192 DEGREES OF FREEDOM
 
 
      COEF AND SD(COEF) WRITTEN TO FILE DPST1F.DAT
      
Plot of Predicted Values with Raw Data Plot of predicted values with raw data
Run Sequence Plot of Residuals Run sequence plot of residuals
Normal Probability Plot of Residuals Normal probability plot of residuals

Privacy Policy/Security Notice
Disclaimer | FOIA

NIST is an agency of the U.S. Commerce Department.

Date created: 06/05/2001
Last updated: 09/28/2016

Please email comments on this WWW page to alan.heckert@nist.gov.