{"id":534,"date":"2009-01-31T11:41:55","date_gmt":"2009-01-31T10:41:55","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=534"},"modified":"2009-04-09T10:21:52","modified_gmt":"2009-04-09T09:21:52","slug":"simfit-a-free-package-for-curve-fitting-statistics-plotting-and-more","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=534","title":{"rendered":"Simfit &#8211; A free package for Curve fitting, statistics, plotting and more"},"content":{"rendered":"<p>I love mathematical software &#8211; which makes me a lucky guy because I tend to deal with it a lot as part of my job as a science and engineering software specialist at the University of Manchester in the UK.\u00a0 Thanks to this role, I often get asked if I can recommend software for various tasks and my answer depends on many factors such as<\/p>\n<ul>\n<li>Does our university have a site license for it (or is it free)<\/li>\n<li>What packages do people in your research \/ teaching area tend to use?\u00a0 Sometimes I know this off the top of my head, other times I know people who know people who know ;)<\/li>\n<li>What is your computing background?<\/li>\n<li>Are you likely to need more support from me?\u00a0 If so then I am more likely to recommend that you use a package that I know a lot about.<\/li>\n<li>What is the support from the vendor like?\u00a0 Researchers tend to want to do odd things and a software vendor who is willing to work with them tends to bubble to the top of my list.\u00a0 There are some who have written routines just for us at no extra charge &#8211; I LIKE these kind of vendors.<\/li>\n<li>If I don&#8217;t know enough about a package to offer direct support to you then do I know someone who is willing and able to (bear this in mind if I ever offer to buy you a coffee, I may call in a favour at some point)?<\/li>\n<li>What software are you currently working with?\u00a0 Will you want something that can integrate with it or do you want to start afresh?<\/li>\n<\/ul>\n<p>There are many others of course such as my mood, whether or not I have a clue what you are talking about and what software I have been playing around with recently but that pretty much covers it.\u00a0 One application that I have started to recommend to people recently is called <a href=\"http:\/\/www.simfit.man.ac.uk\/\">Simfit<\/a>.<\/p>\n<p><strong>What is Simifit?<\/strong><\/p>\n<p>Simifit is a <strong>free<\/strong> piece of software written by Bill Bardsley of the University of Manchester.\u00a0 According to the <a href=\"http:\/\/www.simfit.man.ac.uk\/\">application&#8217;s website<\/a> &#8220;<em>Simfit is a computer package for simulation, statistical analysis, curve fitting and graph plotting<\/em>.&#8221;\u00a0 It is written for Windows but can also be run under Linux via <a href=\"http:\/\/www.winehq.org\/\">WINE<\/a> (instructions specific to OpenSuse and KDE are given <a href=\"http:\/\/www.simfit.man.ac.uk\/simfit_suse_install.html\">at this website<\/a>.)<\/p>\n<p>Simfit actually consists of a suite of over forty individual programs but all of these are held together by one central &#8216;program manager&#8217;.\u00a0 Essentially you spend your Simfit life in the program manager and it will run the sub-programs as and when they are needed.\u00a0 It&#8217;s all very straightforward although, in my opinion, the graphical user interface isn&#8217;t as intuitive as most applications I have used.\u00a0 I guess I should qualify this somewhat &#8211; by &#8216;not as intuitive&#8217; I mean &#8216;doesn&#8217;t quite behave like all other Windows applications&#8217; and after speaking to Bill it seems that the reason for this is that he wanted to avoid anything that would make Simfit less stable or more memory hungry. \u00a0 His interface works well and all of his users are happy with it so why change?\u00a0 Furthermore, it hardly uses any memory at all and so Simfit will quite happily accept massive data sets that can bring other packages to their knees.\u00a0 It may be quirky but once you get used to it you&#8217;ll be fine.<\/p>\n<p><strong>Academic versus Professional versions <\/strong><\/p>\n<p>Simfit comes in two flavours and both of them are free in the sense that Bill will charge you nothing for them.\u00a0 However one of them (<em>The professional version<\/em>) has the NAG library as a pre-requisite and NAG costs money.\u00a0 If you (or your institution) has a license for the NAG Library then you are good to go and can happily use the professional version of Simfit at no extra charge.\u00a0 If, however,\u00a0 you don&#8217;t have a license for the NAG Library then you need to use the <em>Academic version<\/em> which is also free but has less functionality.  Details of the differences in functionality between the two versions can be found on the <a href=\"http:\/\/www.simfit.man.ac.uk\/nag.html\">Simfit website<\/a>.<\/p>\n<p>When you download Simfit you get both versions at the same time and the package comes with an utility that allows you to easily swap between the Academic and NAG library editions.<\/p>\n<p>At this point, it might be worth mentioning that if you desperately need some functionality that is only available in the professional version then you can obtain a trial version of the NAG library from NAG themselves.<\/p>\n<p><strong>Installation<\/strong><\/p>\n<p>Simfit works perfectly on just about any version of Windows you care to mention &#8211; Windows 95, 98, XP and Vista to name a few.\u00a0 I haven&#8217;t had chance to try it out on the new Windows 7 beta yet but I know one thing for sure &#8211; if it doesn&#8217;t work initially then I&#8217;ll bet my last dollarpound that Bill will get it working very quickly.\u00a0 He has put a lot of effort into ensuring that Simfit is portable across Windows versions and it shows.<\/p>\n<p>In order to use all of Simfit&#8217;s features you will need to install a few pre-requisites first but happily all of them are free and Bill has made most of them conveniently available from his website.\u00a0 I installed things in the following order.<\/p>\n<p>For .eps file support you need the following<\/p>\n<ul>\n<li>Ghostscript package &#8211; available from the <a href=\"http:\/\/www.simfit.man.ac.uk\/download.html\">Simfit website<\/a> (among other places)<\/li>\n<li>GSview Windows &#8211; available from the <a href=\"http:\/\/www.simfit.man.ac.uk\/download.html\">Simfit website<\/a> (among other places)<\/li>\n<\/ul>\n<p>For pdf viewing support you need<\/p>\n<ul>\n<li>Adobe Reader &#8211; available from <a href=\"http:\/\/get.adobe.com\/uk\/reader\/\">Adobe<\/a>.<\/li>\n<\/ul>\n<p>If you want to use Simfit in full &#8216;professional&#8217; mode then you will need to install the commercial NAG libraries.\u00a0 If you don&#8217;t have a license the NAG library then don&#8217;t worry about it &#8211; Simfit will still work but with a few less bells and whistles.<\/p>\n<ul>\n<li>NAG LIbrary (FLDLL214ML or FLDLL214AL should do the job) &#8211; available from the <a href=\"www.nag.co.uk\">Numerical Algorithms Group<\/a>.<\/li>\n<\/ul>\n<p>Finally, you install Simfit itself using simfit_setup.exe.\u00a0 The installer is so quick and easy that I won&#8217;t insult your intelligence by going through it blow by blow.\u00a0 If you forget to install any of the pre-requisites then don&#8217;t worry &#8211; you can still install Simfit and simply add the other packages if and when you need them.<\/p>\n<p><strong>Plotting Graphs in Simfit<\/strong><\/p>\n<p>Let&#8217;s start out with one of the (mathematically) simplest things that Simfit can do &#8211; plotting.\u00a0 They say that a picture can speak a thousand words so here are four plots produced with Simfit (taken from the <a href=\"http:\/\/www.simfit.man.ac.uk\/examples.html\">author&#8217;s website<\/a>)<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter\" src=\"\/images\/stats\/simfit_plots.png\" alt=\"Simfit plots\" \/><\/p>\n<p>Simfit&#8217;s graphical output is in the widely used EPS format (<a href=\"http:\/\/www-h.eng.cam.ac.uk\/help\/tpl\/graphics\/postscript.html\">encapsulated postscript<\/a>) which is of extremely high quality and easily incorporated into <a href=\"http:\/\/www.latex-project.org\/\">Latex<\/a> documents.\u00a0 An extra bonus that you get with EPS files is that they are actually nothing more than text files (well the ones produced by Simfit are at least) &#8211; you can open them up in something like Notepad and edit them by hand (if you know what you are doing).\u00a0 If you are unfortunate enough to be unable to use EPS files then Simift can convert them to a wide range of graphics formats including bmp, jpg, pcx, tiff and Windows quality emf.\u00a0 There is also a built in Postscript editor to manipulate eps files and create collages, insets etc.<\/p>\n<p>Simfit has the capability to generate many different plot types including (among others) standard x-y line plots, 2 and 3D histograms, pie charts, box and whisker plots, Scree diagrams, Dendrogams, Scatchard plots,\u00a0 3D surface plots and contour plots. Phew!\u00a0 I don&#8217;t even know what some of these are.\u00a0 There are many other graphical facilities available but I think I will simply direct you to the <a href=\"http:\/\/www.simfit.man.ac.uk\/faq.html#4\">author&#8217;s webpage<\/a> rather than repeat the full list here.<\/p>\n<p><strong>Statistical analysis with Simfit<\/strong><\/p>\n<p>In its early days, Simfit only handled <a href=\"http:\/\/www.simfit.man.ac.uk\/faq.html#6\">simulation<\/a> and <a href=\"http:\/\/www.simfit.man.ac.uk\/faq.html#3\">curve fitting<\/a> but Bill and his collaborators felt that it would be useful to add an additional suite of statistical tests to the package.\u00a0 But which tests should be given priority?\u00a0 Bill&#8217;s approach was to speak to one of his collaborators, Tom Sharpe, a member of the Manchester University&#8217;s School of Biological Sciences (as it was called at the time).\u00a0 Tom drew up a list of all the statistical tests that had been used by the department over the previous few years and Bill implemented the lot!\u00a0 This formed the foundation of Simfit&#8217;s statistical abilities and Bill has been adding more routines ever since.<\/p>\n<p>The full list of statistical routines is available on the Simfit website but, to save you a bit of clicking, I&#8217;ll reproduce a <strong>small sample<\/strong> of them here (shamelessly copied and pasted from the <a href=\"http:\/\/www.simfit.man.ac.uk\/faq.html#2\">larger list here<\/a>)<\/p>\n<ul>\n<li> chi-square (O\/E vectors, m by n contingency tables and         wssq\/ndof)<\/li>\n<li> McNemar test on n by n frequency tables<\/li>\n<li> Cochran Q test<\/li>\n<li> Fisher exact (2 by 2 contingency table) with all p values<\/li>\n<li> Fisher exact Poisson distribution test<\/li>\n<li> t (both equal and unequal variances, paired and unpaired)<\/li>\n<li> variance ratio<\/li>\n<li> F for model validation<\/li>\n<li> 1,2,3-way Anova (with automatic variance stabilizing         transformations and nonparametric equivalents)<\/li>\n<li> Tukey post-ANOVA Q test<\/li>\n<li> Factorial ANOVA with marginal plots<\/li>\n<li> Repeated measures ANOVA with Helmert         matrix of orthonormal contrasts, Mauchly         sphericity test and Greenhouse-Geisser\/Huyn-Feldt epsilon         corrections<\/li>\n<li> MANOVA with Wilks lambda, Roy&#8217;s largest root,         Lawley-Hotelling trace, and Pillai trace for equality of         mean vectors, Box&#8217;s test for equality of covariance         matrices, and profile analysis for repeated measurements.<\/li>\n<\/ul>\n<p><strong>Documentation<\/strong><\/p>\n<p>It doesn&#8217;t matter how good a piece of software is if you can&#8217;t figure out how to use it and so good documentation is essential &#8211; especially for programs that contain advanced mathematics.\u00a0 Fortunatley Simfit is well served in this area as it comes with a beautifully produced manual.\u00a0 The manual has been typeset using <a href=\"http:\/\/www.latex-project.org\/\">Latex<\/a> and is accessible from the Windows start menu in either pdf or ps format.\u00a0 Bill even makes the manual&#8217;s full Latex source code available from the Simfit website (in the <a href=\"http:\/\/www.simfit.man.ac.uk\/download.html\">downloads section<\/a>) so you can compile it from source if you wish. The pdf file is very easy to navigate since it comes with a full table of contents and is extensively hyper-linked.<\/p>\n<p>Weighing in at 425 pages (at the time of writing) it is certainly comprehensive but it is also very clearly written &#8211; Bill&#8217;ls multi-decade experience of being a university lecturer clearly shining through.\u00a0 As far as I can tell, the manual contains a fully worked example for every single Simfit routine including a suitable dataset and the sample data sets are also built into Simfit itself as you might expect. \u00a0 In fact I think that this is more than just a software manual, it gives a nice introduction to some of the mathematics too.\u00a0 In all honesty I think that this is one of the best produced manuals for a free piece of software that I have ever seen and it gives commercial offerings a run for their money too.<\/p>\n<p><strong>Use of Simfit in the academic community<\/strong><\/p>\n<p>If you do a quick google search for free software that can handle things such as curve fitting, statistical analysis and publication quality plots then you will quickly be overwhelmed with choices but which ones can you trust?\u00a0 If you are going to submit your results for publication in a peer-reviewed journal then you need to be really sure that the software you choose gives you the right answer.\u00a0 One way to measure confidence in a piece of software like this is to look in the scientific literature and see if other researchers are using and citing it (in a good way).<\/p>\n<p>So,\u00a0 I did exactly that and discovered that Simfit has been used by hundreds of researchers for many years all over the world.\u00a0 Here is a completely random selection of scientific papers that have made use of Simfit calculations over the last few years.\u00a0 I have tried to work out exactly how they used the package and put this in bold at the end of each citation but bear in mind that my own knowledge of statistics is pitiful so I apologize if I have got anything wrong.<\/p>\n<ul>\n<li><em>Diverging catalytic capacities and selectivity profiles with haloalkane substrates of chimeric alpha class glutathione transferases<\/em>, Protein engineering, design &amp; selection [1741-0126] Kurtovic yr:2008     <strong>(biplots and dendrogram analyses<\/strong>)<\/li>\n<li><em>Phylogeny and evolution of papillomaviruses based on the E1 and E2 proteins<\/em>, Bravo and Alonso, Virus genes [0920-8569] yr:2007 vol:34 iss:3 pg:249 (<strong>deconvolution of Gaussian distributions)<\/strong><\/li>\n<li><em>Catalysis of potato epoxide hydrolase, StEH1<\/em>, The Biochemical journal [0264-6021] Elfstr\u00f6m yr:2005 vol:390 iss:Pt 2 pg:633 (<strong>fit to the <\/strong><strong>Michaelis\u2013Menten equation by non linear regression<\/strong> <strong>)<\/strong><\/li>\n<li><em>Selective Estrogen Receptor Modulators Accelerate Cutaneous Wound Healing in Ovariectomized Female Mice<\/em>, Endocrinology [0013-7227] Hardman yr:2008 vol:149 iss:2 pg:551 (<strong>Spearman\u2019s coefficient<\/strong>)<\/li>\n<li><em>Sex Dimorphism in Wound Healing: The Roles of Sex Steroids and Macrophage Migration Inhibitory Factor<\/em>, Endocrinology [0013-7227] Gilliver yr:2008 vol:149 iss:11 pg:5747 (<strong>unpaired Student\u2019s <em>t<\/em> test and<sup> <\/sup>one-way ANOVA<\/strong>)<\/li>\n<li><em>Three dimensional analysis of microaneurysms in the human diabetic retina<\/em>, Journal of anatomy [0021-8782] MOORE yr:1999 vol:194 iss:01 pg:89 (<strong>Kruskal-Wallis test and Kolmogorov-Smirnov 1 sample test)<\/strong><\/li>\n<\/ul>\n<p>This is just a small sample of what I found but I think you get the idea.\u00a0 If you spend a bit of time searching on<a href=\"http:\/\/scholar.google.co.uk\/\"> google scholar<\/a> then you will come up with <strong>many<\/strong> more.\u00a0 So, it seems that Simfit is definitely trusted and well used by many in the scientific community.<\/p>\n<p><strong>What if Simfit doesn&#8217;t have the routine you need?<\/strong><\/p>\n<p>If you find yourself wanting to do some sort of analysis that isn&#8217;t in Simfit then simply email Bill and (politely) ask!\u00a0 If time permits then he may well help you out.<\/p>\n<p><strong>Spanish Version<\/strong><\/p>\n<p>Simfit is used extensively in spain and a Spanish version of the program is maintained by a team in Salamanca.\u00a0 I don&#8217;t speak Spanish so can&#8217;t offer any comment on this except to say that it is fully endorsed by Bill (in fact he gives Simfit courses over in Salamanca) and that the url for the spanish version is <a href=\"http:\/\/simfit.usal.es\/\">http:\/\/simfit.usal.es\/<\/a><\/p>\n<p><strong>Source code<\/strong><\/p>\n<p>Simfit is written in <a href=\"http:\/\/en.wikipedia.org\/wiki\/Fortran\">FORTRAN<\/a> for windows and the full source code\u00a0 is available to download from the Simfit website.\u00a0 One of the great things about having access to the source code is that you can see exactly how each and every mathematical routine works if you so desire.\u00a0 In addition, if you find any bugs then you will be able to fix them yourself if Bill isn&#8217;t around and you will be safe in the knowledge that you will always be able to obtain a copy of the program and (with a bit of work) port it to any computing platform you like.<\/p>\n<p>Something that I would personally <strong>love<\/strong> to see is a native Linux version of simift.\u00a0 Bill tells me that he has done his best to separate the windows-centric code from the calculational parts of the program so maybe, just maybe, someone out there has enough Linux GUI programming experience to produce a native version for KDE or GNOME.\u00a0 It would be fantastic if Simfit were to eventually appear in the standard package repositories for Debian, Ubuntu and Fedora.<\/p>\n<p>Something that crossed my mind was the possibility of making some (or all) of the Simfit routines callable from Python.\u00a0 I have no idea how feasible this would be and would need to delve into the source code (and probably send a few emails to Bill) to get a better idea.\u00a0 It is on my &#8216;to do&#8217; list but one or two people have seen the size of that particular list and have wondered if anyone would be able to get through it before the heat-death of the universe.\u00a0 So if anyone fancies rolling up their sleeves and having a bash&#8230;the source is there :)<\/p>\n<p>If anyone is <strong>seriously<\/strong> interested in working on a Linux (or Mac) port then I am sure Bill would love to hear from you.\u00a0 His email address is all over the Simfit site.<\/p>\n<p><strong>Full Disclosure<\/strong><\/p>\n<p>Now I know what you are thinking&#8230;Mike (that&#8217;s me) is from Manchester University and the author of this software (that&#8217;s Bill) is also from Manchester University and so Mike is simply promoting his colleague&#8217;s software via his blog.\u00a0 Well in the interests of full disclosure I&#8217;ll tell you that I have met Bill a few times and like him a lot but if his software stank then I would tell him (and you) so.\u00a0 He isn&#8217;t my boss or anything (in fact he is now retired) so I don&#8217;t have a vested interest in making him happy.\u00a0 I don&#8217;t use or recommend software because I like the author &#8211; I use or recommend it because I think it is the right tool for the job.<br \/>\n<strong><\/strong><\/p>\n<p>As always, comments are welcome!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I love mathematical software &#8211; which makes me a lucky guy because I tend to deal with it a lot as part of my job as a science and engineering software specialist at the University of Manchester in the UK.\u00a0 Thanks to this role, I often get asked if I can recommend software for various [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,32,29],"tags":[],"class_list":["post-534","post","type-post","status-publish","format-standard","hentry","category-math-software","category-open-source","category-statistics"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-8C","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=534"}],"version-history":[{"count":41,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/534\/revisions"}],"predecessor-version":[{"id":623,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/534\/revisions\/623"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}