home *** CD-ROM | disk | FTP | other *** search
- DOCUMENTATION FOR THE CURVEFIT PROGRAM (Documentation File Updated 7/29/88)
- ───────────────────────────────────────────────────────────────────────────
-
- Introduction:
-
- ╔═══════════╦══════════════════════════════════════════════════════╦══════════╗
- ║ CURVEFIT ║ Version 2.11-A JULY 29, 1988 by Thomas S. Cox ║SHAREWARE ║
- ╠═══════════╩══════════════════════════════════════════════════════╩══════════╣
- ║ PURPOSE This program performs a least squares curve fit on X, Y data. ║
- ║ Curves for 25 equations are fitted. Equation coefficients, ║
- ║ Correlation Coefficient, and Best Fit are computed. For any ║
- ║ of the 25 equations, predictions for Y can be calculated. ║
- ║ ║
- ║ REFERENCE CURVE FITTING FOR PROGRAMMABLE CALCULATORS by William M. Kolb ║
- ║ Published by: IMTEC P. O. Box 1402 Bowie MD 20716 ║
- ║ ║
- ║ WARNING A 'LINEARIZING' technique is applied to various equations so ║
- ║ and the resulting equations are of the general form: Y=A=B*X ║
- ║ DISCLAIMER This means that sum of squares of errors in Y are not minimized,║
- ║ but the sum of squares of the linearized variable are minimized.║
- ║ ║
- ║ Linear, Parabolic, Cubic, and Hyperbolic equations are linear ║
- ║ in the parameters so this reservation does not apply to those ║
- ║ curves. Reservation applies to equations with LN, EXP or POWERS.║
- ║ ║
- ║ SHAREWARE If you use this program, a donation of $10 is requested. ║
- ╠═════════════════════════════════════════════════════════════════════════════╣
- ║ PROGRAM Compiled using Microsoft's Quick Basic Version 3.0 ║
- ║ ASCII source file is also supplied. ║
- ║ ║
- ║ ACCURACY: Double precision routines are used to insure ║
- ║ accuracy. No exponentiation routines are used. ║
- ║ ║
- ║ COMMENTS: IBM line graphics characters are used in this program. ║
- ║ ║
- ║ This implementation supports positive, negative and ║
- ║ zero values for X and Y. 255 points are permitted. ║
- ║ ║
- ║ This program uses the LOCATE command extensively for ║
- ║ improved ease of data entry and data changes. Printer ║
- ║ may be used with this program, but is not required. ║
- ║ ║
- ║ For equation 9, R squared is not computed. ║
- ║ No formula was given in the reference source. ║
- ║ ║
- ║ This program will automatically DELETE any blank or ║
- ║ null lines that are created at the top of a ║
- ║ LOTUS 1-2-3 .PRN file. ║
- ║ ║
- ╚═════════════════════════════════════════════════════════════════════════════╝
-
-
-
-
-
-
- Documentation for the CURVEFIT 2.11-B Program by Thomas S. Cox PAGE 1
-
-
- CURVEFIT 2.11-B by Thomas S. Cox 7/29/88
-
- Main Program Menu:
- ╔═══════════╦══════════════════════════════════════════════════════╦══════════╗
- ║ CURVEFIT ║ Version 2.11-B JULY 29, 1988 by Thomas S. Cox ║SHAREWARE ║
- ╠═══════════╩══════════╤═══════════════════════════════════════════╩══════════╣
- ║ QUICK BASIC 3.0 VERS.│ M A S T E R M E N U ║
- ╠═══════════╦══════════╪══════════════════════════════════════════════════════╣
- ║ SELECT ║ CHOICES │ BRIEF DESCRIPTION OF CHOICES ║
- ╠═════════╦═╬══════════╪══════════════════════════════════════════════════════╣
- ║ F1 ║ ║ ENTER │ New Data (X and Y values) ║
- ║ F2 ║ ║ LOAD │ A Previously Stored Data File ║
- ║ F3 ║ ║ ADD │ Data to Values of X and Y Currently in Memory ║
- ║ F4 ║ ║ DELETE │ or CHANGE Values of X and Y Currently in Memory ║
- ║ F5 ║ ║ LIST │ X and Y Values Currently in Memory ║
- ║ F6 ║ ║ CALCULATE│ Equation Coefficients (A, B, C, and R^2) ║
- ║ F7 ║ ║ PREDICT │ Value of Y, given Value of X ║
- ║ F8 ║ ║ SHOW │ LIST of EQUATIONS Fitted Using this Program ║
- ║ F9 ║ ║ REVIEW │ Equation Coefficients (A, B, C, R^2) ║
- ║ F10 ║ ║ DISPLAY │ List of SUMS and SUMS of SQUARES ║
- ║ SHFT F1 ║ ║ STORE │ X and Y Data Points to a DISK FILE ║
- ║ SHFT F2 ║ ║ EXIT │ Leave Program and EXIT to DOS ║
- ║ SHFT F3 ║ ║ BEST FIT │ Sorted by R² (Coefficients MUST have been calculated)║
- ║ SHFT F4 ║ ║ MONITOR │ Select COLOR or MONOCHROME (Default is COLOR + HERC) ║
- ╠═════════╩═╩══════════╧══════════════════════════════════════════════════════╣
- ║ Use UP or DOWN Arrows, Press ENTER to SELECT; or FUNCTION KEYS <ESC> to EXIT║
- ╚═════════════════════════════════════════════════════════════════════════════╝
-
- 1. ENTER New Data Clears out any previously entered data to prepare
- for new data entry.
- 2. LOAD Data Load previously stored data from a disk file. Over-
- writes any existing data. May use a comma or space
- separated file, LOTUS or SuperCalc PRN files, or files
- created by CURVEFIT.
- 3. ADD Data Add data to previously entered data. Once data are
- added, coefficients should be recalculated to reflect
- the effect of the additions.
- 4. CORRECTIONS Delete or Change any data point. Coefficients should
- be recalculated to reflect the effect of any changes.
- 5. LIST DATA Will show on screen or printer the current values of
- X and Y.
- 6. CALCULATE Calculates the equation coefficients and value of R².
- 7. PREDICT Enter a range of X values and equation number (1-25).
- Will calculate predicted value for Y.
- 8. SHOW Show on screen list of equations fitted using CURVEFIT.
- 9. REVIEW Show coefficients (A, B, C) and R².
- 10. LIST SUMS Lists all sums and sums of squares.
- 11. STORE Stores current X and Y data points to a disk file.
- 12. EXIT Leave program and exit to DOS. Option to save Data.
- 13. BEST FIT Shows equations sorted by value of R² for R²>0.10
- 14. MONITOR Choice of Color or Monochrome. Default is Color.
- If a color monitor is used, text is white on a blue
- background. Color choice also works with Hercules
- compatible cards. Monochrome choice is appropriate
- only with straight monochrome card.
-
- Documentation for the CURVEFIT 2.11-B Program by Thomas S. Cox PAGE 2
-
-
-
- CURVEFIT 2.11-B by Thomas S. Cox 7/29/88
-
- ╔═══════════════════════════════════════════════════════════════════════════╗
- ║ EQUATIONS FITTED USING THIS PROGRAM ║
- ╠════════════════════════════════════╦══════════════════════════════════════╣
- ║ 1. Y=A+B*X STR. LINE ║ 2. Y=B*X LINE THRU ORG. ║
- ║ 3. Y=1/(A+B*X) REC. STR LINE ║ 4. Y=A+B*X+C/X LIN AND RECIP. ║
- ║ 5. Y=A+B/X HYPERBOLA ║ 6. Y=X/(A*X+B) RECIP HYPERBOLA ║
- ║ 7. Y=A+B/X+C/X*X 2ND ORD HYP ║ 8. Y=A+B*X+C*X*X PARABOLA ║
- ║ 9. Y=A*X+B*X*X PAR AT ORIGIN ║ 10. Y=A*X^B POWER ║
- ║ 11. Y=A*B^X MOD. POWER ║ 12. Y=A*B^(1/X) ROOT ║
- ║ 13. Y=A*X^(B*X) SUPER GEOMET. ║ 14. Y=A*X^(B/X) MOD GEOMETRIC ║
- ║ 15. Y=A*e^(B*X) EXPONENTIAL ║ 16. Y=A*e^(B/X) MOD EXPONENTIAL ║
- ║ 17. Y=A+B*ln(X) LOGARITHMIC ║ 18. Y=1/(A+B*ln(X)) RECIP LOG ║
- ║ 19. Y=A*B^X*X^C HOERL FUNCTION ║ 20. Y=A*B^(1/X)*X^C MOD HOERL ║
- ║ 21. Y=A*e^(((X-B)^2/)/C) NORMAL ║ 22. Y=A*e^((ln(X)-B)^2/C) LOG NORMAL║
- ║ 23. Y=A*X^B*(1-X)^C BETA ║ 24. Y=A*(X/B)^C*e^(X/B) GAMMA ║
- ║ 25. Y=1/(A*(X+B)^2+C) CAUCHY ║ ║
- ╠════════════════════════════════════╩══════════════════════════════════════╣
- ║ NOTES: A. Values of X and Y may be positive, negative, or zero ║
- ║ B. Only 255 values of X and Y can be used. ║
- ╠═══════════════════════════════════════════════════════════════════════════╣
- ║ Press <RETURN> to continue program execution ║
- ╚═══════════════════════════════════════════════════════════════════════════╝
- Note: Equations 19 and 24 and Equations 12 and 16 are essentially identical.
-
- BRIEF EXPLANATION OF EQUATIONS:
-
- 1. Straight Line Full Accuracy Least Squares
- 2. Straight Line through the Origin Full Accuracy Least Squares
- 3. Reciprocal of Straight Line Full Accuracy Least Squares
- 4. Combined Linear and Reciprocal Full Accuracy Least Squares
- 5. Hyperbola Full Accuracy Least Squares
- 6. Reciprocal of a Hyperbola Full Accuracy Least Squares
- 7. Second Order Hyperbola Full Accuracy Least Squares
- 8. Parabola Full Accuracy Least Squares
- 9. Parabola Through Origin Full Accuracy Least Squares
- 10. Power LINEARIZED
- 11. Modified Power LINEARIZED
- 12. Root (Modification of Modified Power) LINEARIZED
- 13. Super Geometric LINEARIZED
- 14. Modified Geometric LINEARIZED
- 15. Exponential LINEARIZED
- 16. Modified Exponential (Similar to Root) LINEARIZED
- 17. Logarithmic LINEARIZED
- 18. Reciprocal of Logarithmic LINEARIZED
- 19. Hoerl's Equation LINEARIZED
- 20. Modified Hoerl's Equation LINEARIZED
- 21. Normal Distribution (Gaussian) LINEARIZED
- 22. Log Normal LINEARIZED
- 23. Beta Distribution (0<X<1) LINEARIZED
- 24. Gamma Distribution LINEARIZED
- 25. Cauchy Distribution LINEARIZED
-
-
-
-
- Documentation for the CURVEFIT 2.11-B Program by Thomas S. Cox PAGE 3
-
-
-
- CURVEFIT 2.11-B by Thomas S. Cox 7/29/88
-
- LISTING OF SUMS AND SUMS OF SQUARES (DEFINITION)
-
- The array R() is used to hold these values. The contents are:
-
- R(16)=R(16)+X(I) Note: R(1) through R(15)
- R(17)=R(17)+X(I)*X(I) are not used by this
- R(18)=R(18)+Y(I) program.
- R(19)=R(19)+Y(I)*Y(I)
- R(20)=R(20)+X(I)*Y(I)
- R(21)=I
- R(22)=R(22)+(1/X(I))
- R(23)=R(23)+(1/(X(I)*X(I)))
- R(24)=R(24)+(1/(Y(I)))
- R(25)=R(25)+(1/(Y(I)*Y(I)))
- R(26)=R(26)+(1/(Y(I)*X(I)))
- R(27)=I
- R(28)=R(28)+LOG(X(I))
- R(29)=R(29)+(LOG(X(I)))^2
- R(30)=R(30)+(LOG(Y(I)))
- R(31)=R(31)+(LOG(Y(I)))^2
- R(32)=R(32)+(LOG(X(I)))*(LOG(Y(I)))
- R(33)=I
- R(34)=R(34)+(X(I)/Y(I))
- R(35)=R(35)+(Y(I)/X(I))
- R(36)=R(36)+(X(I)^2)*Y(I)
- R(37)=R(37)+(X(I)^2)/Y(I)
- R(38)=R(38)+(Y(I)/X(I)^2)
- R(39)=R(39)+X(I)*Y(I)^2
- R(40)=R(40)+X(I)^3
- R(41)=R(41)+1/(X(I)^3)
- R(42)=R(42)+Y(I)^3
- R(43)=R(43)+X(I)^4
- R(44)=R(44)+1/(X(I)^4)
- R(45)=R(45)+LOG(X(I))/X(I)
- R(46)=R(46)+X(I)*LOG(Y(I))
- R(47)=R(47)+LOG(Y(I))/X(I)
- R(48)=R(48)+X(I)*LOG(X(I))
- R(49)=R(49)+(X(I)*LOG(X(I)))^2
- R(50)=R(50)+X(I)*LOG(X(I))*LOG(Y(I))
- R(51)=R(51)+Y(I)*LOG(X(I))
- R(52)=R(52)+LOG(X(I))/Y(I)
- R(53)=R(53)+((LOG(X(I))/X(I)))^2
- R(54)=R(54)+X(I)^2*LOG(Y(I))
- R(55)=R(55)+(LOG(X(I)))^3
- R(56)=R(56)+(LOG(X(I)))^4
- R(57)=R(57)+(LOG(X(I))^2)*LOG(Y(I))
- R(58)=R(58)+(LOG(Y(I))*LOG(X(I)))/X(I)
- R(59)=R(59)+LOG(1-X(I))
- R(60)=R(60)+(LOG(1-X(I)))^2
- R(61)=R(61)+LOG(X(I))*LOG(1-X(I))
- R(62)=R(62)+LOG(Y(I))*LOG(1-X(I))
- R(63)=R(63)+(LOG(X(I)))/X(I)
-
-
-
- Documentation for the CURVEFIT 2.11-B Program by Thomas S. Cox PAGE 4
-
-
-
- CURVEFIT 2.11-B by Thomas S. Cox 7/29/88
-
-
- EXAMPLE DATA ENTRY SCREEN
- ╔═══════════╦═══════════════════════════════════════════════════════╦═════════╗
- ║ CURVEFIT ║ Version 2.11-B JULY 30, 1988 by Thomas S. Cox ║SHAREWARE║
- ╠═══════════╩═══════════════════════════════════════════════════════╩═════════╣
- ║ DATA ENTRY SCREEN| Press <ESC> for X or Y to Terminate Data Entry ║
- ╟───┬──────────┬──────────┬───┬──────────┬──────────┬───┬──────────┬──────────╢
- ║PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE ║
- ╟───┼──────────┼──────────┼───┼──────────┼──────────┼───┼──────────┼──────────╢
- ║ 1│ 2.0000│ 3.1234│ │ │ │ │ │ ║
- ║ 2│ 3.1234│ 5.0000│ │ │ │ │ │ ║
- ║ 3│ 3.0000│ 4.7679│ │ │ │ │ │ ║
- ║ 4│ 5.0000│ 7.0000│ │ │ │ │ │ ║
- ║ 5│ 6.0000│ 9.0000│ │ │ │ │ │ ║
- ║ 6│ 9.0000│ 12.0000│ │ │ │ │ │ ║
- ║ 7│ 10.0000│ 15.0000│ │ │ │ │ │ ║
- ║ 8│ 11.0000│ 17.0000│ │ │ │ │ │ ║
- ║ 9│ 12.0000│ 17.0000│ │ │ │ │ │ ║
- ║ 10│ 10.0000│ 21.0000│ │ │ │ │ │ ║
- ║░░░│░░░░░░░░░░│░░░░░░░░░░│ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ╠═══╧════════╦═╧═════════╦╧═══╧══╦═══════╧═════╦════╧══╦╧══════════╧══════════╣
- ║ ENTER DATA ║PT # 11 ║X VALUE║ ? ░░░░░░░░░ ║Y VALUE║ 21 ║
- ╚════════════╩═══════════╩═══════╩═════════════╩═══════╩══════════════════════╝
-
- EXAMPLE DATA ADDITION SCREEN
- ╔═══════════╦═══════════════════════════════════════════════════════╦═════════╗
- ║ CURVEFIT ║ Version 2.11-B JULY 30, 1988 by Thomas S. Cox ║SHAREWARE║
- ╠═══════════╩═══════════════════════════════════════════════════════╩═════════╣
- ║ DATA ADDITION| Press <ESC> for X or Y to Terminate Data Entry ║
- ╟───┬──────────┬──────────┬───┬──────────┬──────────┬───┬──────────┬──────────╢
- ║PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE ║
- ╟───┼──────────┼──────────┼───┼──────────┼──────────┼───┼──────────┼──────────╢
- ║ 1│ 199234.25│ 12.0000│ │ │ │ │ │ ║
- ║ 2│ 235439.98│ 14.0000│ │ │ │ │ │ ║
- ║ 3│ 332456.79│ 14.2354│ │ │ │ │ │ ║
- ║ 4│ 434532.56│ 16.2345│ │ │ │ │ │ ║
- ║ 5│ 567789.34│ 19.0000│ │ │ │ │ │ ║
- ║ 6│ 678905.00│ 21.4356│ │ │ │ │ │ ║
- ║ 7│ 745678.00│ 24.0000│ │ │ │ │ │ ║
- ║ 8│ 898324.21│ 26.0000│ │ │ │ │ │ ║
- ║ 9│ 902345.00│ 26.0125│ │ │ │ │ │ ║
- ║ 10│ 998123.00│ 27.0000│ │ │ │ │ │ ║
- ║░░░│░░░░░░░░░░│░░░░░░░░░░│ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ╠═══╧════════╦═╧═════════╦╧═══╧══╦═══════╧═════╦════╧══╦╧══════════╧══════════╣
- ║ ENTER DATA ║PT # 11║X VALUE║ ? ░░░░░░░░░ ║Y VALUE║ ║
- ╚════════════╩═══════════╩═══════╩═════════════╩═══════╩══════════════════════╝
-
- Documentation for the CURVEFIT 2.11-B Program by Thomas S. Cox PAGE 5
-
-
-
- CURVEFIT 2.11-B by Thomas S. Cox 7/29/88
-
- EXAMPLE DATA CORRECTION SCREEN
- ╔═══════════╦═══════════════════════════════════════════════════════╦═════════╗
- ║ CURVEFIT ║ Version 2.11-B JUNE 6, 1988 by Thomas S. Cox ║SHAREWARE║
- ╠═══════════╩═══════════════════════════════════════════════════════╩═════════╣
- ║ DATA CORRECTION| <ESC> for Data # to Terminate; 'D' or 'd' for X or Y to DEL║
- ╟───┬──────────┬──────────┬───┬──────────┬──────────┬───┬──────────┬──────────╢
- ║PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE ║
- ╟───┼──────────┼──────────┼───┼──────────┼──────────┼───┼──────────┼──────────╢
- ║ 1│ 199234.25│ 12│ │ │ │ │ │ ║
- ║ 2│ 235439.98│ 14│ │ │ │ │ │ ║
- ║ 3│ 332456.79│ 14.2354│ │ │ │ │ │ ║
- ║ 4│ 434532.56│ 16.2345│ │ │ │ │ │ ║
- ║ 5│ 567789.34│ 19│ │ │ │ │ │ ║
- ║ 6│ 678905│ 21.4356│ │ │ │ │ │ ║
- ║ 7│ 745678│ 24│ │ │ │ │ │ ║
- ║ 8│ 898324.21│ 26│ │ │ │ │ │ ║
- ║ 9│ 902345│ 26.0125│ │ │ │ │ │ ║
- ║ 10│ 998123│ 27│ │ │ │ │ │ ║
- ║░░░│░░░░░░░░░░│░░░░░░░░░░│ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ╠═══╧════════╦═╧═════════╦╧═══╧══╦═══════╧═════╦════╧══╦╧══════════╧══════════╣
- ║ ENTER DATA ║PT # ? ║X VALUE║ ║Y VALUE║ ║
- ╚════════════╩═══════════╩═══════╩═════════════╩═══════╩══════════════════════╝
-
- EXAMPLE DATA LISTING SCREEN
- ╔═══════════╤═══════════════════════════════════════════════════════╤═════════╗
- ║ CURVEFIT │ DATA LIST OF X AND Y VALUES NOW IN MEMORY │SHAREWARE║
- ╟───┬───────┴──┬──────────┬───┬──────────┬──────────┬───┬──────────┬┴─────────╢
- ║PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE │PT#│ X VALUE │ Y VALUE ║
- ╟───┼──────────┼──────────┼───┼──────────┼──────────┼───┼──────────┼──────────╢
- ║ 1│ 199234.25│ 12.0000│ │ │ │ │ │ ║
- ║ 2│ 235439.98│ 14.0000│ │ │ │ │ │ ║
- ║ 3│ 332456.79│ 14.2354│ │ │ │ │ │ ║
- ║ 4│ 434532.56│ 16.2345│ │ │ │ │ │ ║
- ║ 5│ 567789.34│ 19.0000│ │ │ │ │ │ ║
- ║ 6│ 678905.00│ 21.4356│ │ │ │ │ │ ║
- ║ 7│ 745678.00│ 24.0000│ │ │ │ │ │ ║
- ║ 8│ 898324.21│ 26.0000│ │ │ │ │ │ ║
- ║ 9│ 902345.00│ 26.0125│ │ │ │ │ │ ║
- ║ 10│ 998123.00│ 27.0000│ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ │ │ ║
- ╚═══╧══════════╧══════════╧═══╧══════════╧══════════╧═══╧══════════╧══════════╝
-
- Documentation for the CURVEFIT 2.11-B Program by Thomas S. Cox PAGE 6
-
-
-
- CURVEFIT 2.11-B by Thomas S. Cox 7/29/88
-
-
- EXAMPLE CALCULATE AND REVIEW COEFFICIENTS SCREEN
- ╔═══════════╦════════════════════════════════════╦════════════════════════════╗
- ║ CURVEFIT ║ LISTING OF CALCULATED COEFFICIENTS ║ BEST FIT EQUATION IS # 1 ║
- ╠════╤══════╩═════╤════════════╤════════════╤════╩═╤══════╤═══════════════════╣
- ║EQ #│ 'A' COEF. │ 'B' COEF. │ 'C' COEF. │ R² │R² COR│ EQUATION OF CURVE ║
- ╟────┼────────────┼────────────┼────────────┼──────┼──────┼───────────────────╢
- ║ 1 │ 8.4129│ 0.0000│ 0.0000│0.9863│0.9845│Y=A+B*X ║
- ║ 2 │ 0.0000│ 0.0000│ 0.0000│0.0000│0.0000│Y=B*X ║
- ║ 3 │ 0.0874│ -0.0000│ 0.0000│0.9480│0.9415│Y=1/(A+B*X) ║
- ║ 4 │ 7.5737│ 0.0000│ 170373.7317│0.9865│0.9827│Y=A+B*X+C/X ║
- ║ 5 │ 28.0942│-3.62127D+06│ 0.0000│0.8232│0.8012│Y=A+B/X ║
- ║ 6 │ 0.0290│ 11240.0436│ 0.0000│0.9255│0.9162│Y=X/(A*X+B) ║
- ║ 7 │ 37.3358│-1.23010D+07│ 1.49430D+12│0.9663│0.9567│Y=A+B/X+C/X*X ║
- ║ 8 │ 8.2991│ 0.0000│ -0.0000│0.9863│0.9824│Y=A+B*X+C*X*X ║
- ║ 9 │ 0.0001│ -0.0000│ 0.0000│0.0000│0.0000│Y=A*X+B*X*X ║
- ║ 10 │ 0.0242│ 0.5070│ 0.0000│0.9683│0.9644│Y=A*X^B ║
- ║ 11 │ 10.4724│ 1.0000│ 0.0000│0.9766│0.9737│Y=A*B^X ║
- ║ 12 │ 29.9278│ 0.0000│ 0.0000│0.8804│0.8655│Y=A*B^(1/X) ║
- ║ 13 │ 10.8476│ 0.0000│ 0.0000│0.9741│0.9709│Y=A*X^(B*X) ║
- ║ 14 │ 31.1770│ -16802.8276│ 0.0000│0.8899│0.8761│Y=A*X^(B/X) ║
- ║ 15 │ 10.4724│ 0.0000│ 0.0000│0.9766│0.9737│Y=A*e^(B*X) ║
- ║ 16 │ 29.9278│-197591.3563│ 0.0000│0.8804│0.8655│Y=A*e^(B/X) ║
- ╟────┼────────────┼────────────┼────────────┼──────┼──────┼───────────────────╢
- ║BEST│ 8.4129│ 0.0000│ 0.0000│0.9863│0.9845│Y=A+B*X ║
- ╚════╧════════════╧════════════╧════════════╧══════╧══════╧═══════════════════╝
-
- EXAMPLE DATA PREDICTION SCREEN VERSION 2.11-B
- ╔═══════════╦═════════════╤═════╤══════╤════════════════════════════╦═════════╗
- ║ CURVEFIT ║ PREDICTIONS │ EQ# │ 20 │ Y=A*B^(1/X)*X^C ║VER 2.11B║
- ╠═══════╤═══╩═════════════╪═════╧╤═════╧═══════════╤══════╤═════════╩═════════╣
- ║ START │ 1 │ STOP │ 46 │ STEP │ .93 ║
- ╟───────┴────┬────────────┼──────┴─────┬───────────┴┬─────┴──────┬────────────╢
- ║X-DATA ENTRY│PREDICTED Y │X-DATA ENTRY│PREDICTED Y │X-DATA ENTRY│PREDICTED Y ║
- ╟────────────┼────────────┼────────────┼────────────┼────────────┼────────────╢
- ║ 1.0000│ 1.8395│ 14.0200│ 16.2888│ 27.0400│ 30.8502║
- ║ 1.9300│ 2.8013│ 14.9500│ 17.3293│ 27.9700│ 31.8898║
- ║ 2.8600│ 3.8198│ 15.8800│ 18.3698│ 28.9000│ 32.9294║
- ║ 3.7900│ 4.8511│ 16.8100│ 19.4102│ 29.8300│ 33.9689║
- ║ 4.7200│ 5.8872│ 17.7400│ 20.4505│ 30.7600│ 35.0083║
- ║ 5.6500│ 6.9255│ 18.6700│ 21.4908│ 31.6900│ 36.0477║
- ║ 6.5800│ 7.9648│ 19.6000│ 22.5310│ 32.6200│ 37.0870║
- ║ 7.5100│ 9.0048│ 20.5300│ 23.5712│ 33.5500│ 38.1263║
- ║ 8.4400│ 10.0452│ 21.4600│ 24.6112│ 34.4800│ 39.1655║
- ║ 9.3700│ 11.0857│ 22.3900│ 25.6512│ 35.4100│ 40.2046║
- ║ 10.3000│ 12.1263│ 23.3200│ 26.6912│ 36.3400│ 41.2438║
- ║ 11.2300│ 13.1669│ 24.2500│ 27.7310│ 37.2700│ 42.2828║
- ║ 12.1600│ 14.2076│ 25.1800│ 28.7708│ 38.2000│ 43.3218║
- ║ 13.0900│ 15.2482│ 26.1100│ 29.8106│ 39.1300│ 44.3608║
- ╟────────────┴───┬────────┴───────┬────┴───────────┬┴────────────┴──┬─────────╢
- ║ Coefficients │A= 1.1282 │B= 1.6304 │C= 0.9979 │R²=0.9861║
- ╚════════════════╧════════════════╧════════════════╧════════════════╧═════════╝
-
- Documentation for the CURVEFIT 2.11-B Program by Thomas S. Cox PAGE 7
-
-
-
- CURVEFIT 2.1A-A by Thomas S. Cox 7/29/88
-
- Example of BEST FIT Screen (Version 2.11-B)
- ╔═══════════╦═══════════════════════════════════════════════════╦═════════════╗
- ║ CURVEFIT ║ SORTED LISTING OF EQUATIONS for CORRECTED R² >0.10║VERSION 2.11B║
- ╠════╤══════╩═════╤════════════╤════════════╤══════╤══════╤═════╩═════════════╣
- ║EQ #│ 'A' COEF. │ 'B' COEF. │ 'C' COEF. │ R² │R² COR│ EQUATION OF CURVE ║
- ╟────┼────────────┼────────────┼────────────┼──────┼──────┼───────────────────╢
- ║ 1 │ 8.4129│ 0.0000│ 0.0000│0.9863│0.9845│Y=A+B*X ║
- ║ 4 │ 7.5737│ 0.0000│ 170373.7317│0.9865│0.9827│Y=A+B*X+C/X ║
- ║ 8 │ 8.2991│ 0.0000│ -0.0000│0.9863│0.9824│Y=A+B*X+C*X*X ║
- ║ 21 │ 34.4751│1689809.6167│-2.16817D+12│0.9855│0.9813│Y=A*e^(((X-B)^2)/C)║
- ║ 22 │ 11.2436│ 11.3964│ 6.4227│0.9844│0.9799│Y=A*e^((lnX-B)^2/C)║
- ║ 24 │ 16.7261│1621200.2364│ 0.2038│0.9830│0.9782│Y=A*(X/B)^C*e^(x/b)║
- ║ 19 │ 0.9080│ 1.0000│ 0.2038│0.9830│0.9782│Y=A*B^X*X^C ║
- ║ 25 │ 0.0000│-1.14965D+06│ 0.0354│0.9810│0.9756│Y=1/(A*(X+B)^2+C) ║
- ║ 18 │ 0.4264│ -0.0283│ 0.0000│0.9775│0.9747│Y=1/(A+B*lnX) ║
- ║ 15 │ 10.4724│ 0.0000│ 0.0000│0.9766│0.9737│Y=A*e^(B*X) ║
- ║ 11 │ 10.4724│ 1.0000│ 0.0000│0.9766│0.9737│Y=A*B^X ║
- ║ 13 │ 10.8476│ 0.0000│ 0.0000│0.9741│0.9709│Y=A*X^(B*X) ║
- ║ 10 │ 0.0242│ 0.5070│ 0.0000│0.9683│0.9644│Y=A*X^B ║
- ║ 7 │ 37.3358│-1.23010D+07│ 1.49430D+12│0.9663│0.9567│Y=A+B/X+C/X*X ║
- ║ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ ║
- ║ │ │ │ │ │ │ ║
- ╚════╧════════════╧════════════╧════════════╧══════╧══════╧═══════════════════╝
-
- MISCELLANEOUS NOTES:
-
-
- 1. LISTING DATA Will show 54 data points per screen. To view
- next 54 data points, press <ENTER>.
-
- 2. ADD DATA When reading data into screen array, program
- will show latest, that is the highest numbered,
- set of 42 data points. Prompt for PT# will be
- for one data point higher than currently existing
- number of data points. Entering <ESC> for X or Y
- will terminate additions.
-
- 3. DELETE DATA Screen will look similar to ADDITION screen.
-
- IMPORTANT NOTE: If 'S' is stored as a DATAPOINT,
- that point will be last one
- recognized, even if there is more
- valid data. Always exit from
- this routine by entering <ESC> for any
- data point number.
-
-
- To change data, just enter point number and the new
- values for X and Y.
-
- Documentation for the CURVEFIT 2.11-B Program by Thomas S. Cox PAGE 8
-
-
-
- CURVEFIT 2.11-B by Thomas S. Cox 7/29/88
-
- 4. DATA FILES Program will read a file that has blank lines in it such
- WITH BLANK as might be created with a word-processing program.
- LINES CURVEFIT will insert 'DEL' at the appropriate places and
- delete them at the time of listing data or calculating
- equation coefficients. Data file will automatically be
- condensed to fill slots occupied by 'DEL'.
-
- 5. COMPILED VS The source code used to create the COMPILED version of
- INTERPRETER CURVEFIT should, at least in theory, function the same
- using INTREPETER BASIC. It does not. There are various
- places where the source code used with CURVEFIT will crash
- including using FUNCTION KEYS for option selection and
- data formatting.
-
- 6. MONITOR Program is known to work satisfactorily with Hercules
- compatible video cards, CGA cards, and EGA cards.
- MONOCHROME option from program is needed for some video
- cards. With color monitors, color is high intensity white
- on blue.
-
- 7. COMPILER When compiled with Microsoft's QUICK BASIC 3.0 the options
- OPTIONS to use are: /O /X /E /S.
-
- 8. OPTION If the cursor keys are used to select options, it doesn't
- SELECTION matter whether or not the NUMBER-LOCK function is active
- WITH CURSOR since the program will also use 8 for the up arrow and 2
- KEYS for the down arrow.
-
- 9. MEANING OF This occurs particularly for equation #2 as there was no
- R^2 = ZERO listing in the source material of a formula for this
- value. It is listed as zero to indicate that value was
- not calculated.
-
- 10. MEANING OF Some equations do not use C. For those equations, C is
- C = ZERO listed as zero.
-
- 11. MEANING OF For some data sets a number of the 25 equations used in
- A, B, and C this program are not usable. In those cases, values
- = ZERO of A, B, and C are all set to zero.
-
- 12. NUMBER OF This program will handle up to 255 data points.
- DATA POINTS
-
- 13. DATA DISPLAY ENTER DATA routine shows numbers with as much precision as
- possible. Depending on magnitude of data, it will be
- displayed using one of the following formats
- #####.####, #######.##, or ##.##^^^^
-
- LIST DATA and ADD DATA format is the same as for ENTER DATA
-
- DELETE or CORRECT routine shows the 10 left-most digits of
- number. This is particularly useful for looking at small
- numbers such as 0.002345, etc. Note that using the DELETE
- of CORRECT routine to look at data does not necessarily
- require one to delete or correct data. Data are right
- justified within the 10 character limitation.
-
- Documentation for the CURVEFIT 2.11-B Program by Thomas S. Cox PAGE 9
-
-
-
- CURVEFIT 2.11-B by Thomas S. Cox 7/29/88
-
- 14. COEFFICIENT This routine shows data either in the #######.#### or
- LISTING ##.#####^^^^ format depending on the number to be
- displayed. In any case, up to 12 spaces will be allowed
- for this number.
-
- 15. PREDICTION Same format for data display as for COEFFICIENT LISTING.
-
- 16. DATA LISTING No specific formatting routine is used so that all digits
- TO PRINTER are output.
-
- 17. TRACKING DATA To aid in keeping track of where data will be entered a
- ENTRY ON block of ░░░░░░░░░░░░░░ will mark the place.
- SCREEN
- The last X and Y values entered will still be displayed
- at the bottom of the screen. For example, for entering
- data point #2, the value of Y1 will still be displayed as
- the Y entry. Important Note: It is not possible to enter
- a series of data points that are the same value as the
- previous entry by pressing ENTER. Each data point MUST
- be individually entered. Pressing ENTER will give the
- value 'DEL'.
-
- If data is entered using the DATA ENTER option and there
- are 'DEL' entries, these can be seen by calling up the
- DELETE routine. LIST Data routine automatically packs
- data and removes any DEL entries.
-
- 18. DATA FILE Data is stored as two columns of X and Y data such that
- STORAGE it may be read back into a program such as LOTUS, NWA
- FORMAT STATPAK, or the SHAREWARE program, CFIT.
-
- 19. DATA FILE Naturally will read data in format used for Storage,
- FORMAT one column of data with alternating X and Y values,
- READABLE either of the above with leading blank lines or inter-
- spersed blank lines.
-
- 20. BEST FIT Based on the value of R^2 corrected to account for
- degrees of freedom. Sorted by decreasing value of R^2.
-
- 21. REFERENCE CURVE FITTING for PROGRAMMABLE CALCULATORS
- by William M. Kolb
- PUBLISHED by IMTEC P. O. Box 1402 Bowie, MD 20716
-
- This reference gives a full explanation of the equations
- used in this program and includes excellent graphs
- showing the shapes of curves described by these equations.
-
- A program specifically for the HP-41CV that fits 19 of the
- 25 equations of CURVEFIT is listed along with barcode for
- easy entry of program into HP-41.
-
- 22. FILES CURVEFIT.BAS (ASCII Source File)
- SUPPLIED WITH CURVEFIT.EXE Executable file compiled using Microsoft's
- CURVEFIT Quick Basic Version 3.0
- CURVEFIT.DOC This documentation file
- EX *.* Example Data Files
-
-
- Documentation for the CURVEFIT program by Thomas S. Cox Page 10
-
-
-
-
- CURVEFIT 2.11-B by Thomas S. Cox 7/29/88
-
-
-
- SHAREWARE
- =========
- This program is SHAREWARE. That means that if you use it, a small donation
- of $10.00 is requested by the author.
-
- Program may be freely copied and distributed so long as there is no more than
- a $10.00 copying and handling charge. Also, the program should be distributed
- with no alterations to the files. The documentation files and example files
- must be included with program.
-
- Feel free to place this program on any bulletin board system. The size of
- files would probably make this prohibitive but if files were squeezed or
- archived might be more practical.
-
- The functioning of this program and the calculation of the coefficients
- has not changed significantly since the first edition of the IBM version
- was first published about July of 1985. Changes have been made to
- improve the user interface and improve the data entry and data lists.
-
- The author welcomes any comments and suggestions.
-
- The author is:
-
- Thomas S. Cox
- 102 Evergreen Street
- Easley, SC 29640
-
-
- Note: Late change 4/4/88 information supplied by Jim Cargal on estimating the
- value of R^2 for equation #2. This has been incorporated into program.
-
- Listings for EQ #12 were previously in error as they did not show the
- A coefficient. This has been corrected. Calculations and predictions
- were correct.
-
- Added routine on 4/8/88 to allow storage of predicted values to a
- Disk file.
-
- Changed data entry, addition, and correction routines on 6/6/88 to allow
- using <ESC> to terminate data entry.
-
- Improper initialization of A, B, C, R^2, and RC^2 corrected 7/5/88.
-
- End of Document File 7/29/88
-
-
- Documentation for the CURVEFIT 2.10-V Program by Thomas S. Cox PAGE 11
-