# Frequently Asked Questions

- What is the Simfit package ?
- What statistical functions are provided ?
- What curve fitting procedures are available ?
- What types of graphs can be plotted ?
- What calculations can be done ?
- What simulation techniques are suported ?
- What documentation describes the package ?
- How do I install the Simfit package ?
- How do get help and advice ?
- Back to Summary
- Back to Help Menu
- End Help

# What is the Simfit package ?

Simfit is a computer package for simulation, statistical analysis, curve fitting and graph plotting using models from a compiled library or from ASCII text files supplied by the user. It can be used for teaching the principles of curve fitting, simulation and statistical analysis to students, but it will be found most useful by those interested in serious data analysis and creating professional, publication quality scientific graphs. Simfit is a collection of forty separate programs, each dedicated to a particular area of data analysis, but the package is run seamlessly from a program manager called w_simfit.exe (32bit), or x64_simfit.exe (64bit), that has facilities for browsing and printing files. Data can be formatted by special (intelligent) editors which can check for positive values, values in increasing order, sensible weighting factors, etc. or you can copy tables to the clipboard from any Windows application, then paste them into any Simfit program. Macros such as simfit6.xls are provided to create correctly formatted data files from data held in Microsoft Office Excel format.
Back to Frequently asked questions, Summary, Help Menu or End Help

# What statistical functions are provided ?

All the usual descriptive statistics (bar charts, histograms, best-fit distributions on sample cdfs, dendrograms, box and whisker or cluster plots), multivariate statistics (distance matrices and dendrograms, principal components and scree plots), time series (ACF, PACF, ARIMA) and frequently used tests (mostly with exact p values not the normal approximations), such as:

- chi-square (O/E vectors, m by n contingency tables and wssq/ndof)
- McNemar test on n by n frequency tables
- Cochran Q test
- Fisher exact (2 by 2 contingency table) with all p values
- Fisher exact Poisson distribution test
- t (both equal and unequal variances, paired and unpaired)
- variance ratio
- F for model validation
- Bartlett and Levene tests for homogeneity of variance
- 1,2,3-way ANOVA (with automatic variance stabilizing transformations and nonparametric equivalents)
- Tukey post-ANOVA Q test
- Factorial ANOVA with marginal plots
- Cochran-Mantel-Haenszel 2x2xk contingency table Meta Analysis test
- Repeated measures ANOVA with Helmert matrix of orthonormal contrasts, Mauchly sphericity test, and Greenhouse-Geisser and Huynh-Feldt epsilon corrections
- MANOVA with Wilk's lambda, Roy's largest root, Lawley-Hotelling trace, and Pillai trace tests for equality of mean vectors, Box's test for equality of covariance matrices, and profile analysis for repeated measurements.
- Canonical variates and correlations for group comparisons.
- Mahalanobis distance estimation for allocation to groups using estimative or predictive Bayesian methods.
- Binomial test
- Sign test
- Various Hotelling T-squared tests
- Goodness of fit and non parametric tests:
  - runs (all, conditional, up and down)
  - signs
  - Wilcoxon-Mann-Whitney U
  - Wilcoxon paired-samples signed-ranks
  - Kolmogorov-Smirnov 1 and 2 sample
  - Kruskal-Wallis
  - Friedman
  - Median, Mood and David, Kendall coefficient of concordance
  - Mallows Cp, Akaike AIC, Schwarz SC, Durbin-Watson
  - tables and plots of residuals, weighted residuals, deviance residuals, Anscombe residuals, leverages and studentized residuals as appropriate
  - half normal and normal residuals plots
- Multilinear regression by
  - L_1 norm
  - L_2 norm (weighted least squares)
  - L_infinity norm
  - Robust regression (M-estimates)
  - Also logistic, binary logistic, log-linear, orthogonal, reduced major axis, with interactive selection and transformation of variables in all cases.
- Partial Least Squares (PLS)
- Survival analysis (Kaplan-Meier, ML-Weibull, Mantel-Haenszel) or, using generalized linear models with covariates (Exponential, Weibull, Extreme value, Cox)
- Correlation analysis (Pearson product moment, Kendal Tau, Spearman Rank) on all possible pairs of columns in a matrix, and canonical correlations for two subgroups. Partial correlation coefficients can also be calculated for data sets with more than two variables.
- Shapiro-Wilks normality test with the large sample correction
- Normal scores plots
- Binomial distribution, analysis of proportions, exact parameter confidence limits, likelihood ratio, odds, odds ratios and graphical tests such as log-odds-ratios plots with exact confidence limits for systematic variation in binomial p values
- Trinomial distribution (and confidence contour plots)
- Parameter estimates, confidence limits and goodness of fit for:
  - uniform
  - normal
  - binomial
  - Poisson
  - exponential
  - gamma
  - beta
  - lognormal
  - Weibull distributions
- All possible pairwise comparisons between columns of data by KS-2, MWU and unpaired t tests using the Bonferroni principle.

Back to Frequently asked questions, Summary, Help Menu or End Help

# What curve fitting functions are available ?

- Sums of exponentials (and estimation of AUC)
- Sums of Michaelis-Menten functions (and estimation of half saturation points and final asymptotes)
- Sums of High/Low affinity binding sites
- Cooperative order n saturation functions (and cooperativity analysis)
- Positive n:n rational functions
- Growth curves (derivative plots, comparison of models and estimation of min/max growth rates, half-times and final sizes)
- Survival curves using several models
- Polynomials (all degrees up to 6 then statistical tests for the best model and prediction of x with confidence limits given y)
- Cubic splines (user-placed knots, automatic knots with variable tension, or cross-validation data smoothing)
- Systems of differential equations (Adams, Gear, phase portrait, orbits) using defined starting estimates and limits or random cycles to search for a global minimum
- Calibration curves (polynomials, splines or user selected models)
- Area under curve (AUC by choice from several methods)
- Initial rates
- Lag times
- Horizontal and inclined asymptotes
- Numerical deconvolution of sums of exponentials, Michaelis-Mentens, trigonometric functions and Gaussian densities
- Fitting user supplied models
- Analyzing flow cytometry profiles
- After fitting functions of 1, 2 or 3 variables, parameters and objective functions can be stored for F, Akaike, Schwarz and Mallows Cp tests, and the wssq/ndof contours and 3D surface can be viewed as functions of any two chosen parameters. With all functions of 1 variable, calibration, evaluation, extrapolation, area calculations, derivative estimations and interactive error bar plots can be done.
- Multi-function mode: simultaneous fitting of several functions of the same independent variables, linked by common model parameters
- Generalized Linear Models (GLM) can be fitted interactively with either normal, binomial, Poisson or Gamma errors. Appropriate links can be either identity, power, square root, reciprocal, log, logistic, probit or complementary log-log with canonical links as defaults and facility to supply fixed offsets. A simplified interface is included for logistic, binary logistic or polynomial logistic regression, bioassy, log-lin contingency analysis or survival analysis.
- Stratified data sets can be analyzed by Cox regression and conditional logistic regression
- Autoregressive integrated moving average models (ARIMA) to time series with forecasting
- Facility to store parameter estimates and covariance matrices in order to compute Mahalanobis distances between fits of the same model to different data sets and test for significant differences in parameter estimates.

Back to Frequently asked questions, Summary, Help Menu or End Help

# What types of graphs can be plotted ?

- Grouping of data into histograms (with error bars if appropriate) and cdfs
- Calculation of means and error bars with arbitrary confidence limits from replicates can be done interactively or from data files
- Error bars can be non-symmetrical or sloping if required and multiple non-orthogonal error bars can be plotted
- Error bars can be added to 2D and 3D bar charts and 3D cylinder plots
- Extrapolation of best-fit linear and nonlinear curves to arbitrary end points
- Automatic transformation of error bars into various axes (Hill, Lineweaver-Burk, Scatchard, log-odds, etc.)
- Immunoassay type dilution plots using logs to base 2, 3, 4, 5, 6, 7, 8, 9 as well as e and 10, and with labels as logs, powers of the base or fractions
- Multiple axes plots
- Pie charts with arbitrary displacements, fill-styles, colours
- Bar charts with arbitrary positions, sizes, fill-styles, colours and error-bars
- Presentation box and whisker plots, and pie or bar charts with 3D perspective effects
- Orbits and vector field diagrams for systems of differential equations
- Dendrograms and 3D-cluster plots for use in cluster analysis
- Scree diagrams and score or loading scatter plots for principal components analysis (score plots can have Hotelling T^2 elliptical confidence regions)
- 3D-surfaces and 2D-projections of contours
- Curves in space and projections onto planes
- vast array of plotting characters and maths symbols
- Standard PostScript fonts, Symbol, ZapfDingbats and Isolatin1 encoding
- Professional quality PostScript files that can easily be edited to change titles, legends, symbols, line-types and thicknesses, etc.
- Interactive PostScript facility for arbitrarily stretching and clipping overcrowded plots such as dendrograms without changing aspect ratios of fonts or plotting symbols but by just changing white-space between graphical objects
- A PostScript editor is supplied for scaling, rotating, shearing, translating, editing, making collages and inlays from .eps files
- Transformation of .eps files into bit-map and compressed graphics formats (e.g. bmp, pcx, tif, jpg, png, pdf)
- Plotting user defined parameteric equations such as r(theta), x(t), y(t) in 2-space and x(t),y(t),z(t) in 3-space
- Facility to import PostScript specials automatically into the PostScript file creation stream in order to redefine fonts, colours, plotting symbols, add logos, etc.
- Graphical deconvolution of summation models after fitting
- 2D and 3D Biplots for multivariate data sets
- Scalable vector graphics (SVG) can be output and there is an editor to input LaTeX maths directly into SVG or create collages.

Back to Frequently asked questions, Summary, Help Menu or End Help

# What calculations can be done ?

- Zeros of polynomials
- Zeros of a user-defined function
- Zeros of n nonlinear functions in n variables
- Integrals of n user-defined functions in m variables
- Convolution integrals
- Bound-constrained quasi-Newton optimization
- Eigenvalues
- Determinants
- Inverses
- Singular value decomposition with right and left singular vectors
- Pseudo inverse and rank of a matrix
- LU factorisation as A = PLU with matrix 1 and infinity norms and corresponding condition numbers
- QR factorisation as A = QR
- Cholesky factorisation as Q = R*R-transpose
- Matrix multiplication C = A*B, (A-transpose)*B, A*(B-transpose) or (A-transpose)*(B-transpose)
- Evaluate quadratic forms (x^T)*A*x or (x^T)*(A^{-1})*x
- Solve full-rank matrix equations Ax = b
- Solve over-determined linear systems Ax = b in the L_1, L_2 or L_infinity norms
- Solve the symmetric eigenvalue problem (A - lambda*B)x = 0
- Areas, derivatives and arc lengths of user supplied functions
- Analysis of cooperative ligand binding (zeros of binding polynomial, Hessian, minmax Hill slope, transformed binding constants, cooperativity indices, plotting species fractions)
- Power and sample size calculations for statistical tests used in clinical trials, including plotting power as a function of sample size (1 or 2 binomial proportions; 1, 2 or k normal ANOVA samples; 1 or 2 correlation coefficients; 1 or 2 variances; chi-square test)
- Probabilities and cdf plots for the non-central t, non-central chi-square, non-central beta or non-central F distributions
- Estimation of exact parameter confidence limits for the binomial, normal, Poisson, etc. distributions and plotting confidence contours for the trinomial distribution.
- Robust location estimates for one sample (median, trimmed and winsorized means, Hodges-Lehmann estimate, etc.).
- Time series smoothing by moving averages, running medians, Hanning or the 4253H-twice smoother
- Time series, sample autocorrelation functions and partial autocorrelation functions and plots for chosen numbers of lags and associated test statistics
- Auto- and cross-correlation matrices for two time series
- Distance matrices for use in cluster analysis with extensive choice of pre-conditioning transformations and alternative link functions, e.g. Canberra dissimilarity and Bray-Curtis similarity.
- Nearest neighbours from a distance matrix
- Classical-metric and non-metric scaling from distance matrices
- Principal components with eigenvalues, scree diagrams, loadings and scores from multivariate data sets
- Procrustes analysis to estimate the similarity of two matrices
- Varimax or Quartimax rotation of a loading matrix
- Canonical variates with eigenvalues, scree diagrams, loadings and scores from multivariate data sets. Group means with confidence regions can be plotted to assign comparison data to existing groups.
- K-means cluster analysis with plots
- Factor analysis using multivariate data or covariance matrices.
- Shannon, Brillouin, Pielou and Simpson diversity indices.
- Kernel density estimation

Back to Frequently asked questions, Summary, Help Menu or End Help

# What simulation techniques are supported ?

- Generating exact data from a library of models or from user-defined models
- User defined models can be multiple equations in several variables or sets of nonlinear differential equations, and can have conditional logical branching (equivalent to if...elseif...else) for models that swap at critical values of subsidiary functions or independent variables
- Logical operators like IF, IFNOT, AND, OR, NOT, XOR, etc. can be used to control model execution
- Special functions that can be used within models include
  - Airy functions Ai(x), Bi(x) and derivatives
  - Hyperbolic and inverse hyperbolic functions cosh(x), sinh(x), tanh(x), arccosh(x), arcsinh(x), arctanh(x)
  - Bessel functions J0, J1, Y0, Y1, I0, I1, K0, K1
  - Normal integral phi(x), error function erf(x) and complements phic(x) and erfc(x), Dawson's integral
  - Exponential, sine and cosine integrals, E1(x), Ei(x), Si(x), Ci(x)
  - Fresnel, Spence, Debye, Fermi-Dirac, Abramovitz, Clausen integrals
  - Kelvin bei(x), ber(x), kei(x) and ker(x) functions
  - Elliptic integrals RC, RF, RD, RJ and Jacobi functions sn(u,m), cn(u,m) and dn(u,m)
  - Binomial coefficients, gamma function, incomplete gamma function, log(gamma(x)), digamma (psi(x)), and trigamma functions
  - Struve confluent hypergeometric functions
  - Legendre polynomials of degree n and order m, spherical harmonics
  - Cumulative distribution functions for the normal, t, F, chi-square, beta and gamma distributions
  - Inverse functions for the normal, t, F, chi-square, beta and gamma distributions
  - Impulse functions: Heaviside, Kronecker delta, Dirac delta, triangular spike, Gaussian
  - Periodic wave impulse functions: square, rectified triangle, Morse dot, sawtooth, rectified sine, rectified sine half, unit impulse
- One-line commands can be used for vector arithmetic (initialisation, norms, dot products), for evaluating polynomials or Chebyshev expansions, or for calling for mathematical constants (like Euler's gamma)
- Submodels can be defined, and these can be called from a main model for function evaluation, root finding, or adaptive quadrature or they can be called dynamically with arbitrary arguments
- Adding random error to exact data sets to simulate experimental error
- Systems of differential equations
  After simulating, selected orbits can be stored and, with autonomous systems, vector field phase portraits can be plotted to identify singularities.
- Generating random numbers and 1,2,3-D random walks from the:
  - uniform
  - normal
  - chi-square
  - F
  - t
  - logistic
  - Weibull
  - Cauchy
  - beta
  - Poisson
  - binomial distributions.
- Generate n by m normally distributed random matrices.
- Generating random permutations of lists and Latin squares

Back to Frequently asked questions, Summary, Help Menu or End Help

# What documentation describes the package ?

- Help documents are available in several formats as follows:
  - ASCII text files can be read by any text editor (e.g. Notepad), or using a Simfit viewer, which is safer as it does not allow editing.
  - HTML documents can be viewed by a built in HTML browser without using Netscape or Internet Explorer.
  - PostScript documents (.ps) can be read using GSview or transformed into Portable Document Format.
  - Portable Document Format (.pdf) files can be read and printed using Adobe Acrobat reader.
  - Binary files that can only be read using a built in interpreter.
- A short HTML program can be viewed from the main Simfit program manager, w_simfit.exe.
- Each program has a dedicated self contained tutorial.
- Many of the specialized controls have individual tutorials.
- There is an extensive set of readme files (w_readme.0 gives details) which describe advanced features and technical details.
- A document (promote.*) summarizes the package and contains collages.
- A document (MS_office.*) describes the interface to MS Office and, in particular, explains how to use the macros to extract data from MS Excel spreadsheets.
- A document (PS_fonts.*) lists the PostScript font encodings, for those who want to create special effects.
- A detailed reference manual (w_manual.*) is provided in .ps and .pdf formats. The pdf version incorporates hyperlinks between the contents, index and page references and provides book marks.
- Individual tutorials are available from the website or in the form of a collected volume w_examples.pdf.
- There is a full set of test files containing appropriate data to test every Simfit procedure.
- Test files appropriate for every program can be selcted using the [Demo] button on the file open dialogue.

Back to Frequently asked questions, Summary, Help Menu or End Help

# How do I install the Simfit package ?

1. Simfit can be downloaded from https://simfit.org.uk.
2. To install the free academic version you need the file
   simfit_setupx_y_z.exe (32bit), or x64-simfit_setupx_y_z.exe (64bit),
   where x_y_z is the release version signature.
3. Use Program Manager to un-install any previous versions of Simfit.
4. Double click on the installation program, and accept the default installation,
   otherwise some configuration will be required.
5. Make sure your PC is configured to allow Simfit to create and delete files.
6. Make a desk top shortcut to the driver file w_simfit.exe (32bit), or
   x64_simfit.exe (64bit) in the Simfit folder.
7. To run Simfit double click on the desktop icon.
8. Use the [Configure], [Check], [Apply] options to configure the package.
9. Other software:
   You can install GsView to print and view PS files if you want, but GhostScript is now bundled with the Simfit distribution.

Back to Frequently asked questions, Summary, Help Menu or End Help

# How do I get help and advice ?

Requests for help may be answered by:

w.g.bardsley@gmail.com

Back to Frequently asked questions, Summary, Help Menu or End Help