The macros at this
site were written for MINITAB 13. Updated versions of some of them and
more macros for V14 can be found at www.mmbstatistical.com.
How to Write Minitab Exec Macros (An Introduction to Minitab Macros )
PGMathews, January 6, 1999 Rev 1.3
Abstract: Minitab supports three different types of macros. The simplest of them, the exec macro, is described and instructions for writing and running exec macros are given. An example problem and solution is presented.
Key Words: Minitab, macro, exec, global, local, program
Transfer the file: http://junior.apk.net/~pmathews/tot/source/MTBExecMacros.tex (To view this file you need the Scientific Notebook Viewer. Get a free copy of the viewer from http://www.mackichan.com/ )
These macros
Already Written Minitab Macros ( Macros, Descriptions, and Directions are found below )
January 26, 2002
A catalog of macros and directions on how to use them is found below. Many of these macros are unique because of the graphic output they produce. As time permits, thumbnails of the graphic output will be posted. An example of the output of the hypothesis test plot for the OneT.mac is here. Click here or on thumbnail to view a larger image of the hypothesis test plot.
Minitab Macro Library
Mathews and Malnar, Statistical Trainers and Consultants
217 Third Street, Fairport Harbor, OH 44077
440-350-0911
pmathews@apk.net
Macros may contain errors and/or give erroneous results. Mathews and Malnar are not responsible for the use or misuse of these macros. Use at your own risk.
Macros are local (.mac) unless indicated otherwise. Macros are written for Minitab V13 although they may run on earlier versions. Some features in certain macros are incomplete. Download macros from http://junior.apk.net/~pmathews.
You should install these macros in Minitab’s macro subdirectory, for example, in c:\Program Files\Mtbwin\Macros. If you put them in another directory you will have to use a change directory command (for example: mtb> cd a:) to tell Minitab where to find the macro.
Instructions for running macros with example calling statements are included in the comments at the beginning of each macro. Open the macros with Notepad to view the contents. Notepad’s default is to look for .txt files so you will have to set Files of Type: to All Types to find .mac and .mtb files. Be careful editing macros with Word or Wordpad. They often embed hidden formatting in files that Minitab cannot interpret. Definitely don’t use Word or Wordpad if your Windows system uses a non-English character set.
If you edit or rename a macro your Windows operating system will probably append a .txt extension to a .mac or .mtb macro, such as normal.mac.txt. This will prevent Minitab from easily finding and accessing .mac and .mtb macros. To prevent this you should register the .mac file type with Windows by:
Repeat the process for .mtb file types.
There are two ways to run .mac macros from Minitab:
mtb> %onet c1;
subc> test 80.
To run a .mtb macro select the macro with Files> Other Files> Run an Exec or invoke the macro from the command prompt with the exec command followed by the macro name in single quotes:
mtb> exec ‘normprac’
Macros may contain errors and/or give erroneous results. Mathews and Malnar are not responsible for the use or misuse of these macros. Use at your own risk.
When you click a link below you should save the file to the Minitab Macros directory, like c:\Program Files\Mtbwin\Macros.
Name Description
beta Calculates the complete beta function.
binomial Calculates binomial probability.
boxslip .mtb Simulation macro for two sample locations test.
ciforp Finds and plots 95% confidence interval for cumulative fraction defective.
circnorm Constructs a probability plot for circular normal data.
defectivesOC Calculates and plots the OC curve for SSP for defectives
fcdf Calculates right tail probability for the F distribution.
finv Calculates the F value for a specified right tail area of the F distribution.
fishers Calculates the one-tailed p value for Fisher’s exact method.
fishersV12 Calculates the approximate one-tailed p value for Fisher’s exact method for V12.
fisherspower Finds exact power for one-sided Fisher’s exact test.
fishersim Finds power for Fisher’s exact test by simulation. Use fisherspower instead.
fnoncent Calculates the noncentral F distribution probability
ftest Performs F test and then creates hypothesis test plot of results.
gelgrrsim GRR simulation for GEL LTC course.
grrsim GRR simulation macro for DOE.
halfnorm Constructs a probability plot for half normal data.
hypergeometric Calculates hypergeometric probability.
incbeta Calculates the incomplete beta function used for t and F distributions.
lognormalpaper Creates blank log by normal probability paper for manual plotting.
normal Calculates the left tail probability for the normal distribution.
normalpaper Creates blank normal probability paper for manual plotting.
normprac.mtb Simulation macro to practice interpretation of normal probability plots.
occurve Creates OC curve for conditions determined in TwoSamplepSize.
onet Performs t test and then creates hypothesis test plot of result. Sample plot is below. Click on image for a larger view.
plotnorm Constructs a probability plot of normal data.
poisson Calculates Poisson probability.
power Calculates F test power for balanced fixed effects ANOVA.
quadinterp Performs quadratic interpolation from three reference points.
randomizeit Randomizes the order of specified columns.
resampletwo Uses resampling method to perform two sample test for location.
runchart.mtb Creates blank run chart form for manual plotting.
runningsum Calculates the running sum of a column.
sim3 3 variable simulation for DOE.
sim5 5 variable simulation for DOE.
sixdice Magic dice simulation for DOE.
studentst Calculates probability for Student’s t distribution
threenorms Creates normal, half normal, and circular normal plots on one graph.
TwoSamplepSize Finds smallest n and dx for two sample test of fractions defective.
unrandomizeit Unrandomizes the order of specified columns.
zinvcdf Finds the inverse normal probability (zp for specified p)
ztest Performs z test and then creates hypothesis test plot of result.
Blank Forms:
Normal.mgf Normal probability paper created with normalpaper.mac.
2 cycle lognormal.mgf 2 cycle log by normal probability paper
3 cycle lognormal.mgf 3 cycle log by normal probability paper
runchart.mgf Run chart form created with runchart.mtb.
Last Revised: 02/24/2002. Counter started on 01/19/02.