MAKFIL can be used to generate files from relatively small sets of experimental data which
will be compatible with the SIMFIT format for graph plotting,
curve fitting, or generating standard curves for calibration analysis.
Large data sets can be pasted directly from your spreadsheet into SIMFIT programs or into
program MAKSIM to generate data files. Also macros simfit4.xls and simfit6.xls in the C:\Program Files\simfit\doc folder
can be used to create SIMFIT style data files from MS Excel.
The following summary describes the possibilities.
SIMFIT curve fitting programs need input files containing values of x(i), y(i), and s(i) for i = 1, 2, ..., n defined as follows.
WSSQ = {[y(1) - f(x(1))]/s(1)}^2 + {[y(2) - f(x(2))]/s(2)}^2 + ... + {[y(n) - f(x(n))]/s(n)}^2, and NDOF = number of points - number of parameters,with respect to the parameters in f(x), where f(.) is the model being fitted with k parameters, i.e.
f(x) = f(x|p(1), p(2), ..., p(k)).
Title (an informative title) n 3 (a n by 3 matrix) x(1), y(1), s(1) (first line of data) x(2), y(2), s(2) (second line of data) ... ... ... x(n), y(n), s(n) (last line of data) m (m lines of text) Text(1) (first line of text) Text(2) (second line of text) ... ... ... Text(m) (last line of text)
All curve-fitting is actually weighted either directly or by implicit assumption. With constant variance, the variance of y is independent of x and y, and it is legitimate to set all s = 1 to do unweighted regression. Unfortunately, this assumption is usually false. With constant relative error, the cv% i.e. coefficient of variation is independent of x but dependant on y, so it could be reasonable to set s(i) = cv%|y(i)|/100 for accurate y-values or s(i) = alpha|f(x(i))| if a correct model is known. Again this assumption or similar ones, e.g. s^2 = A + By^2 may not be justified. Possible cases and recommendations are:
As curve fitting and plotting programs need x in nondecreasing order, it is usual to check data on input. However there is also a dilution mode (as in immunological dose-response curves) for when you only know antibody concentrations up to an arbitrary factor and have to use dilutions, but to plot, fit, calibrate, etc. x must be supplied. So, e.g. with triplicate extremes and a doubling dilution scheme you might input a sequence like:
x-input = 1, 1, 1, 2, 4, 8, 16, 32, 32, 32and let the program rearrange and transform these values into
x-calculated = 1/32, 1/32, 1/32, 1/16, 1/8, 1/4, 1/2, 1, 1, 1.As an example, suppose the data input were for doubling dilution of an inhibitor, as follows
x-input y-input 1 10 2 20 2 20 4 40 4 40 4 40then the curve fitting file created would be rearranged with an extra column of s = 1 added, like this
x y s 0.25 40.0 1.0 0.25 40.0 1.0 0.25 40.0 1.0 0.50 20.0 1.0 0.50 20.0 1.0 1.00 10.0 1.0In other words, the data are rearranged into increasing order of x but, after fitting a model, the results can be plotted interactively in negative x-semilog space using powers of two to label the x-axis if required, i.e. in traditional doubling dilution space. You can also input x in arbitrary order but this is not wise as mistakes like 1, 2, 30, 4 instead of 1, 2, 3, 4 will be missed. As an example, here is the actual file that would be created for the previous doubling dilution example.
Doubling dilution data 6 3 2.5000E-01, 4.0000E+01, 1.0000E+00 2.5000E-01, 4.0000E+01, 1.0000E+00 2.5000E-01, 4.0000E+01, 1.0000E+00 5.0000E-01, 2.0000E+01, 1.0000E+00 5.0000E-01, 2.0000E+01, 1.0000E+00 1.0000E+00, 1.0000E+01, 1.0000E+00 1 Default line ... EOFNote that data files created by MAKFIL can use scientific notation as in this example but, as will be clear from browsing the SIMFIT test files, any reasonable notation can used if you create data files in text editors.
It is usual to input x and y then and accept s = 1 as default. However, if you wish to use weights you can input s-values as well as x and y values, set s-values to a constant, calculate s-values as percentages of y-values or calculate s-values as sample standard deviations from groups of replicates.
The best way to create hardcopy from the SIMFIT package is to make ASCII text data files to be used by the program SIMPLOT. For instance, output files from this program can be read into SIMPLOT to make simple (x,y) plots. However this program will also plot your data before writing the output file so you can easily detect points where you may have typed in wrong values. The main use for plotting options in this program is to check visually what you have typed in before making an output file.
The simple Simfit curve fitting programs such as POLNOM, MMFIT, SFFIT, EXFIT, HLFIT, GCFIT, etc. are dedicated to well-defined specialised models where the data supplied can be used to estimate sensible starting estimates and parameter limits. However, in order to fit data sets using the advanced Simfit curve fitting programs such as QNFIT and DEQSOL, users must supply files with an additional section after data defining the starting parameter estimates and limits. These values are necessary in order to scale the constrained nonlinear regression routines so that the internal parameters are of order unity at the solution point.
For instance. Suppose there are four parameters to be estimated and it is believed that the best-fit values would be something like
P(1) approximately = 1 P(2) approximately = 10 P(3) approximately = -100 P(4) approximately = 0.Then a section like the following would have to be added in order to run in EXPERT mode, where starting estimates and limits are read from the data file.
begin{limits} -5.0 1.0 5.0 5.0 10.0 15.0 -150.0 -100.0 -50.0 -10.0 0.0 10.0 end{limits}Program MAKFIL allows you to append such a section to the data file if you intend to use the Simfit advanced curve fitting programs to analyse your data. A default set is initialised for you to then edit as appropriate for your needs.