Académique Documents
Professionnel Documents
Culture Documents
You may need to set up a folder for your Macros. You need to be sure that Minitab
can find this folder. I find it convenient to prepare and save a dummy worksheet
using Minitab and to store it in the same file in which the Macros are kept. Mine is
called notmuch.mtw. This worksheet can have absolutely anything on it. Then, when
the macros are called, there is no problem finding them. You simply use the editor
pull-down menu to enable commands. When you want to use the macro, use the
file pulldown menu to load your worksheet. Minitab will assume that the macro is in
the same file. Use Notepad to open the macro to get instructions on how to use it.
Macros below are classified as General Statistics, ANOVA and Regression and
Nonparametrics. These and much more are available at
http://www.minitab.com/support/macros/
General Statistics
25. Table
26. Table of Frequencies and Percents from a default Histogram
27. Tolerance Intervals
28. Trimmed Mean
29. Weighted Mean and Weighted Standard Deviation
Boxplot3
This macro creates a boxplot in which the outliers are based on 3 times the interquartile
range (instead of 1.5) and are optionally stored in the worksheet.
Written by Andy Haines
Use with releases: 14 and 15
Code
Back to Top
Business Days
This macro stores the number of business days from one date to another. Note: the start
and end dates are included in the count, as well as holidays if they fall on a weekday. This
functionality has been added to Release 15. Choose Calc > Calculator and select the
function Workdays or Net Workdays.
Written by Michelle Paret
Use with releases: 14
Code
Back to Top
Calculating Percentiles
This macro calculates user specified percentiles for a data column. You can also use a "By"
variable to calculate the percentiles for groups. Part of this functionality has been added to
Release 15. Choose Calc > Calculator and the function percentiles to calculate percentiles of
an entire column.
Written by Andy Haines
Use with releases: 14 and 15
Code Documentation
Back to Top
Combinations
This macro calculates the number of different combinations of size r items drawn from N
distinct items. The r items are sampled without replacement. The number of combinations
is phrased as "N choose r". This functionality has been added to Release 15. Choose Calc >
Calculator and select the function Combinations.
Written by Cathy Akritas
Use with releases: 14
Code
Back to Top
Cronbach's Alpha
This macro calculates the value for Cronbach's alpha for the input data. Cronbach's alpha is
a coefficient of reliability (or consistency). This functionality has been added to Release 15.
Choose Stat > Multivariate > Item Analysis.
Written by Nick Bolgiano
Use with releases: 14
Code
000Macro Largely copied from Minitab Site 1/26/07
Back to Top
Expanding Frequencies
This macro "untallies" data by taking a frequency table and creating from it a single column
of data.
Written by Andy Haines
Use with releases: 14 and 15
Code Documentation
Back to Top
Half-Normal Plots
This macro creates half-normal plots. In Release 15, choose Stat > DOE > Factorial >
Analyze Factorial Design or Stat > DOE > Factorial > Analyze Variability.
Written by Ulrike Groemping
Use with releases: 14
Code
Back to Top
Median Smoother
This macro calculates a median smoother with a default span of 3. The 1st observation of
the smoothed data is the median of the 1st 3 data points (X1, X2, X3). The 2nd observation
of the smoothed data is the median of the (X2, X3, X4). The 3rd observation is the median
of (X3, X4, X5) Thus, the smoothed data represents a moving median of the original data.
This macro finds the mode of the input data, which can be numeric, text, or dates. You can
also supply one or two grouping variables and the macro will find the mode for each group.
The grouping variables can also be text, numeric, or dates. This functionality has been
added to Stat > Basic Statistics > Display Descriptive Statistics.
Written by Cathy Akritas
Use with releases: 14
Code
Back to Top
Multinomial Probabilities
This macro calculates multinomial probabilities for user-specified observed numbers and
probabilities of success.
Written by John S. Heywood
Use with releases: 14 and 15
Code
Back to Top
Normplot Storage
This macro stores the Anderson-Darling test statistic (A-Squared) and p-value for the
normality test in the worksheet.
Written by Michelle Paret
Use with releases: 14 and 15
Code
Back to Top
Random Normal
This macro generates a number from a normal distribution with the mean from one column
and standard deviation from another column, row by row.
Written by Unknown
Use with releases: 14 and 15
Code
Back to Top
Ranks by Group
This macro stores the ranks of the data for each level of a grouping variable.
Written by Cathy Akritas
Use with releases: 14 and 15
Code
Back to Top
Smooth
This macro replaces the missing values in a column using a smoothing technique that
handles missing values by assuming a linear relationship. This macro replaces missing
values in a column of data with the "average" of the data around them. One missing value
is replaced by the average of the observations before and after it. Multiple missing values
are replaced by "steps" between the known values.
Written by Andy Haines
Use with releases: 14 and 15
Code
Back to Top
Table
This macro produces this kind of table in the Session window:
Results
--------- ----------
Mean 0.087635
StDev 0.722207
--------- ----------
Tolerance Intervals
This macro calculates a (1-alpha)100% tolerance interval which covers at least p*100% of
the population (distribution).
Written by Cathy Akritas
Use with releases: 14 and 15
Code Documentation
000Macro Largely copied from Minitab Site 1/26/07
Back to Top
Trimmed Mean
This macro calculates the trimmed mean by removing the smallest p% and the largest p%
of the values (rounded to the nearest integer), and then averages the remaining values.
Written by Sarah Haines
Use with releases: 14 and 15
Code
Back to Top
likelihood function over a range of parameter values is displayed showing the likelihood
estimate and an approximate 95% confidence interval for the parameter. Also displayed is a
plot of the values of the PRESS statistic transformed back to the original response scale
over the 95% confidence interval. Optionally, the user may choose to specify the range of
parameter values in the plot of PRESS, display an index plot due to Cook and Wang (1983)
showing the influence of individual cases on the likelihood estimate, and store all computed
results.
Written by Steve Orlich and Mike Delozier
Use with releases: 14 and 15
Code Sample Data 1 Sample Data 2 Documentation
Back to Top
Box-Tidwell Procedure
This macro executes the Box-Tidwell procedure to determine appropriate predictor variable
power transformations for a regression model linear in the transformed predictors. It is
important to note that this procedure can be numerically unstable resulting in error
conditions for some data sets.
Written by Mike Delozier
Use with releases: 14 and 15
Code Sample Data 1 Sample Data 2 Documentation
Back to Top
Hildreth - Lu Procedure
The Hildreth - Lu procedure corrects for serial correlation (autocorrelation) in regression
type data.
Written by Cathy Akritas
Use with releases: 14 and 15
Code
Back to Top
000Macro Largely copied from Minitab Site 1/26/07
Nonlinear Regression
Performs a nonlinear regression based upon use of the Gauss-Newton method to iteratively
find solutions to the nonlinear regression normal equations.
Written by Gary Stork
Use with releases: 14 and 15
Code Sample Data 1 Documentation
Back to Top
Back to Top
Nonparametrics
1. Kendall's Tau
2. Kruskal Wallis Multiple Comparisons
3. Mann-Kendall Test for Detecting Trends
4. Sen's Slope
Kendall's Tau
This macro calculates Kendall's Tau, a nonparametric ranked correlation statistic.
Written by Veronica Bubb
Use with releases: 14 and 15
Code
Back to Top
Sen's Slope
This macro calculates Sen's Slope which is a nonparametric alternative for estimating a
slope for a univariate time series. This approach involves computing slopes for all the pairs
of ordinal time points and then using the median of these slopes as an estimate of the
overall slope. Sen's slope is insensitive to outliers and can be used to detect if there is a
trend in the data.
Written by Cathy Akritas
Use with releases: 14 and 15
Code