A MATLAB 5 PROGRAM FOR CALCULATING THE STATISTICS OF MASS CHANGE
by
Heather Noel Warren and Gary H. Girty, Department of Geological Sciences, San Diego State University, San Diego, California 92182
accepted for publication, Journal of Geoscience Education, April 23, 1999
ABSTRACT
Evaluating the statistics of elemental mass transfer associated with metasomatism is a complex and time intensive process. Hence, we developed a Matlab 5 program, herein referred to as SACD, that has proven to be fast, efficient, and thorough at statistically analyzing changes in elemental and rock mass. The essence of SACD is that it calculates all pertinent statistics that stem from the null hypothesis, Ho, that there is no change in elemental mass brought on by metasomatism. Results output by SACD were checked against published data from the Wepawaug Schist, Connecticut which was metamorphosed under Barrovian conditions probably during the Acadian orogeny. Elemental and total rock mass changes computed by SACD are nearly identical to those in the published literature, but show that, contrary to the published literature, acceptance of Ho carries with it an unacceptable high risk. We urge anyone teaching the principles of elemental mass transfer to students to make use of this tool. It will free your students from the tedium of number crunching and leave them more time to contemplate the physiochemical reasons for metasomatism, an Earth process that remains poorly understood and deserving of more of our time.
What do I need to run SACD?
In order to run SACD you will need to have Matlab 5.0 and the Statistical Toolbox. Both are products of the MathWorks Inc.. For information about Matlab 5.0 and the Statistical Toolbox point your browser to http://www.mathworks.com/sitemap.shtml.
Are there other tools available for analyzing statistical data?
Because Matlab and the Statistical Toolbox are expensive products, they may not be readily available to students who by necessity are often forced to survive on a limited income. Hence, we are currently translating our Matlab script into Visual Basic 6. When our VB 6 program is finished you will be able to download a freely available, fully functional program that will run on any Windows 95/98 or Windows NT hosted machine.
If you have problems with SACD who do you contact?
If you have any questions about SACD please contact G.H.Girty. If this link does not work contact Gary at ggirty@geology.sdsu.edu.
How do I use SACD?
After downloading the Matlab M-files at the bottom of this page be sure to save and set the path to them. Then at the Matlab prompt type in LogRatioMenu. A new window entitled Statistical Analysis of Compositional Data will be opened. Note that you may have to maximize the window to see the complete title, and that the menu bar consists of the following items: File, Edit, Window, Bookkeeping, TestStatistics. The first three menu items function as you might expect, while the last two present the primary functions of the program to the user.
Prior to using SACD you must prepare your data which must be in tab-delimited text format prior to loading. We recommend that you use Microsoft Excel to prepare your data for use by SACD. Enter your data in weight percent without column or row labels, but in the order indicated below, and be sure to save them as tab-delimited text. To convert ppm to weight percent multiply your ppm values by 0.0001. SACD expects to see the following columns of data arranged exactly as follows: Si, Al, Ti, Fe, Mn, Ca, Mg, K, Na, P, Ni, Cr, V, Ba, Zr, Ga, Zn, Th, Nb, Y, Hf, Ta, U, Pb, Rb, Cs, Sr, La, Ce, Pr, Nd, Sm, Eu, Gd, Tb, Dy, Ho, Er, Tm, Yb, Lu, Sc, As, B, Br, Co, LOI, Sb, Se, Sn. For elements or oxides with zero values, or for columns of elements for which you have no data, enter NaN. See the enclosed folder labeled AgueData for examples of how to prepare data for use in SACD. Our VB 6 version of SACD will use a more liberal algorithm for data entry.
After preparing your data for use by SACD systematically select sub-menu items labeled 1 through 4 from the main cascading menu labeled Bookkeeping. Following completion of these 4 steps, systematically select sub-menu items labeled 5 through 10 from the main cascading menu labeled TestStatistics. As each task is completed, the associated sub-menu item is checked off. If you want to analyze a different group of samples, be sure to select Clear Variables from the Bookkeeping menu prior to beginning your analysis. When finished using the program select End Session from the Bookkeeping menu.
For a complete example of how to interpret the output from SACD as well as other information as to the internal workings of the program see the paper by Warren and Girty (1999) referenced at the top of this page.
Download Matlab version of SACD
Download SACD ready files from Ague(1994)