Session Commands
Session Commands
Minitab 18
Session Commands
Minitab®, Quality. Analysis. Results.® and the Minitab logo are registered trademarks of Minitab, Inc., in the United
States and other countries. Additional trademarks of Minitab, Inc. can be found at www.minitab.com. All other marks
referenced remain the property of their respective owners.
2
Contents
Using Session Commands............................................................................................................................................11
Alphabetical list of session commands................................................................................................................................................11
What are session commands?.................................................................................................................................................................27
Session command syntax notation........................................................................................................................................................27
Symbols to use with session commands.............................................................................................................................................27
Command prompts in the Session window....................................................................................................................................... 28
Typing session commands in the Session window.......................................................................................................................... 28
Executing session commands in the Command Line Editor........................................................................................................ 29
Enabling and disabling command language in the Session window....................................................................................... 29
Using a subcommand.................................................................................................................................................................................30
Using the History folder.............................................................................................................................................................................30
Rules for entering session command arguments............................................................................................................................. 31
Rules for entering session commands..................................................................................................................................................32
Executing a session command.................................................................................................................................................................32
Editing and re-executing session commands.................................................................................................................................... 32
Interrupting session command execution...........................................................................................................................................33
3
Minitab 18 Statistical Software Contents
NAME: Session command for assigning names to columns, stored constants, and matrices....................................... 56
OW: Session command for controlling the width of output....................................................................................................... 57
ABORT: Session window subcommand for exiting a multi-line command............................................................................ 57
HELP: Session command for opening this guide............................................................................................................................. 57
Basic Statistics.............................................................................................................................................................133
DESCRIBE: Session command for summarizing numeric data with statistics..................................................................... 133
STATS: Session command for storing descriptive statistics....................................................................................................... 137
GSUMMARY: Session command for displaying a graphical summary of each variable................................................ 140
ONEZ: Session command for performing a 1-sample Z-test.................................................................................................... 141
ONET: Session command for performing a 1-sample t-test..................................................................................................... 142
TWOT: Session command for performing a 2-sample t-test when samples are in one column................................ 143
TWOSAMPLE: Session command for performing a 2-sample t-test when the samples are in different columns. 144
PAIR: Session command for performing a paired t-test............................................................................................................. 145
PONE: Session command for performing a hypothesis test of the proportion................................................................ 146
PTWO: Session command for performing a hypothesis test of the difference between two proportions............ 147
ONERATE: Session command for performing a 1-sample Poisson rate test....................................................................... 148
TWORATE: Session command for performing a 2-sample Poisson rate test...................................................................... 149
ONEV: Session command for performing a 1 variance test...................................................................................................... 150
TWOVARIANCES: Session command for determining whether the variances or standard deviations of two groups
differ................................................................................................................................................................................................................152
CORRELATION: Session command for measuring the strength and direction of the association between two
variables.........................................................................................................................................................................................................154
COVARIANCE: Session command for calculating the covariance between pairs of columns...................................... 154
NORMTEST: Session command for performing a normality test............................................................................................ 155
OUTLIER: Session command for performing an outlier test...................................................................................................... 157
PGOODNESS: Session command for performing a chi-square goodness-of-fit test for Poisson distribution...... 159
Regression...................................................................................................................................................................160
INDICATOR: Session command for creating indicator variables.............................................................................................. 160
REGRESS: Session command for performing a regression analysis....................................................................................... 161
BREG: Session command for performing best subsets regression......................................................................................... 168
FITLINE: Session command for creating a fitted line plot.......................................................................................................... 169
SSWORKSHEET: Session command for creating a stability study worksheet..................................................................... 173
4
Minitab 18 Statistical Software Contents
ANOVA.........................................................................................................................................................................208
ONEWAY: Session command for performing a one-way ANOVA........................................................................................... 208
ANOM: Session command for creating an analysis of means chart...................................................................................... 212
ANOVA: Session command for performing a balanced ANOVA............................................................................................. 214
GLM: Session command for fitting the general linear model................................................................................................... 217
REML: Session command for fitting a mixed effects model...................................................................................................... 224
COMPARE: Session command for performing multiple comparisons of means............................................................... 231
MANOVA: Session command for performing a general MANOVA........................................................................................ 233
NESTED: Session command for performing a fully-nested ANOVA....................................................................................... 238
VARTEST: Session command for performing an equal variances test................................................................................... 238
INTPLOT: Session command for creating an interval plot.......................................................................................................... 240
MAIN: Session command for creating a main effects plot........................................................................................................ 242
INTERACT: Session command for creating an interactions plot.............................................................................................. 244
DOE..............................................................................................................................................................................247
Screening Designs......................................................................................................................................................................................247
Factorial Designs.........................................................................................................................................................................................259
Response Surface Designs......................................................................................................................................................................309
Mixture Designs..........................................................................................................................................................................................324
Taguchi Designs..........................................................................................................................................................................................376
Reliability/Survival.....................................................................................................................................................642
Test Plans.......................................................................................................................................................................................................642
Distribution Analysis (Right Censoring).............................................................................................................................................650
Distribution Analysis (Arbitrary Censoring)...................................................................................................................................... 665
Growth Curves.............................................................................................................................................................................................676
Regression with Life Data........................................................................................................................................................................682
Probit Analysis.............................................................................................................................................................................................687
Warranty Analysis.......................................................................................................................................................................................692
5
Minitab 18 Statistical Software Contents
Multivariate Analysis.................................................................................................................................................695
PCA: Session command for performing principal components analysis.............................................................................. 695
FACTOR: Session command for performing a factor analysis................................................................................................... 696
CLUOBS: Session command for clustering observations............................................................................................................ 699
CLUVARS: Session command for clustering variables.................................................................................................................. 703
KMEANS: Session command for non-hierarchical clustering of observations................................................................... 705
DISCRIMINANT: Session command for performing discriminant analysis.......................................................................... 706
ITEMANALYSIS: Command for performing item analysis........................................................................................................... 708
CA: Session command for performing simple correspondence analysis............................................................................. 709
MCA: Session command for performing a multiple correspondence analysis.................................................................. 713
Tables...........................................................................................................................................................................747
TABLE: Session command for creating one-way, two-way, and multi-way tables using categorical variables...... 747
TALLY: Session command for displaying a one-way table for each column....................................................................... 749
TCHISQUARE: Session command for performing a chi-square goodness-of-fit test...................................................... 750
XTABS: Session command for displaying one-way, two-way, and multi-way tables for categorical variables...... 751
Nonparametric Analysis............................................................................................................................................755
1-Sample Sign..............................................................................................................................................................................................755
1-Sample Wilcoxon....................................................................................................................................................................................755
MANN-WHITNEY: Session command for performing a Mann-Whitney test..................................................................... 756
FRIEDMAN: Session command for performing a Friedman test............................................................................................. 756
KRUSKAL-WALLIS: Session command for performing a Kruskal-Wallis test....................................................................... 757
MOOD: Session window command for performing a Mood's median test........................................................................ 757
RUNS: Session command for performing a runs test.................................................................................................................. 758
WALSH: Session command for calculating pairwise averages................................................................................................. 758
WDIFF: Session command for calculating pairwise differences............................................................................................... 758
WSLOPE: Session command for calculating pairwise slopes.................................................................................................... 759
Equivalence Test.........................................................................................................................................................760
TOST: Session command for performing an equivalence test.................................................................................................. 760
6
Minitab 18 Statistical Software Contents
Graphs..........................................................................................................................................................................788
CHART: Session command for creating a bar chart...................................................................................................................... 788
PLOT: Session command for creating a scatterplot...................................................................................................................... 791
MATRIXPLOT: Session command for creating a matrix of plots............................................................................................... 793
BUBBLEPLOT: Session command for creating a bubble plot..................................................................................................... 796
MARGPLOT: Session command for creating a marginal plot.................................................................................................... 798
HISTOGRAM: Session command for creating a histogram........................................................................................................ 800
DOTPLOT: Session command for creating a dotplot.................................................................................................................... 802
STEM-AND-LEAF: Session command for creating a stem-and-leaf plot.............................................................................. 804
PPLOT: Session command for creating a probability plot.......................................................................................................... 805
ECDF: Session command for creating an empirical CDF plot................................................................................................... 809
DPLOT: Session command for creating a probability distribution plot................................................................................. 811
BOXPLOT: Session command for creating a boxplot.................................................................................................................... 817
INTPLOT: Session command for creating an interval plot.......................................................................................................... 819
INDPLOT: Session command for creating an individual value plot........................................................................................ 822
LPLOT: Session command for creating a line plot......................................................................................................................... 824
PIECHART: Session command for creating a pie chart................................................................................................................ 826
TSPLOT: Session command for creating a time series plot........................................................................................................ 828
ARGRAPH: Session command for creating an area graph......................................................................................................... 830
CONTOURPLOT: Session command for creating a contour plot............................................................................................. 832
PLTX: Session command for creating a 3D scatterplot................................................................................................................ 834
SURFACEPLOT: Session command for creating a surface plot................................................................................................. 836
Graph Options.............................................................................................................................................................................................839
Model-Based Commands..........................................................................................................................................935
FACPLOT: Session command for creating a factorial plot.......................................................................................................... 935
7
Minitab 18 Statistical Software Contents
MFFCUBE: Session command for creating a cube plot for fitted means.............................................................................. 936
MMOPT: Session command for the Response Optimizer.......................................................................................................... 936
MOVERCONT: Session command for creating an overlaid contour plot............................................................................. 939
MSURFACE: Session command for creating a surface plot........................................................................................................ 940
PREDICT: Session command for predicting response values.................................................................................................... 942
RMCONTOUR: Session command for creating a contour plot................................................................................................. 946
Supporting Concepts.................................................................................................................................................974
Add your own function............................................................................................................................................................................974
Adding comments to a macro..............................................................................................................................................................974
Array table for OADESIGN......................................................................................................................................................................974
Assigning attributes to groups..............................................................................................................................................................975
Assigning attributes with multiple graphs and groups............................................................................................................... 975
Bar chart functions.....................................................................................................................................................................................976
Base position for project lines, area, and bar.................................................................................................................................. 977
Box-Behnken designs................................................................................................................................................................................977
Calculating a chi-square statistic for a goodness-of-fit test using session commands................................................. 978
Calculating a partial correlation coefficient using the CORRELATION session command............................................ 979
Calculations for FFACTORIAL.................................................................................................................................................................979
Central composite designs.....................................................................................................................................................................980
Computing weights, or smoothed values......................................................................................................................................... 981
Data requirements and formats for attribute agreement analysis.......................................................................................... 982
Default date/time formats......................................................................................................................................................................983
Designs generated by FFDESIGN.........................................................................................................................................................984
Entering data for factor variables.........................................................................................................................................................985
Entering data for response variables..................................................................................................................................................986
Entering patterned data for the SET session command.............................................................................................................. 986
Scenario and introduction......................................................................................................................................................................987
Examples of entering response data...................................................................................................................................................988
A comparison of MSURFACE and RMCONTOUR plots................................................................................................................ 991
Graphics options for MIXCONTOUR...................................................................................................................................................991
Graphics options for MIXOVER.............................................................................................................................................................993
Graphics options for MIXSURFACE......................................................................................................................................................994
8
Minitab 18 Statistical Software Contents
9
Minitab 18 Statistical Software Contents
10
Minitab 18 Statistical Software Using Session Commands
ALTTESTPLAN: Session command for creating an accelerated life test plan on page 646
ANOM: Session command for creating an analysis of means chart on page 212
ARDECISION: Session command for accepting or rejecting an entire lot on page 640
AREA: The session subcommand for shading the area below the data values to the base on page 839
ARIMA: Session command for modeling time series behavior and generating forecasts on page 716
AXLABEL: Session subcommand for customizing graph axis labels on page 841
B
BAR: Session window subcommand for representing data values with bars on page 843
BASE: Session command for fixing a starting number for the random number generator on page 87
BCAPA: Session command for performing binomial capability analysis on page 607
BFIT: Session command for creating a binary fitted line plot on page 198
BREAK: Session command for transferring control from a DO- or WHILE-loop on page 957
BREG: Session command for performing best subsets regression on page 168
BRIEF: Session window command for controlling the amount of Session window output on page 966
BWCAPA: Session command for performing between/within capability analysis on page 555
11
Minitab 18 Statistical Software Using Session Commands
C
CA: Session command for performing simple correspondence analysis on page 709
CALL and RETURN: Session commands for passing control to another macro on page 958
CAPA: Session command for performing a normal capability analysis on page 564
CCDESIGN: Session command for creating a central composite design on page 311
CCF: Session command for calculating cross correlation between two time series on page 718
CD: Session window command for displaying or changing the current directory on page 960
CDF: Session command for calculating the cumulative probability of an x-value on page 92
CFORMAT: Session command for conditional formatting of worksheet cells on page 126
CIBOX: The session subcommand for displaying a median confidence interval box on a boxplot on page 845
CLIMITS: Session command for specifying attributes for control limit lines on page 846
CLINE: Session command for specifying attributes for a center line on page 848
CMEAN: Session subcommand for connecting means with lines on a boxplot on page 849
CMEDIAN: Session subcommand for connecting means with lines on a boxplot on page 851
CODE: Session command for changing values in columns to new values on page 114
COFFSET and GAPWIDTH: Session subcommands for the space between clusters and items in a cluster on page 868
COMPARE: Session command for performing multiple comparisons of means on page 231
CONNECT: Session subcommand for connecting points with lines on page 852
CONVERT: Session command for converting text data to numeric data, and numeric data to text data on page 116
CORRELATION: Session command for measuring the strength and direction of the association between two variables
on page 154
COUNT: Session command for counting the number of values in a column on page 76
COVARIANCE: Session command for calculating the covariance between pairs of columns on page 154
12
Minitab 18 Statistical Software Using Session Commands
CUTPOINT, MIDPOINT, and NINTERVAL: Session subcommands for specifying cutpoints and midpoints on page
854
D
DATA: Session subcommand for controlling the data region within the figure region on page 855
DATE: Session command for changing data type to date/time on page 105
DCAPA: Session command for performing individual distribution identification on page 552
DEBUG and NODEBUG: Session commands for finding problems in macros on page 963
DECOMP: Session command for performing decomposition on a time series on page 719
DEFAULT: Session command for assigning default values to subcommand arguments on page 952
DEFTEST: Session command for defining the sensitivity of the tests for special causes on page 551
DES: Session command for performing double exponential smoothing on page 723
DESCRIBE: Session command for summarizing numeric data with statistics on page 133
DIR: Session window command for listing the names of all the files in a directory on page 960
DO and ENDDO: Session commands for looping through a block of commands on page 955
DOT: Session subcommand for displaying a symbol for each data value on page 861
DPLOT: Session command for creating a probability distribution plot on page 811
DTESTPLAN: Session command for creating a demonstration test plan on page 642
DTYPE: Session command for determining the data type of a column or a constant on page 953
E
ECDF: Session command for creating an empirical CDF plot on page 809
ECHO and NOECHO: Session window commands for displaying Minitab commands in the output on page 963
13
Minitab 18 Statistical Software Using Session Commands
ELLIPSE: Session subcommand for constructing an ellipse from points on a graph on page 862
ELSE, ELSEIF, IF, ENDIF: Session commands for executing code depending on a logical condition on page 954
ENDLAYOUT and LAYOUT: Session subcommands for specifying where a graph appears on a page on page 884
ENDDO and DO: Session commands for looping through a block of commands on page 955
ENDMACRO, GMACRO, and MACRO: Session commands for marking the beginning and ending of a macro on
page 949
ENDWHILE and WHILE: Session commands for repeating a block of commands depending on a logical expression
on page 956
ETESTPLAN: Session command for creating an estimation test plan on page 644
EVDESIGN: Session command for creating an extreme vertices design on page 324
EXCLUDE and INCLUDE: Session subcommands for including or excluding rows on a graph on page 876
EXIT: Session command for transferring control back to Minitab or for closing Minitab on page 959
F
FACPLOT: Session command for creating a factorial plot on page 258
FDATE/TIME: Session command for changing the format of date/time columns on page 130
FDESIGN: Session subcommand for power and sample size for a general full factorial design on page 765
FDESIGN: Session subcommand for power and sample size for a general full factorial design on page 765
FFACTORIAL: Session command for analyzing a full or fractional factorial design on page 273
FFDESIGN: Session subcommand for power and sample size for a 2-level factorial design on page 766
FFDESIGN: Session subcommand for power and sample size for a 2-level factorial design on page 766
FIGURE: Session subcommand for controlling the figure region within the graph region on page 863
FITD: Session command for fitting a distribution to the data on a probability plot on page 864
FITLINE: Session command for creating a fitted line plot on page 169
FNUMERIC: Session command for changing columns to numeric format on page 131
14
Minitab 18 Statistical Software Using Session Commands
%FORM: Session command for creating a data collection form for a 3-factor design on page 259
FREQUENCY: Session subcommand for using a frequency column for a graph on page 867
FTEXT: Session command for changing the format of text columns on page 131
G
GAGERR: Session command for performing a crossed gage R&R study on page 624
GAPS: Session subcommand for displaying a gap in time on a graph on page 867
GAPWIDTH and COFFSET: Session subcommands for the space between clusters and items in a cluster on page 868
GAWORKSHEET: Session command for creating a gage R&R study worksheet on page 617
GENVAR: Session command for creating a generalized variance chart on page 531
GFACTORIAL: Session command for fitting a general full factorial design on page 280
GLM: Session command for fitting the general linear model on page 217
GMACRO, MACRO, and ENDMACRO: Session commands for marking the beginning and ending of a macro on
page 949
GOTO and MLABEL: Session commands for branching to any line in a macro on page 958
GPAUSE: Session command for specifying how Minitab pauses when displaying Graph windows on page 967
GRAPH: Session subcommand for controlling the graph region fill and border line on page 868
MGRID, NOGRID, and NOMGRID: Session subcommands for controlling the grid on a graph on page 869
GROUP: Session subcommand for specifying categorical variables for grouping on page 869
GSCALE: Session command to determine appropriate scaling for a graph on page 969
GSUMMARY: Session command for displaying a graphical summary of each variable on page 140
GZLM: Session command for fitting a binary logistic model or a Poisson model on page 190
H
HELP: Session command for opening this guide on page 57
HLABEL: Session subcommand for labeling histogram bars on a marginal plot with y-axis values on page 871
HLINE: Session subcommand for specifying attributes for historical stage lines on page 872
15
Minitab 18 Statistical Software Using Session Commands
I
ICHART: Session command for creating an I chart on page 449
IDIDENTIFICATION: Session command for creating probability plots of arbitrarily-censored, failure (or survival) data
on page 665
IDOVIEW: Session command for creating a layout of distribution plots on page 667
IF, ELSEIF, ELSE, ENDIF: Session commands for executing code depending on a logical condition on page 954
ILABEL: Session subcommand for labeling individual values on a boxplot or interval plot on page 874
INCLUDE and EXCLUDE: Session subcommands for including or excluding rows on a graph on page 876
INDIVIDUAL: Session subcommand for displaying a symbol for each individual data value on a boxplot or an
individual value plot on page 876
INDPLOT: Session command for creating an individual value plot on page 822
INSERT: Session command for inserting rows of data into a worksheet on page 36
INTBAR: Session subcommand for displaying a vertical line with horizontal lines at the endpoints of the confidence
interval for the mean on page 878
INTLAB: Session subcommand for labeling interval bar endpoints on an interval plot on page 880
INVCDF: Session command for calculating the variable for a cumulative probability on page 94
INVERT: Session command for replacing a matrix value with its inverse on page 97
IQRBOX: Session subcommand for displaying an interquartile range box on a boxplot on page 882
IW: Session window command for setting the maximum width for input on page 56
J
JITTER and NOJITTER: Session subcommands for randomly offsetting data points to reveal overlapping points on
page 883
JOHNSON: Session command for applying the Johnson transformation on page 555
JOURNAL and NOJOURNAL: Session commands for saving typed Session window lines to a file on page 37
K
KKCAT, KKNAME, and KKSET: Session commands for using text on page 952
16
Minitab 18 Statistical Software Using Session Commands
L
LAG: Session command for calculating the lags of a column on page 64
LAYOUT and ENDLAYOUT: Session subcommands for specifying where a graph appears on a page on page 884
LBRIGHT: Session subcommand for specifying the brightness of the lights that illuminate a surface plot on page
885
LEGEND and NOLEGEND: Session subcommands for controlling the legend on a graph on page 885
LET: Session command for correcting a number in a worksheet or performing arithmetic on page 64
LIGHT: Session subcommand for specifying the position, color, and visibility of the lights that illuminate a surface
plot on page 888
LINE: The session subcommand for constructing a line from points on a graph on page 888
LNGAGE: Session command for performing a gage linearity and bias study on page 623
LONGMETHOD: Session command for performing an attribute gage study (analytic method) on page 631
LOWESS: Session subcommand for fitting a LOWESS smoother to a scatterplot, a matrix plot, a histogram, or a time
series plot on page 889
LREGRESSION: Session command for performing a regression analysis when the error distribution is Weibull, smallest
extreme value, exponential, log-normal, normal, logistic, or log-logistic on page 682
LTABLE: Session command for fitting a distribution to arbitrarily-censored data on page 669
LTEST: Session command for parametric or nonparametric distribution analysis on page 650
M
MA: Session command for calculating a moving average on page 728
MACHART: Session command for creating a moving average chart on page 495
MACRO, ENDMACRO, and GMACRO: Session commands for marking the beginning and ending of a macro on
page 949
MAIN: Session command for creating a main effects plot on page 242
MARKER: Session subcommand for displaying a symbol at specified points on a graph on page 890
MCA: Session command for performing a multiple correspondence analysis on page 713
MCAPA: Session command for performing a normal capability analysis for multiple variables on page 578
MCONSTANT, MCOLUMN, MMATRIX, and MTYPE: Session commands for declaring variables on page 949
MEALAB: Session subcommand for labeling means on a boxplot or an interval plot on page 891
MEAN: Session command for calculating the arithmetic mean of a column on page 76
17
Minitab 18 Statistical Software Using Session Commands
MEAN: Session subcommand for displaying symbol for each mean on a boxplot, interval plot, or individual value
plot on page 893
MEDIAN: Session subcommand for displaying a symbol for each median on a boxplot, interval plot, or individual
value plot on page 894
MERGE: Session command for merging two worksheets into one worksheet on page 99
MEWMA: Session command for creating a multivariate EWMA chart on page 536
MFFCUBE: Session command for creating a cube plot for fitted means on page 302
MGAGE: Session command for performing an expanded gage R&R study on page 619
MGRID, GRID, NOGRID, and NOMGRID: Session subcommands for controlling the grid on a graph on page 869
MIDPOINT, CUTPOINT, and NINTERVAL: Session subcommands for specifying cutpoints and midpoints on page
854
MIXOVER: Session command for creating an overlaid contour plot on page 361
MLABEL and GOTO: Session commands for branching to any line in a macro on page 958
MMATRIX, MCONSTANT, MCOLUMN, and MTYPE: Session commands for declaring variables on page 949
MNCAPA: Session command for performing nonnormal capability analysis for multiple variables on page 587
MOOD: Session window command for performing a Mood's median test on page 757
MOVERCONT: Session command for creating an overlaid contour plot on page 939
MRESET: Session command for restoring environment settings to pre-macro conditions on page 965
MTITLE: Session command for adding a title above output on page 961
MTYPE, MMATRIX, MCONSTANT, and MCOLUMN: Session commands for declaring variables on page 949
N
N: Session command for counting the nonmissing values in a column on page 77
18
Minitab 18 Statistical Software Using Session Commands
NAME: Session command for assigning names to columns, stored constants, and matrices on page 56
NEXT: Session command for transferring control from a loop to the beginning of the block on page 957
NGROWTH: Session command for performing a nonparametric analysis using a nonparametric growth curve on
page 679
NINTERVAL, CUTPOINT, and MIDPOINT: Session subcommands for specifying cutpoints and midpoints on page
854
NLOGISTIC: Session command for performing nominal logistic regression on page 204
NMISS: Session command for counting the missing values in a column on page 77
NNCAPA: Session command for performing a nonnormal capability analysis on page 572
NODEBUG and DEBUG: Session commands for finding problems in macros on page 963
NODTITLE, NODSUBTITLE, and NODFOOTNOTE: Session subcommands for suppressing titles, subtitles, and footnotes
on a graph on page 897
NOECHO and ECHO: Session window commands for displaying Minitab commands in the output on page 963
NOEMPTY and NOMISS: Session subcommands for excluding missing data from graphs on page 898
NOFRAME: Session subcommand for suppressing lines and labels on a graph on page 898
NOGRID, GRID, MGRID, and NOMGRID: Session subcommands for controlling the grid on a graph on page 869
NOHLEGEND: Session subcommand for suppressing the legend of hold values on a graph on page 898
NOJITTER and JITTER: Session subcommands for randomly offsetting data points to reveal overlapping points on
page 883
NOJOURNAL and JOURNAL: Session commands for saving typed Session window lines to a file on page 37
NOLEGEND and LEGEND Session subcommands for controlling the legend on a graph on page 885
NOMGRID GRID, MGRID, and NOGRID, and: Session subcommands for controlling the grid on a graph on page
869
NOMISS and NOEMPTY: Session subcommands for excluding missing data from graphs on page 898
NOOUTFILE and OUTFILE: Session commands for saving a Minitab session in a text file on page 39
NOPLUG and PLUG: Session commands for responding to errors in a macro on page 964
NOPROPORTIONAL and PROPORTIONAL: Session subcommands for making the boxes on a boxplot proportional
to the square root of the number of observations in the boxes on page 906
NOSEPSUBTITLE: Session subcommand for subtitles on separate pages of a multiple graph on page 898
NOTABLE and TABLE: Session subcommand for controlling the table within the figure region on page 926
19
Minitab 18 Statistical Software Using Session Commands
NOTE: Session command for adding comments that are displayed in the Session window on page 971
NOTITLE and TITLE: Session commands for displaying or suppressing a title on page 961
NOTRANSPOSE and TRANSPOSE: Session subcommands for transposing the x- and y-axis on a graph on page 931
NPCHART: Session command for creating a chart for the number of defectives on page 473
NTGAGE: Session command for performing a nested gage R&R study on page 628
NUMERIC: Session command for changing the data format of a date/time column or extracting date/time components
on page 117
O
OADESIGN: Session command for creating a Taguchi orthogonal array design on page 376
OAPREDICT: Session command for calculating predicted response values on page 382
ODBC: Session command for importing data from a database file on page 38
OLOGISTIC: Session command for performing ordinal logistic regression on page 201
ONERATE: Session command for performing a 1-sample Poisson rate test on page 148
ONERATE: Session subcommand for power and sample size for a 1-sample Poisson rate test on page 767
ONEVARIANCE: Session command for power and sample size for a 1 variance test on page 769
ONEWAY: Session command for power and sample size for one-way ANOVA on page 770
ONEWAY: Session command for power and sample size for one-way ANOVA on page 770
OUTFILE and NOOUTFILE: Session commands for saving a Minitab session in a text file on page 39
OUTLIER: Session subcommand for displaying a symbol for each outlier on a boxplot on page 901
OVERLAY: Session subcommand for combining graphs specified in a multiple graph command into a single graph
on page 902
P
PACF: Session command for calculating partial autocorrelation on page 732
20
Minitab 18 Statistical Software Using Session Commands
PAUSE and RESUME: Session commands for pausing and resuming a macro on page 960
PBDESIGN: Session subcommand for power and sample size for Plackett-Burman design on page 771
PCA: Session command for performing principal components analysis on page 695
PCAPA: Session command for performing a Poisson capability analysis on page 610
PDF: Session command for calculating the probability distribution of a continuous random variable on page 90
PDIAGNOSTIC: Session command for determining whether to use a P chart or a Laney P' chart on page 461
PGOODNESS: Session command for performing a chi-square goodness-of-fit test for Poisson distribution on page
159
PGROWTH: Session command for performing a parametric analysis using a parametric growth curve on page 676
PLS: Session command for performing partial least squares regression on page 185
PLUG and NOPLUG: Session commands for responding to errors in a macro on page 964
POLYGON: Session subcommand for constructing a polygon from points on a graph on page 904
PONE: Session command for performing a hypothesis test of the proportion on page 146
PONE: Session subcommand for power and sample size for a 1 proportion test on page 772
POWER: Session command for power and sample size on page 773
PPRIMECHART: Session command for creating a Laney P' chart on page 468
PRINT: Session window for displaying columns, constants, or matrices in the Session window on page 40
PROJECT: Session subcommand for extending projection lines from each point to the x-axis on page 905
PROPORTIONAL and NOPROPORTIONAL: Session subcommands for making the boxes on a boxplot proportional
to the square root of the number of observations in the boxes on page 906
PTILES: Session subcommand for specifying the location of the percentile lines on a graph on page 907
PTWO: Session command for performing a hypothesis test of the difference between two proportions on page 147
PTWO: Session subcommand for power and sample size for a 2 proportion test on page 775
R
RANDOM: Session command for generating random data on page 87
21
Minitab 18 Statistical Software Using Session Commands
RBOX: Session subcommand for displaying a range box on a boxplot on page 911
RCOUNT: Session command for counting missing and nonmissing values in a row on page 78
RDOVIEW: Session command for creating a layout of distribution plots on page 659
READ, SET, and INSERT: Session command for asking users questions and using the answers in a macro on page
970
RECTANGLE: Session subcommand for constructing a rectangle from points on a graph on page 912
REFERENCE: Session subcommand for specifying the axis and location of reference lines on a graph on page 913
REGRESS: Session subcommand for fitting a regression line to data on a graph on page 915
RESUME and PAUSE: Session commands for pausing and resuming a macro on page 960
RETRIEVE: Session command for retrieving a saved worksheet, project or graph into the current worksheet on page
44
RETURN and CALL: Session commands for passing control to another macro on page 958
RMAXIMUM: Session command for identifying the maximum value in each row on page 78
RMEAN: Session command for calculating the arithmetic mean in each row on page 78
RMEDIAN: Session command for identifying the median in each row on page 79
RMINIMUM: Session command for identifying the minimum value in each row on page 78
RN: The session command for counting the nonmissing values in a row on page 79
RNGAGE: Session command for creating gage run chart on page 618
RNMISS: Session command for counting the missing values in a row on page 79
ROWTOC: Session command for stacking multiple columns into one column on page 106
RRANGE: Session command for calculating the range in each row on page 79
RSREG: Session command for analyzing a response surface design on page 314
RSSQ: Session command for calculating the uncorrected sum of squares on page 79
22
Minitab 18 Statistical Software Using Session Commands
RSTDEV: Session command for calculating the standard deviation in each row on page 80
RSUM: Session command for adding the values in each row on page 80
S
SAME: Session subcommand for specifying that one or more axes are the same for multiple graphs on page 916
SAMPLE: Session command for generating rows of random data from specified columns on page 89
SCALE: Session subcommand for customizing the axes and ticks of a graph on page 917
SCDESIGN: Session command for creating a simplex centroid design on page 328
SEPARATE: Session subcommand for placing groups in separate graph windows when you use a paneling variable
on page 920
SES: Session command for performing single exponential smoothing on page 733
SFIT: Session subcommand for specifying the attributes of the surface on a 3D surface plot on page 920
SIMPLEX: Session command for creating a simplex design plot on page 343
SINTERVAL: Session command for calculating a sign confidence interval on page 755
SLABEL: Session subcommand for labeling the slices on a pie chart on page 920
SLICE: Session subcommand for specifying the attributes of slices on a pie chart on page 922
SOFFSET: Session subcommand for offsetting points from the center on page 923
SPCONT: Session command for creating a contour design plot on page 353
SPDESIGN: Session command for creating a 2-level split-plot design on page 268
SPFACTORIAL: Session command for analyzing a 2-level split-plot design on page 287
SPLIT: Session command for splitting a worksheet into multiple worksheets on page 104
SPSIMP: Session command for creating a simplex design plot on page 345
SSQ: Session command for calculating the uncorrected sum of squares on page 77
SSTI: Session command for sample size for tolerance intervals on page 777
23
Minitab 18 Statistical Software Using Session Commands
SSWORKSHEET: Session command for creating a stability study worksheet on page 173
STACK: Session command for stacking blocks of columns and constants on top of each other on page 120
STAMP: Session subcommand for specifying columns that contain time values for observations on page 923
STDEV: Session command for calculating the standard deviation of all the values in a column on page 77
STEST: Session command for performing a 1-sample sign test on page 755
SUBSET: Session command for copying specified rows to a new worksheet on page 106
SYMBOL: Session subcommand for displaying a symbol for each data value on page 925
T
TABLE and NOTABLE: Session subcommand for controlling the table within the figure region on page 926
TABLE: Session command for creating one-way, two-way, and multi-way tables using categorical variables on page
747
TALLY: Session command for displaying a one-way table for each column on page 749
TCHISQUARE: Session command for performing a chi-square goodness-of-fit test on page 750
TEXT: Session command for changing the data type of a column to text on page 118
TOGAGE: Session command for performing a Type 1 gage study on page 615
TONE: Session command for power and sample size for a 1-sample t-test on page 779
TOST: Session command for power and sample size for an equivalence test on page 780
TPAIRED: Session subcommand for power and sample size for a paired t-test on page 781
TRACE: Session command for creating a response trace plot on page 349
TRANSPOSE and NOTRANSPOSE: Session subcommands for transposing the x- and y-axis on a graph on page 931
TRANSPOSE: Session command for changing rows to columns, and columns to rows on page 97
24
Minitab 18 Statistical Software Using Session Commands
TSET: Session command for creating data that follow complicated patterns on page 82
TSGV: Session command for creating a Tsquared-generalized variance chart on page 521
TSHOW: Session subcommand for specifying the level of tick labels that are displayed on page 932
TSPLOT: Session command for creating a time series plot on page 828
TSWINT: Session command for performing Holt-Winters seasonal exponential smoothing on page 741
TTWO: Session subcommand for power and sample size for a 2-sample t-test on page 782
TWORATE: Session command for performing a 2-sample Poisson rate test on page 149
TWORATE: Session subcommand for power and sample size for a 2-sample Poisson rate test on page 784
TWOSAMPLE: Session command for performing a 2-sample t-test when the samples are in different columns on
page 144
TWOT: Session command for performing a 2-sample t-test when samples are in one column on page 143
TWOVARIANCES: Session command for determining whether the variances or standard deviations of two groups
differ on page 152
TWOVARIANCE: Session subcommand for power and sample size for a 2 variances test on page 785
TYPE: Session window command for displaying the contents of a file on page 961
U
UCHART: Session command for creating a U chart on page 484
UDIAGNOSTIC: Session command for determining whether to use a U chart or a Laney U' chart on page 489
UNSTACK: Session command for separating a column into multiple columns on page 121
UPRIMECHART: Session command for creating a Laney U' chart on page 478
V
VARTEST: Session command for performing an equal variances test on page 238
VASAMPLING: Session command for creating or comparing variables acceptance plans on page 638
VASPECT: Session subcommand for specifying the aspect ratio of the data box on page 932
VBOX: Session subcommand for specifying the display of the box that surrounds the data on a graph on page 932
VFACTORIAL: Session command for analyzing variability in a 2-level factorial design on page 294
VFIELD: Session subcommand for specifying the dimensions of the field of view in object units on page 932
VMASK: Session command for creating a two-sided CUSUM chart on page 515
VORDER: Session command for controlling the order for text categories to be processed by Minitab commands
on page 132
VPOSITION: Session subcommand for specifying the view position as a ratio on page 933
VUP: Session subcommand for specifying which direction is up in relation to the data box on page 933
25
Minitab 18 Statistical Software Using Session Commands
W
WALSH: Session command for calculating pairwise averages on page 758
WHILE and ENDWHILE: Session commands for repeating a block of commands depending on a logical expression
on page 956
WHISKER: Session subcommand for controlling the display of whiskers on a boxplot on page 933
WINTERVAL: Session command for calculating a Wilcoxon confidence interval on page 756
WORKSHEET: Session command for making a worksheet active, or closing or renaming it on page 49
WRITE: Session command for writing data to the screen or a data file on page 49
WTEST: Session command for performing a 1-sample Wilcoxon test on page 755
WTITLE: Session subcommand for specifying the title of the graph window on page 933
X
XBARCHART: Session command for creating an Xbar chart on page 412
XTABS: Session command for displaying one-way, two-way, and multi-way tables for categorical variables on page
751
Y
YESNO: Session command for prompting the user for a response on page 970
26
Minitab 18 Statistical Software Using Session Commands
Z
ZMRCHART: Session command for creating a Z-MR chart on page 444
ZONE: Session subcommand for power and sample size for a 1-sample Z-test on page 786
You can type session commands in the Command Line pane or the Command Line Editor.
Usually a command operates on one or more arguments (also called parameters) that you specify; they can be columns,
constants, matrices, numbers, file names, or text strings. For example, "C1" is the argument in the following command,
which tells Minitab to draw a histogram of the data in column C1:
MTB > HISTOGRAM C1
Minitab Help uses the following typographical conventions for describing the syntax of individual commands.
K
Denotes a constant such as 8.3 or K14.
C
Denotes a column such as C13 or 'Height'.
C...C
Means you can list one or more columns separated by spaces.
M
Denotes a matrix such as M5.
E
Denotes either a constant or column, and sometimes a matrix.
[]
Denotes an optional argument, for example [K1].
27
Minitab 18 Statistical Software Using Session Commands
MTB>
Command prompt. Type the session commands here and press Enter.
SUBC>
Subcommand prompt. Type the subcommands here or type ABORT to cancel the entire command.
DATA>
Data prompt. Enter data here. To finish entering data and return to the MTB> prompt, type END and press Enter.
CONT>
Continuation prompt. If the command from your previous line ends with the continuation symbol &, Minitab
displays CONT> on the next line so that you can enter the rest of the command or data.
Continue?
Output prompt. In some cases, you can control how much output Minitab should display. Answer Y or Enter to
continue displaying output, or N to discontinue. Your response to this prompt does not affect the execution of
a command. Your response affects only the display of output on the screen. By default, the output height is set
to 0, which means that output scrolls past without pausing. (You can always scroll back to browse output.) If you
set OH to some value, say 17, then Minitab pauses and displays "Continue?" every 17 lines. For information on
the OH subcommand, go to OUTFILE and NOOUTFILE: Session commands for saving a Minitab session in a text
file on page 39.
1. If commands are not enabled, choose Editor > Enable Commands while the Session window is active.
2. Type commands at the MTB> prompt in the last line of the Session window.
3. If the command has subcommands, end the command line with a semicolon.
28
Minitab 18 Statistical Software Using Session Commands
4. Type subcommands at the SUBC> prompt. Put a semicolon (;) after each subcommand. Put a period (.) after the
last subcommand.
5. Press Enter to execute a command. Use Ctrl+Enter to insert a blank line.
Create the commands in the dialog box, using one of three methods:
• Type the commands and subcommands directly into the dialog box. Use the Enter key to insert blank lines. To
change your preferences for the Enter key, follow these steps:
a. Choose Tools > Options > Session Window > Submitting Commands.
b. Under Submitting Commands from the Command Line Editor, select an option.
c. Click OK.
• Highlight the commands in the Session window or in the contents pane of the History folder. The highlighted
commands are displayed in the Command Line Editor. You can quickly re-execute commands using this method.
• Paste text from other applications, or other Minitab windows.
• To execute all of the commands in the Command Line Editor, click Submit Commands.
• To clear all commands in the Command Line Editor, press the F3 key.
29
Minitab 18 Statistical Software Using Session Commands
• The Session window displays output from menus and from session commands.
• The Session window does not display the commands that are used to generate output.
• Minitab displays messages in pop-up message windows.
• The History folder displays session commands.
Using a subcommand
Many session commands have subcommands. To use a subcommand, complete the following steps.
Note When you use a command with no subcommands, you do not have to type any punctuation mark after the command line.
1. Type the main command after the MTB> prompt and end the main command line with a semicolon (;).
2. Press Enter.
Minitab displays the SUBC> prompt.
3. Type as many subcommands as you need, ending each with a semicolon (;) and pressing Enter after each.
4. End the last subcommand with a period (.).
If you forget to end the last subcommand with a period, you can type the period all by itself on the next SUBC>
line.
5. To cancel the whole command, type ABORT as the next subcommand.
If you don't use the ABORT command, Minitab executes the entire command.
Note If you use the Data window to change a worksheet, a note is generated in the History folder.
30
Minitab 18 Statistical Software Using Session Commands
1. To print only a portion of the History folder contents, select the block of text that you want to print by dragging
with the mouse in the contents pane of the History folder.
2. Right-click the selected text, then choose Print.
3. To print the entire contents of the History folder, right-click on the History folder and choose Print History.
1. Select the block you want to copy by dragging with the mouse.
2. To copy the block to the Clipboard, right-click the select text, then choose Copy.
Variables
• Enclose variable names in single quotation marks (for example, HISTOGRAM 'Salary'). Certain commands, such as
ANOVA, GLM, and the high-resolution graphics commands do not require quotation marks, but all commands
work properly when quotes are used.
• In arguments, variable names and variable numbers can be used interchangeably. For example, the two following
commands do the same thing (if C1 is named 'Sales'):
DESCRIBE C1 C2
DESCRIBE 'Sales' C2
• You can abbreviate a consecutive range of columns, stored constants, or matrices with a dash. For example, PRINT
C2-C5 is equivalent to PRINT C2 C3 C4 C5.
• You can use a stored constant (such as K20) in place of any constant. You can even use stored constants to form
a range such as K20:15, which represents all integers from the value of K20 to 15.
Text strings
Enclose text strings, such as labels or file names, in double quotes (for example, TITLE "This is My Title"). In earlier
versions of Minitab, text was enclosed in single quotes. Although this still works, it is no longer recommended, and
can cause a conflict with column and constant names.
Numbers
• Do not enclose numbers in quotes unless you want the numbers to appear as text.
• To specify a range of numbers, abbreviate the sequence using these conventions:
1:4 expands to 1 2 3 4
4:1 expands to 4 3 2 1
31
Minitab 18 Statistical Software Using Session Commands
Note Some commands, called %macros, are macros that are invoked by typing % followed by the full macro name (you cannot abbreviate
macro names).
32
Minitab 18 Statistical Software Using Session Commands
1. Select a block of command text, from other Minitab windows or another application, by dragging with the mouse.
2. Copy the block of command text by choosing Edit > Copy, or pressing Ctrl+C.
3. Paste the block of command text into the Session window. If necessary, return to the Session window by choosing
Window > Session or clicking in the Session window. Place your cursor in the command prompt line. Choose
Edit > Paste, or pressing Ctrl+V.
Minitab ignores MTB>, SUBC>, and DATA> prompts in Session window commands when it pastes from the
Clipboard.
4. Edit the text, as necessary, in the Session window. Change highlighted command text by typing new text.
5. Execute the command or commands in the block of command text by pressing Enter.
33
Minitab 18 Statistical Software Opening, Saving, and Printing Files
Type END following the last data line typed after READ (for information, go to READ data into a matrix on page
43 or READ data into columns on page 40), SET on page 81, or INSERT on page 36 (unless a file name is used).
This ensures that any diagnostic messages concerning data lines will be printed before the next operation is
carried out. Use only at the DATA> Session window prompt.
GSAVE K
Saves the graph in a file.
The default file name is Minitab.MGF. You can specify a custom file name in double quotation marks ("file_name"),
or as a stored text constant (K). You can also use any of the following subcommands to save the graph in a different
graphics format.
Some graph commands—for example, HISTOGRAM C1 C2 C3—generate more than one graph. If you include
the GSAVE subcommand with such a command, Minitab saves multiple files. Minitab gives each file a different
file name. Minitab uses the first five characters of the name you specify, then appends a number (001, 002, and
so on), for up to 500 files.
If you try to overwrite an existing file using GSAVE, Minitab displays a message. The message asks whether you
want to replace the existing file. If you use GSAVE with no file name for multiple graphs, Minitab displays the
message only for the first graph. Then, Minitab replaces the other graphs automatically. You can use REPLACE or
NOREPLACE to bypass the message. Bypassing the message is especially useful in a macro. After you save the
file, you can view the graph with GVIEW.
34
Minitab 18 Statistical Software Opening, Saving, and Printing Files
REPLACE
Bypasses the message that asks whether you want to replace the existing file. If you use both REPLACE and
NOREPLACE, Minitab uses the last subcommand.
NOREPLACE
Bypasses the message that asks whether you want to replace the existing file. If a file with the same name
exists, Minitab displays an error and stops the command or quits the macro. If you use both REPLACE and
NOREPLACE, Minitab defaults to the last subcommand.
JPEG
JPEG color
PNGB
PNG black and white
PNGC
PNG color
PNGH
PNG high color
TIFB
TIF black and white
TIF
TIF color
BMPB
BMP black and white
BMPC
BMP color
BMPH
BMP high color
GIF
GIF
EMF
EMF
RESOLUTION K
Saves the graph at a resolution of K dots per inch.
You do not have to specify the MGF extension in the file name. If you saved the file with an extension different than
MGF, specify both the filename and extension. You may specify the filename as either the name of the file in double
quotes, or a stored text constant.
35
Minitab 18 Statistical Software Opening, Saving, and Printing Files
If you do not specify a file, GVIEW displays the file Minitab.MGF if it exists.
GVIEW "filename"
Opens a graph from the text string "filename".
GVIEW K
Opens a graph from the stored text constant K.
For information on using this command without subcommands to select data entry options, Using READ and
INSERT without subcommands on page 1028.
For additional information on INSERT, go to Reading in data from a text file on page 1021 and Inserting data into
existing columns on page 1014.
Note The menu commands File > Open Worksheet and File > Merge Worksheet also open ASCII (text) files, and many other types
of files as well. They also provide several useful options that are not available with READ or INSERT.
FILE "filename"
FILE K
Inserts data from the specified text file. You may specify the filename as either the name of the file in double
quotes, or a stored text constant. If the file has an extension other than DAT and/or if it is not in your current
directory, include the file extension and the path within the single quotation marks. For example, use the
following command to read a copy of the file SALES.ASC stored in the subdirectory JANUARY underneath
the directory SMITH on the C drive.
READ C1-C5;
FILE "C:\SMITH\JANUARY\SALES.ASC".
The FORMAT subcommand is useful when you want to skip over spaces, read data that have no spaces
between them, insert decimal points in numbers, or read in text data, date/time data, or currency data.
Format items may be combined together according to the normal rules of Fortran formats. For example, the
following command reads the name in the first 20 spaces of each data line into Name (C12), skips the next
10 spaces (spaces 21 through 30), then reads the number in space 31 into C1, the number in space 32 into
C2, ..., the number in space 40 into C10.
NAME C12 'Name'
READ 'Name' C1-C10;
FILE "MYDATA";
FORMAT(A20, 10X, 10F1).
36
Minitab 18 Statistical Software Opening, Saving, and Printing Files
Minitab has a special date/time (DT) format which works as shown below. This says to read the date/time
value in the first 8 spaces in the file into C1, and that the format of the date/time data in the file is m/d/yy.
READ C1;
FILE "DATEDATA";
FORMAT(DT8m/d/yy).
The following example shows the use of a repeat factor in front of parentheses, T format, and the slash.
READ C11-C15;
FILE "EMPLOYEEDATA";
FORMAT (F2.1, 2(1X,F3), T60, F4/F2).
This example uses two data lines for every row read. From the first line, the value of C11 is in spaces 1 and
2. Space 3 is skipped, and C12 is read from spaces 4 to 6. Space 7 is skipped, and C13 is read from spaces 8
to 10. Then the reading jumps to space 60, and C14 is read from spaces 60 to 63. In response to the /, reading
moves to the second data line, and C15 is read from spaces 1 and 2. For more information, go to Valid format
items on page 1032.
NOBS K
The NOBS subcommand specifies the number of observations (rows) to be inserted. If an END on page 34
subcommand or end-of-file is encountered before K observations are inserted, NOBS is ignored. NOBS is
useful when you want to insert just the first portion of a file. It is also useful for Prompting a user for
information on page 1021.
SKIP K
Tells Minitab to skip K lines at the top of the data file before beginning to INSERT data into the file. This is
most useful when you have one or more lines of text, such as column names and titles, at the top of a data
file that you want to import into Minitab.
JOURNAL K
Saves all typed Session window lines (commands and data), but not commands that are executed from within a
macro, to an ASCII text file.
You specify the filename as either the name of the file in double quotes, or a stored text constant. If you omit the
file name, JOURNAL uses the default name Minitab.MTJ. If you omit the file extension, JOURNAL adds the default
extension MTJ.
The file is a standard ASCII file, which can be printed and edited by any editor or word processor. On most
computers, Minitab adds the extension MTJ to the file name.
JOURNAL stays in effect until you type NOJOURNAL. If you type JOURNAL again with the same file name, input
lines are appended to this file.
Keeping a journal of input commands can save considerable time in creating Minitab macros. Any problems with
the macro will be observed as each command is entered and executed. All commands are saved in the journal
file, which can be run at any time with the command EXECUTE on page 973. Or, with minimal editing in word
processing software or text editing software, you can convert a journal file to a global macro and invoke it with
the symbol %.
37
Minitab 18 Statistical Software Opening, Saving, and Printing Files
NOJOURNAL
NOJOURNAL closes the open journal file. If you type JOURNAL again with the same file name, input lines are
appended to this file.
With ODBC (open database connectivity), you can import a subset of data, such as data collected during a certain
month, into the Minitab worksheet. ODBC adds data to the worksheet to the right of existing columns, if there
are any (just as File > Merge Worksheet does).
To use the ODBC session commands (for example, in a macro) use this method to identify the correct syntax:
1. Choose File > Query Database (ODBC) to query data.
2. When you have successfully retrieved the data you want, copy the corresponding command language from
the History window. (Open the History window by pressing Ctrl+H.)
3. The COLUMNS subcommand is not created when you use the ODBC dialog boxes. If you are creating a local
macro, add this subcommand yourself. Remember that in a local macro, columns must be declared before
they are used as arguments in any commands. The ODBC session command can also query more than one
table at a time.
SQLSTRING "sqlstring"
SQL specifies the query that selects a subset of the data. The text string argument can be very long.
COLUMNS C...C
COLUMNS specifies which columns of the Minitab worksheet should hold the data. This argument is required
in local macros. In global macros or Execs, or when using Minitab interactively, executing the ODBC command
without the COLUMNS subcommand places new data at the end of the global worksheet.
38
Minitab 18 Statistical Software Opening, Saving, and Printing Files
OUTFILE K
OUTFILE saves your Minitab session in a text file. You can specify the filename as either the name of the file in
double quotation marks, or as a stored text constant.
After OUTFILE is typed, Minitab sends a copy of the commands and output that you see in the Session window
to a text file. OUTFILE is in effect until you type NOOUTFILE or you exit Minitab. If you type OUTFILE again, with
the same file name, output is appended to the end of this file.
The file is a standard text (ASCII) file, which can be printed and edited by any editor or word processor. Unless
you specify a different file extension, Minitab adds the extension LIS to the file name.
You can use OUTFILE to get a printout of your worksheet. Suppose your current worksheet contains data in the
first 10 columns. For example, the following commands save a copy of your worksheet is to a file named Sales.LIS
in your default directory.
OUTFILE "Sales"
PRINT C1-C10
NOOUTFILE
NOOUTFILE
NOOUTFILE closes an open outfile. If you type OUTFILE again with the same file name, input lines are appended
to the same file.
Output dimensions
OW K
OW sets the output width of the file. Values of 30 to 132 are allowed for K, although some commands cannot
make their output narrower than 70. Values of 70 to 80 are useful for including output in reports.
OH K
OH sets the page height for the file. If K lines have been output since the last new page, or if the next logical block
of output would cause more than K lines to be output since the last new page, then a new page is begun. OH =
0 says to do no automatic paging of the output.
Output instructions
NOTERM
Sends output to the file only. The only output that is displayed is error messages and graphs.
NOECHO
Specifies not to display commands or macro statements in the output file.
39
Minitab 18 Statistical Software Opening, Saving, and Printing Files
You can print one or more (or any mixture of) columns, stored constants, or matrices. If only one column is printed,
it is printed across the screen. If two or more columns are printed, they are printed vertically next to each other.
If there are too many to fit across the screen, the columns are printed in several groups.
The number of columns printed across the screen can be adjusted by using the OW on page 57 command.
If you print more than one constant or matrix, they will be printed vertically, one on top of the other.
Minitab chooses the output format (i.e., number of decimal digits printed). If you want to control this yourself,
use the FORMAT subcommand.
If you mix columns, constants, and matrices in one PRINT command, they are printed out in the following order:
first all matrices and constants (in the order you specified), then all columns (in the order you specified). For
example, the following command prints M1, K2, K1, and M2, then C1, C4, and C3.
PRINT C1 C4 M1 K2 C3 K1 M2
If a number is too large to fit in the space allowed (and FORMAT is not used), the number is printed in exponential
format. If more than one column is printed (and FORMAT is not used), the row number is printed at the left-hand
side of the page. To print one column vertically (with the row numbers), print the desired column and an empty
column.
You can print columns containing text data with or without using a FORMAT subcommand. If a format is not
specified, and if very wide items are to be printed (for example, 80 wide), and if the output width is not wide
enough to print the entire item (for example, OW = 72), the items will be truncated on the right.
The following command prints numbers single-spaced, five numbers on each line, each number in a field of
ten spaces.
PRINT C11-C15;
FORMAT (5F10).
READ enters new data into columns, replacing any data already in those columns, if it exists. Use INSERT on page
36 to add data to the top, between two rows, or at the bottom of existing columns. For information on entering
data into a matrix, go to READ data into a matrix on page 43.
When you enter data manually, type END. after you enter your final value.
40
Minitab 18 Statistical Software Opening, Saving, and Printing Files
When you use READ, you can use a space or a comma to separate data entries. For example:
READ C1 C5.
1 2
3,4
END.
For details on using this command without subcommands to select data entry options, go to Using READ and
INSERT without subcommands on page 1028.
Note The menu commands File > Open Worksheet and File > Merge Worksheet also open ASCII (text) files and many other types
of files. They also provide several useful options not available with READ or INSERT.
FILE "filename"
Inserts data from the specified text file. You may specify the filename as either the name of the file in double
quotes, or a stored text constant. If the file has an extension other than DAT and/or if it is not in your current
directory, include the file extension and the path within the single quotation marks. For example, use the
following command to read a copy of the file SALES.ASC stored in the subdirectory JANUARY underneath
the directory SMITH on the C drive.
READ C1-C5;
FILE "C:\SMITH\JANUARY\SALES.ASC".
The FORMAT subcommand is useful when you want to skip over spaces, read data that have no spaces
between them, insert decimal points in numbers, or read in text data, date/time data, or currency data.
Format items may be combined together according to the normal rules of Fortran formats. For example, the
following command reads the name in the first 20 spaces of each data line into Name (C12), skips the next
10 spaces (spaces 21 through 30), then reads the number in space 31 into C1, the number in space 32 into
C2, ..., the number in space 40 into C10.
NAME C12 'Name'
READ 'Name' C1-C10;
FILE "MYDATA";
FORMAT(A20, 10X, 10F1).
Minitab has a special date/time (DT) format which works as shown below. This says to read the date/time
value in the first 8 spaces in the file into C1, and that the format of the date/time data in the file is m/d/yy.
READ C1;
FILE "DATEDATA";
FORMAT(DT8m/d/yy).
The following example shows the use of a repeat factor in front of parentheses, T format, and the slash.
READ C11-C15;
FILE "EMPLOYEEDATA";
FORMAT (F2.1, 2(1X,F3), T60, F4/F2).
This example uses two data lines for every row read. From the first line, the value of C11 is in spaces 1 and
2. Space 3 is skipped, and C12 is read from spaces 4 to 6. Space 7 is skipped, and C13 is read from spaces 8
to 10. Then the reading jumps to space 60, and C14 is read from spaces 60 to 63. In response to the /, reading
moves to the second data line, and C15 is read from spaces 1 and 2. For more information, go to Valid format
items on page 1032.
NOBS K
The NOBS subcommand specifies the number of observations (rows) to be inserted. If an END on page 34
subcommand or end-of-file is encountered before K observations are inserted, NOBS is ignored. NOBS is
41
Minitab 18 Statistical Software Opening, Saving, and Printing Files
useful when you want to insert just the first portion of a file. It is also useful for Prompting a user for
information on page 1021.
SKIP K
Tells Minitab to skip K lines at the top of the data file before beginning to INSERT data into the file. This is
most useful when you have one or more lines of text, such as column names and titles, at the top of a data
file that you want to import into Minitab.
TAB
TAB, NONAMES and ALPHA work with READ when only when reading a file. They do not work with READ if you
type data at the DATA> prompt. For more information, go to Using READ with TAB on page 1029.
TAB imports tab-delimited data into Minitab. TAB automatically checks for column names and text columns. You
cannot use TAB with FORMAT.
Suppose your text file looks like this, where <Tab> is used in place of tab characters:
ID <Tab> Height <Tab> Weight
3B <Tab> 60 <Tab> 100
4A <Tab> 58 <Tab> 89
42 <Tab> 60 <Tab> 120
The following command reads the file MYFILE.DAT (or the file MYFILE with no extension) into the first three
columns of the worksheet, identifies the first column as text, the next two columns as numeric, and names the
three columns ID, Height, and Weight.
READ C1-C3;
FILE "MYFILE";
TAB.
If you use TAB alone (without NONAMES or ALPHA), Minitab proceeds as follows: It checks the first row of the
file. If the row contains non-numeric values, Minitab reads that row as column names.
If the first row is all numeric (or an allowable currency format), Minitab reads it as numeric data. Minitab then
reads the remaining rows as data. To determine whether a column is text or numeric, Minitab looks at the first
row of data (either row one or two). If a column contains a text value in that row (other than an allowable currency
symbol), the column is treated as text. Otherwise, it is treated as numeric.
NONAMES
If you do not want TAB to read the first row of your file as column names, use NONAMES in addition to TAB.
ALPHA K...K
If you want READ to treat particular columns as text columns, thereby overriding TAB's automatic checking,
use ALPHA. The numbers you list with ALPHA tell Minitab which columns in the data file are text. For example,
ALPHA 2 tells Minitab that the second column in the data file (and only the second column) is text. The
following command imports a tab-delimited, data (text) file into C11- C15, with no column names, and treats
the third and fourth input columns (these were put into C13 and C14 in this case) as text columns.
READ C11-C15;
FILE "MYFILE";
TAB;
NONAMES;
ALPHA 3 4.
42
Minitab 18 Statistical Software Opening, Saving, and Printing Files
DECIMAL ","
DECIMAL "."
Specifies a comma or period as a decimal separator.
You can use either spaces or commas to separate the data in the matrix.
You must specify the dimension of the matrix in the READ command. The first K gives the number of rows, the
second K the number of columns. If a file name is not used, READ is followed by data lines, each containing one
row of the matrix. The following command creates the following matrix.
Command
READ 3 4 M2
1 2 3 4
5 6 7 8
9 10 11 12
END
Matrix
1 2 3 4
5 6 7 8
9 10 11 12
FILE "filename"
FILE K
Reads or inserts data from the specified text file.
RESTART erases the worksheet, cancels any controls in effect, such as IW, and closes all open files such as OUTFILE
and JOURNAL.
43
Minitab 18 Statistical Software Opening, Saving, and Printing Files
RETRIEVE K
Note You cannot use RETRIEVE in a local macro. For more information, go to Session commands that are not allowed in macros on
page 1023.
Retrieves a saved worksheet, project, or graph from the specified file into the current worksheet. You may specify
the filename as either the name of the file in double quotes, or a stored text constant. When no subcommands
are specified, worksheet is the default file type for RETRIEVE.
If you omit the file name and the current folder contains a file named Minitab.MTW, then Minitab opens that file.
To open one of the sample data sets that are included with Minitab, use WOPEN on page 46.
Note The menu command File > Open Worksheet and the session command WOPEN on page 46 also open Minitab saved worksheets
and Excel files (and many other types of files). They provide several useful options that are not available with RETRIEVE.
PORTABLE
Opens a portable worksheet.
A portable worksheet is in a format that you can transfer to a computer of a different type and retrieve (using
PORTABLE with RETRIEVE in Minitab) on that computer. For example, you can save a portable worksheet on
an IBM or Macintosh computer, transfer the worksheet to a VAX computer, and retrieve the worksheet on
the VAX.
RETRIEVE and SAVE are much slower with portable worksheets, so use a portable worksheet only to transfer
worksheets between computers.
The portable format is in 80-character records that contain only printable characters. Never try to edit a
portable format worksheet (or a regular worksheet), because Minitab reads only worksheets that are written
in a very specific format.
PROJECT
Note You cannot use PROJECT in a global macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
GRAPH
Retrieves a Minitab graph file (MGF).
REPLACE
Bypasses the message that asks whether you want to replace the existing file. If you use both REPLACE and
NOREPLACE, Minitab uses the last subcommand.
NOREPLACE
Bypasses the message that asks whether you want to replace the existing file. If a file with the same name
exists, Minitab displays an error and stops the command or quits the macro. If you use both REPLACE and
NOREPLACE, Minitab defaults to the last subcommand.
44
Minitab 18 Statistical Software Opening, Saving, and Printing Files
Saves a worksheet or project. You can specify the filename as either the name of the file in double quotation
marks, or a stored text constant. When no subcommands are specified, worksheet (MTW) is the default file type
for SAVE.
A saved worksheet file contains all data stored constants, matrices, column names, and missing value information.
You can use only RETRIEVE on page 44 or WOPEN on page 46 with a saved worksheet. You cannot edit view or
edit a saved worksheet. You can retrieve a worksheet only on the same type of computer on which it was saved.
However, for most applications, saved worksheets are the most efficient and convenient way to store data for use
in Minitab.
By default, if you use SAVE "filename" when the file already exists, Minitab prompts you to replace the file before
proceeding. If you save without a file name, then Minitab automatically replaces the file. You can use the
subcommands REPLACE and NOREPLACE to override Minitab's default behavior.
PROJECT
Specifies to save as a Minitab Project file (MPJ).
WSONLY
Use the subcommand WSONLY to save only worksheets with the saved project.
RELEASE [K]
Specifies to save file in release 17, 16, or 15 format. If you do not use this subcommand, Minitab saves the
file in release 17 format.
REPLACE (default)
Bypasses the message that asks whether you want to replace the existing file. If you use both REPLACE and
NOREPLACE, Minitab uses the last subcommand.
NOREPLACE
Bypasses the message that asks whether you want to replace the existing file. If a file with the same name
exists, Minitab displays an error and stops the command or quits the macro. If you use both REPLACE and
NOREPLACE, Minitab defaults to the last subcommand.
45
Minitab 18 Statistical Software Opening, Saving, and Printing Files
Opens a worksheet. You can open one of the sample data sets that Minitab includes. For example, to open a data
set named PULSE, enter the following command.
WOPEN "PULSE"
When you open a file, you copy the contents of the file into the current Minitab project. Any changes that you
make to the worksheet while in the project do not affect the original file.
FTYPE
Specifies the type of the file to open. Use one of the following subcommands for FTYPE:
MINITAB
EXCEL
XMLEXCEL
TEXT
CSV
You must specify the file type, such as EXCEL, to use some of the other subcommands, such as VNAMES. If
you do not specify the file type, then Minitab considers the file extension. For example, if you enter WOPEN
"Mywork.xls" but do not specify a file type, then Minitab opens the file as an Excel file. However, if that
Excel file were saved with the name Mywork.abc, Minitab would not recognize the file as an Excel file, and
would display an error message or open the file incorrectly.
When you open a Minitab worksheet (with FTYPE; MINITAB), you do not need to specify a release number.
MERGE
Merges the file into the current worksheet instead of creating a new worksheet. MERGE is equivalent to the
merge option in the File > Open Worksheet command.
FIELD
FIELD allows you to specify how fields are delimited.
Use one of the following subcommands to specify what character denotes the sections of data to be placed
into each field. If FIELD is not specified, Minitab uses the default the default delimiter for the file type.
TAB
COMMA
SEMICOLON
SPACE
PERIOD
CUSTOM K
TDELIMITER
Specifies how text fields are delimited.
46
Minitab 18 Statistical Software Opening, Saving, and Printing Files
DOUBLEQUOTE
Use when the columns of data are separated by a double quotation mark.
SINGLEQUOTE
Use when the columns of data are separated by a single quotation mark.
NONE
Use to have text that is separated by a blank entered into its own column.
CUSTOM K
Use if the columns are separated by a character other than those listed above and enter the character
as K.
DECSEP
Specifies how decimals are separated.
COMMA
Specifies that decimals are separated by a comma.
PERIOD
Specifies that decimals are separated by a period.
MISSING
Specifies how to write out a missing value.
TEXT K K
Denotes text columns, with the first K as the "missing" marker in the file's original form, and the second
K as the one or more words, characters, or spaces that you want Minitab to replace these markers with.
The default Minitab marker for missing text is a space.
NUMERIC 'K' K
Denotes numeric columns, with the first K as the missing marker in the file's original form, and the
second K as the digits, characters, or spaces that you want Minitab to replace these markers with. The
default Minitab marker for missing numeric data is an asterisk (*). The missing value symbol (first K)
must be enclosed in single quotation marks.
DATA
Specifies where to begin reading data in the file to be opened.
IGNOREBLANKROWS
Skips over blank data rows. If you don't use this command, Minitab reads blank data rows as missing
values.
EQUALCOLUMNS
Adds missing values (*) to shorter columns to so that all columns have the same number of rows.
CLEAN
Removes nonprintable characters and extra spaces from text columns.
CASE
Corrects case mismatches in text columns by applying the capitalization of the first occurrence of a text
value to all matching values in the column.
47
Minitab 18 Statistical Software Opening, Saving, and Printing Files
REPLACE
Bypasses the message that asks whether you want to replace the existing file. If you use both REPLACE and
NOREPLACE, Minitab uses the last subcommand.
NOREPLACE
Bypasses the message that asks whether you want to replace the existing file. If a file with the same name
exists, Minitab displays an error and stops the command or quits the macro. If you use both REPLACE and
NOREPLACE, Minitab defaults to the last subcommand.
SHEET K
th
Controls the way the K sheet in the file is read. SHEET can be used one time for each sheet in the file.
EXCLUDE
Stops the sheet from being imported.
VNAMES K
Specifies the row number K that contains the variable names. −1 indicates no variable names. 0 indicates
that the first row that is being imported is the variable names row.
FIRST K
Specifies the row number K to begin reading the data. If you do not choose a variable names row,
Minitab begins reading data from the first available row in the file.
NROWS K
Specifies the number of data rows. Enter a number to read a portion of the file. For example, if you enter
50, Minitab reads only the first 50 rows beginning with the first row of data. By default, Minitab reads
all rows from the file into the current worksheet.
VARIABLE K
Controls the way the Kth variable in the file is read. It can be used one time for each variable in the file.
NAME K
Assigns a name to the variable. Names can be up to 31 characters long, and can include any letters and
numbers except the symbol ' (single quotation mark) or # (pound sign). Names cannot begin or end
with a blank or consist entirely of the symbol * (asterisk). You also can name your variables directly in
the Data window after the worksheet is open.
TEXT
Specifies that the data type is text.
NUMERIC
Specifies that the data type is numeric.
DATETIME
Specifies that the data type is date/time.
COLUMN C
Specifies which column of the worksheet (C) the variable is placed in.
48
Minitab 18 Statistical Software Opening, Saving, and Printing Files
Specifies K as the current worksheet. If no worksheet is specified, the current worksheet is used.
When you are working in Minitab, any command that you use works on the current worksheet. The current
worksheet is the worksheet associated with the active Data window.
You can also make a window active by clicking on it or choosing it from the Window menu. If no Data window is
active, the command acts on the Data window that was most recently active.
Note A worksheet can contain up to 4000 columns, 1000 constants, and up to 10,000,000 rows depending on how much memory
your computer has.
CLOSE
Closes the worksheet.
NOPROMPT
Specifies not to prompt to save when saving the worksheet.
CURRENT
Specifies to make the named worksheet active.
RENAME K
RENAME "text"
Renames the worksheet.
WRITE exports your data to a data file which you can import into other applications, print on your printer, or enter
into Minitab with READ (for more information, go to READ data into columns on page 40 or READ data into a
matrix on page 43), SET on page 81, or INSERT on page 36. WRITE prints the columns vertically, very close
together, with no column names or row numbers and prints constants horizontally, whether they are stored
numeric or text constants.
If you omit the file name, WRITE displays the columns or constants on your screen. If you specify a file name but
omit the extension, WRITE adds the default extension DAT.
Use the FORMAT subcommand to write data with a fixed format, for example, columns not separated by spaces.
49
Minitab 18 Statistical Software Opening, Saving, and Printing Files
By default, if you WRITE to a file that already exists, Minitab asks you whether or not you want to replace the file
before proceeding. You can use the subcommands REPLACE and NOREPLACE to override Minitab's default
behavior.
WRITE normally creates a data file. It can also be used to print columns or constants on your screen or on paper.
The output is very compact. With columns, there is no header giving the column name, and there are no row
numbers on the left. Columns are always output vertically. Constants are output horizontally, whether they are
stored numeric or text constants.
A data file created with the WRITE command can be transferred to different computer types and read by other
programs. On most computers, the default file name extension is DAT.
• The output is no wider than the 80 character default, or the output width specified by the OW on page 57
command.
• The format of the output is adjusted to make the data as compact as possible. Thus, the number of columns
that can be put on one line varies with the data. If all columns do not fit on one line, the continuation symbol
(&) is put at the end of the line and the data are continued onto the next line.
• If a format is not specified, and if very wide text items are to be printed (e.g., 80 wide), and if the output width
is not wide enough to print the entire item (e.g., OW = 72), the items will be truncated on the right.
• When writing columns of unequal length to a file, Minitab makes them equal by adding missing value symbols
(*) to the short columns.
Note The menu command File > Save Worksheet As and the session command WSAVE on page 51 can also save the current
Minitab worksheet as a text file, and many other file types as well. It also provides several useful options not available with WRITE.
FILE "filename"
Specify to write to a data file (also called text or ASCII file). You may specify the filename as either the name
of the file in double quotes, or a stored text constant. If you specify a file name but omit the extension, WRITE
adds the default extension DAT. Use the subcommands UTEXT and TEXT to specify Unicode or ANSI text for
the file.
UTEXT
Saves the file in Unicode format.
TEXT
Saves the file in text format.
FORMAT
A format specification, similar to a Fortran format, may be given on this subcommand. For more information,
go to Valid format items on page 1032.
The format specifies where the data will appear on the output lines, and the number of decimal places printed.
FORMAT works the same way with WRITE as it does with READ (with the exception of the currency format,
which works with READ but not WRITE). For more information, go to READ data into columns on page 40
or READ data into a matrix on page 43.
The following table shows how 123.456 is output with different formats.
Format Output
F7.3 123.456
F7.2 123.46
I7 123
E11.6 1.23456E+02
G7 123.456
50
Minitab 18 Statistical Software Opening, Saving, and Printing Files
If you create a file with WRITE, using a FORMAT, then the READ command (for more information, go to READ
data into columns on page 40 or READ data into a matrix on page 43) can read the file with the same format.
To create a file that READ can read without a format (or other programs can read without a format), make
sure that there is at least one space between numbers. One way to do this is with the X format item. For
example, the following command creates a file which can be read without a format.
WRITE C1-C5;
FILE "FileA";
FORMAT ( 5(1x, F11) ).
Missing numeric data are output as * in the right-most space of the field. Missing text data are output as
blanks.
You can write columns that contain text data with or without using a FORMAT subcommand. You must,
however, use a FORMAT subcommand to READ the file.
Column format
TAB
TAB saves the specified columns, separated by tabs, in a data (also called text or ASCII) file. Do not use with
FORMAT with tab-delimited data. The OW command does not apply to WRITE using TAB.
NONAMES
If you do not want to include the column names in the file, use the NONAMES subcommand in addition to
TAB.
File instructions
REPLACE and NOREPLACE allow you to bypass the "REPLACE?" prompt and are most useful in macros.
REPLACE
When you specify REPLACE, Minitab always overwrites the file.
NOREPLACE
When you specify NOREPLACE and you have an existing file with the same name, Minitab generates an error
message and aborts the command or exits the macro.
If your current worksheet is untitled ("Worksheet1 ***" appears in the title bar of the Minitab Data window), you
can use WSAVE to specify a name for your saved worksheet file.
51
Minitab 18 Statistical Software Opening, Saving, and Printing Files
FTYPE
Specifies a format that Minitab can save to. The sub-subcommands (MINITAB, EXCEL, and so on) are the file
types.
You must specify an FTYPE; FORMATNAME combination to use some of the other subcommands, such as
VNAMES.
If you do not use FTYPE when saving a file, Minitab saves the file as a Minitab worksheet for the current
release.
MINITAB K
Specifies the Minitab file type.
When you use the MINITAB sub-subcommand, you can save the worksheet in version 17, 16, or 15
format. If you do not use this subcommand, Minitab will save the file in release 17 format.
EXCEL
Specifies the Excel file type.
XMLEXCEL
Specifies the XML Excel file type.
TEXT
Specifies the text file type.
UTEXT
Specifies the unicode text file type.
CSV
Specifies the comma-separated file type.
UCSV
Specifies the unicode comma-separated file type.
WEBPAGE ("title")
Specifies web page (htm or html) file and optional title for the web page.
NOVNAMES
Saves a file from Minitab into another format without saving the variable names within the file.
DECSP
Specifies the form of decimal separation when you save a text file.
COMMA
Specifies a comma decimal separator.
PERIOD
Specifies a period decimal separator.
FIELD
Specifies how fields are delimited. Choosing one of the options tells Minitab what character denotes the
sections of data to be placed into each field. If FIELD is not specified, Minitab uses the default delimiter for
the file type.
52
Minitab 18 Statistical Software Opening, Saving, and Printing Files
TAB
Specifies the tab as the delimiter.
COMMA
Specifies the comma as the delimiter.
SEMICOLON
Specifies the semicolon as the delimiter.
PERIOD
Specifies the period as the delimiter.
SPACE
Specifies the space as the delimiter.
CUSTOM K
Specifies a custom delimiter.
TDELIMITER
Specifies how text fields are delimited.
DOUBLEQUOTE
Use when the columns of data are separated by a double quotation mark.
SINGLEQUOTE
Use when the columns of data are separated by a single quotation mark.
NONE
Use to have text that is separated by a blank entered into its own column.
CUSTOM K
Use if the columns are separated by a character other than those listed above and enter that character
as K.
MISSING
Specifies how to write out a missing value.
TEXT K K
TEXT denotes text columns, with the first K as the "missing" marker in the file's original form, and the
second K as the word(s), character(s), or space(s) you want Minitab to replace these markers with. The
default Minitab marker for missing text is a space.
NUMERIC K K
NUMERIC denotes numeric columns, with the first K as the "missing" marker in the file's original form,
and the second K as the digit(s), character(s), or space(s) you want Minitab to replace these markers
with. The default Minitab marker for missing numeric data is an asterisk (*). The missing value symbol
(first K) must be enclosed in single quotation marks.
REPLACE
Specifies to bypass the "REPLACE?" prompt and replace a file that has the same name as the file being saved.
53
Minitab 18 Statistical Software Opening, Saving, and Printing Files
NOREPLACE
Specifies to bypass the "REPLACE?" prompt, without replacing a file that has the same name as the file being
saved. When you specify NOREPLACE and you have an existing file with the same name, Minitab generates
an error message and stops executing the command or exits the macro.
If you specify NOREPLACE and are not using a macro and are typing commands at the Session command
prompt, then Minitab generates an error and prompts you to delete the old file first or choose a different
filename.
All of Minitab's graphs and Session window output can be sent to a PowerPoint presentation. In PowerPoint, text
and titles appear in the font that is used in Minitab. Graphs are pasted as Enhanced Metafiles and/or Bitmaps.
Each graph or section of output is placed on a separate slide. If Session window output is long, Minitab splits it
across multiple slides.
Note When you send a graph to PowerPoint, Minitab's Embedded Graph Editor is not available.
APPEND
Exports output into an open Microsoft PowerPoint presentation. The output is starts on a new slide after the
currently active slide.
TEXT K
Sets the font size that is used for the text on each slide in PowerPoint. The default font size is 12.
TITLE K
Sets the font size that is used for the title on each slide in PowerPoint. The default font size is 20.
MAXLINES K
Sets the maximum number of text lines that are used on a slide. The default number of lines is 20.
54
Minitab 18 Statistical Software Opening, Saving, and Printing Files
All of Minitab's graphs and Session window output can be sent to a Word document. In Word, text and titles
appear in the font that is used in Minitab. Graphs are pasted as Enhanced Metafiles and/or Bitmaps.
Note When you send a graph to Word, Minitab's Embedded Graph Editor is not available.
APPEND
Exports output into an open Microsoft Word document. The output is placed after the cursor location in the
Word document.
55
Minitab 18 Statistical Software Other Session Commands
This command is useful if you want to read only the first part of input lines. The most common case is files that
have Minitab commands or data in the first 72 spaces and sequence numbers (identification numbers) in spaces
73-80. Then you want Minitab to read only the first 72 spaces, so use IW 72. IW applies to commands and data
lines that follow (except data lines for formatted input).
You can refer to a named column, constant, or matrix by either number or name, for example, M1 or "Inverse".
Any time you use a name, enclose the name in double quotation marks. Minitab always prints variable names, if
they exist, on all output involving that variable. You can change the name of a variable by using another NAME
command.
56
Minitab 18 Statistical Software Other Session Commands
You can use both upper and lower case letters in a name. When you use the name in a Minitab command, Minitab
considers upper and lower case letters equivalent. When a name is printed in the output, however, the upper and
lower case letters are used. For example, the following commands name the C1 column Height and print the data.
NAME C1"HEIGHT"
PRINT "HEIGHT"
Note You also can type column names into the Data window as an alternative to the NAME command.
57
Minitab 18 Statistical Software Dynamic Data Exchange
You can use XDACTIVATE in execs and global macros, but not in local macros.
application
Application is the name of a program that can participate in a DDE transaction. Usually, application is the
name of an EXE file that starts the program, without the .exe extension. For example, in the case of Minitab,
Mtb.exe starts the program, so for the application argument use Mtb.
topic
Topic is a name that depends on the type of application. In applications that use documents or data files,
the topic is often the name of the file. For example, the topic for a Microsoft Word document might be
mywork.doc. The file name can also include a path, as in c:\mywork\mywork.doc.
If one file can contain many documents or subwindows, the Topic can be the name of the file in brackets,
followed by the name of the document or window. For example, Minitab projects can contain many Data
windows, so a typical Topic would be [Minitab] worksheet 1.
Tip It is a good idea to save files from other applications before establishing any links to or from them. If you establish a link
before saving the file, you may need to change the link name from something like "untitled" to a file name. Likewise, before
linking from Minitab, rename a new Data window from the default of "Worksheet 1" to something meaningful, such as "First
Quarter."
item
Item is a name that depends on the type of application. In Minitab, the item always specifies a row/column
location or rectangular area in the form R4C1:R4C2. You can use all of Minitab column 1 as an item by
specifying C1. A single cell (row 4, column 1) is R4C1. Most spreadsheets use close variants of the R4C1:R3C2
format for items.
You often specify XDADD with either the APPEND or REPLACE subcommands to tell where to put the data in the
Minitab Data window, as shown below.
XDADD "Minitab" "[myproj.mpj]pulse" "C1";
REPLACE C2;
58
Minitab 18 Statistical Software Dynamic Data Exchange
PERFORM 2;
COMMAND "LET C2=4*C1".
When another program supports Edit > Paste Link, you can find out the application, topic, and item names by
copying a range from the other application and pasting it into the Data window in Minitab. The type of link
established by XDADD is often referred to as a hot link.
You can use XDADD in global macros and exec macros, but not in local macros.
Data
DATA
Specifies whether to add (append) the data to the end of the columns that you specify or to replace the entire
contents of the columns in the Data window with new data from the item you specify in the XDADD or XDGET
command. The column argument specifies the starting, or anchor column for the data in the item. When the item
has more than one column, other columns are also included.
APPEND [C]
Specifies to add the data to the end of the columns that you specify.
Link status
ACTIVE
Specifies to open the new link in the active state. An active link starts receiving data from the other application
immediately.
INACTIVE
Specifies to open the new link in the inactive state. An inactive link does not receive data until you activate it.
Command arguments
PERFORM K
Specifies the action to take on each occurrence of a data transfer from the server application. The argument values
and associated actions are shown in the following table.
Value of K Description
0 Update data and execute commands.
1 Update data only.
2 Execute commands only.
COMMAND "command"
Specifies one Minitab command to execute upon each occurrence of a data transfer from the server application.
The command string can contain up to 128 characters (without line breaks) and include one Minitab command
or %macro. Do not use a period at the end.
Use a %macro or the dialog box if you need to use multiple commands.
59
Minitab 18 Statistical Software Dynamic Data Exchange
If the command includes single quotation marks ('), enclose the single quotation marks with double quotation
marks ("). You can only use a single COMMAND subcommand for each link.
This subcommand works differently than the Commands field in the Add New Links dialog box.
Link priority
PRIORITY K
Specifies the priority of the link relative to other links. The priority can be any integer from 1 (the highest priority)
to 32 (the lowest priority). Priority matters when more than one link attempts a transfer at the same time, or when
several queued transactions are waiting for processing. Minitab always completes transfers on links that have
higher priority first, then processes data from links with lower priority. Links with the same priority are transferred
on a first-in first-out basis. The default priority is 16.
You can use XDDEACTIVATE in execs and global macros, but not in local macros.
application
Application is the name of a program that can participate in a DDE transaction. Usually, application is the
name of an EXE file that starts the program, without the .exe extension. For example, in the case of Minitab,
Mtb.exe starts the program, so for the application argument use Mtb.
topic
Topic is a name that depends on the type of application. In applications that use documents or data files,
the topic is often the name of the file. For example, the topic for a Microsoft Word document might be
mywork.doc. The file name can also include a path, as in c:\mywork\mywork.doc.
If one file can contain many documents or subwindows, the Topic can be the name of the file in brackets,
followed by the name of the document or window. For example, Minitab projects can contain many Data
windows, so a typical Topic would be [Minitab] worksheet 1.
Tip It is a good idea to save files from other applications before establishing any links to or from them. If you establish a link
before saving the file, you may need to change the link name from something like "untitled" to a file name. Likewise, before
linking from Minitab, rename a new Data window from the default of "Worksheet 1" to something meaningful, such as "First
Quarter."
item
Item is a name that depends on the type of application. In Minitab, the item always specifies a row/column
location or rectangular area in the form R4C1:R4C2. You can use all of Minitab column 1 as an item by
specifying C1. A single cell (row 4, column 1) is R4C1. Most spreadsheets use close variants of the R4C1:R3C2
format for items.
60
Minitab 18 Statistical Software Dynamic Data Exchange
application
The application argument is the DDE application name that is defined by the other application.
Application is the name of a program that can participate in a DDE transaction. Usually, application is the
name of an EXE file that starts the program, without the .exe extension. For example, in the case of Minitab,
Mtb.exe starts the program, so for the application argument use Mtb.
command
If the other application allows more than one command per line, you can use more than one command in
the command string. If the server does not allow more than one command, consider writing a macro in the
server language, or using several XDEXEC commands in a row to achieve the same result. Use double quotation
marks inside the command string if single quotation marks are required in the remote application.
Note If the command that you want to execute already contains double quotation marks, then put the command and application
in single quotation marks. For example, because the syntax for executing an Excel macro requires double quotation marks, the
correct syntax is XDEXEC 'EXCEL' '[Run("macro")]'.
application
Application is the name of a program that can participate in a DDE transaction. Usually, application is the
name of an EXE file that starts the program, without the .exe extension. For example, in the case of Minitab,
Mtb.exe starts the program, so for the application argument use Mtb.
topic
Topic is a name that depends on the type of application. In applications that use documents or data files,
the topic is often the name of the file. For example, the topic for a Microsoft Word document might be
mywork.doc. The file name can also include a path, as in c:\mywork\mywork.doc.
If one file can contain many documents or subwindows, the Topic can be the name of the file in brackets,
followed by the name of the document or window. For example, Minitab projects can contain many Data
windows, so a typical Topic would be [Minitab] worksheet 1.
61
Minitab 18 Statistical Software Dynamic Data Exchange
Tip It is a good idea to save files from other applications before establishing any links to or from them. If you establish a link
before saving the file, you may need to change the link name from something like "untitled" to a file name. Likewise, before
linking from Minitab, rename a new Data window from the default of "Worksheet 1" to something meaningful, such as "First
Quarter."
item
Item is a name that depends on the type of application. In Minitab, the item always specifies a row/column
location or rectangular area in the form R4C1:R4C2. You can use all of Minitab column 1 as an item by
specifying C1. A single cell (row 4, column 1) is R4C1. Most spreadsheets use close variants of the R4C1:R3C2
format for items.
APPEND [C]
Specifies to add the data to the end of the columns that you specify.
This command deletes the specified client link immediately when Minitab accepts the command. When a link is
deleted, all existing queued requests are processed (that is transferred into the worksheet), but no new ones are
added.
You can use XDREMOVE in execs and global macros, but not in local macros.
application
Application is the name of a program that can participate in a DDE transaction. Usually, application is the
name of an EXE file that starts the program, without the .exe extension. For example, in the case of Minitab,
Mtb.exe starts the program, so for the application argument use Mtb.
topic
Topic is a name that depends on the type of application. In applications that use documents or data files,
the topic is often the name of the file. For example, the topic for a Microsoft Word document might be
mywork.doc. The file name can also include a path, as in c:\mywork\mywork.doc.
If one file can contain many documents or subwindows, the Topic can be the name of the file in brackets,
followed by the name of the document or window. For example, Minitab projects can contain many Data
windows, so a typical Topic would be [Minitab] worksheet 1.
62
Minitab 18 Statistical Software Dynamic Data Exchange
Tip It is a good idea to save files from other applications before establishing any links to or from them. If you establish a link
before saving the file, you may need to change the link name from something like "untitled" to a file name. Likewise, before
linking from Minitab, rename a new Data window from the default of "Worksheet 1" to something meaningful, such as "First
Quarter."
item
Item is a name that depends on the type of application. In Minitab, the item always specifies a row/column
location or rectangular area in the form R4C1:R4C2. You can use all of Minitab column 1 as an item by
specifying C1. A single cell (row 4, column 1) is R4C1. Most spreadsheets use close variants of the R4C1:R3C2
format for items.
63
Minitab 18 Statistical Software Manipulating and Calculating Data
ADD E...E E
Adds E and E and stores in E. E can be any column, any constant, or matrix. For columns and constants, ADD allows
up to 50 arguments. If any element of a row is missing, the result is set to missing *. If the operation is impossible,
the result is also set to missing.
EIGEN M C [M]
Calculates eigenvalues (also called characteristic values or latent roots) and eigenvectors for a symmetric matrix.
The eigenvalues are stored in decreasing order of magnitude down the column. The eigenvectors are stored as
columns of the matrix. The first column corresponds to the first eigenvalue (largest magnitude), the second column
to the second eigenvalue, and so on.
LAG [K] C C
Calculates the lags of a column and stores them in a new column.
Moves the row elements of a column down K rows, where K is the lag specified, storing the result in a new column
of the same length. There will be K missing value symbols, *, at the top of the output column. The output column
has the same number of rows as the input column, so the last K values from the input column are not lagged. If
K is omitted, then K = 1 is used.
If C1 contains Z1, Z2, ..., Zn, then LAG K C1 C2 puts asterisks (*) into rows 1 through K of C2, and puts Zi – Zi-k
into row i, K + 1 < i < n.
LET C [K] = K
Use to correct a number in the worksheet. You can change a single number with the LET command. For example,
LET C1[5] = 28.6 puts 28.6 into row 5 of C1. The rest of C1 remains the same.
64
Minitab 18 Statistical Software Manipulating and Calculating Data
LET = expression
Use to perform arithmetic with an algebraic expression. The expression can contain arithmetic operations,
comparison operations, logical operations, and functions. The functions that you can use with LET are described
below.
Note In an expression, you cannot use a hyphen to specify a range of columns or constants. For example, Minitab would interpret
C1-C4 as C1 minus C4 and 1-10 as 1 minus 10.
You can also access an individual row in a column. For arguments, you can use columns, stored constants, or
numbers. You cannot use matrices. You cannot use extra text on any session command, including LET, except
after the # symbol.
For arithmetic operations, if any element of a row is missing, the result is set to missing. If an operation is impossible,
such as division by zero, the result is set to missing. You can have up to nine nested parentheses.
Examples of LET
LET C1 = (C2 + C3)*10 - 60
LET C1 = C1 - MEAN(C1)
LET K1 = 5.3
LET K2 = MEAN(C10)/STDEV(C1)
LET K2 = C1[28]
CEIL (E, K)
Rounds numbers up. In the first argument, specify the number you want rounded. In the second argument, specify
the number of decimals to round to. If K = 0 (the default), the number is rounded to the nearest integer greater
than or equal to the number. If K > 0, the number is rounded up to the specified number of decimal places after
the decimal point. If K < 0, the number is rounded up to 1- the specified number of place values to the left of the
decimal point.
For example:
CEILING (2.136, 0) equals 3
65
Minitab 18 Statistical Software Manipulating and Calculating Data
COMBINATIONS (E, E)
Calculates the number of combinations of n items chosen k at a time. In the first argument, specify the number
of items. In the second argument, specify the number to choose. The number of items must be greater than or
equal to 1, and the number to choose must be greater than or equal to 0. Arguments can be columns or constants.
Missing values are not allowed.
FACTORIAL (E)
Calculates the factorial of a number, the product of all the consecutive integers from 1 to the number, inclusive.
The value of the number must be greater than or equal to 0. Missing values are not allowed.
FLOOR (E, K)
Rounds numbers down. In the first argument, specify the number you want rounded. In the second argument,
specify the number of decimals to round to. If K = 0 (the default), the number is rounded to the nearest integer
less than or equal to the number. If K > 0, the number is rounded down to the specified number of decimal places
after the decimal point. If K < 0, the number is rounded down to 1- the specified number of place values to the
left of the decimal point.
For example:
FLOOR (2.136, 0) equals 2
FTC (E)
Performs the Freeman Tukey transformation to stabilize variance for Poisson data. Requires one argument, which
must be a column or stored constant that contains nonnegative integers.
FTP (E, E)
Performs the Freeman Tukey transformation to stabilize variance for binomial data. Requires one argument for
number of trials and one for number of successes. Each argument can be a column or stored constant. Trials must
be a positive integer, and successes must be an integer between 0 and n inclusive.
GAMMA (E)
Calculates the gamma function where E is the specified shape parameter (the number you want to take the function
of).
IGAMMA (E, E)
Calculates the incomplete gamma function. In the first argument, specify the upper limit of the integral. In the
second argument, specify the shape parameter (the number you want to take the function of).
LNGAMMA (E)
Calculates the natural log of the gamma function. E is the shape parameter.
MOD (E, E)
Stores the remainder after a number is divided by a divisor. In the first argument, specify the number. In the
second argument, specify the divisor. Minitab calculates the value using the formula: m – (n * FLOOR (m/n)) where
m is a number and n is the divisor.
66
Minitab 18 Statistical Software Manipulating and Calculating Data
PERMUTATIONS (E, E)
Calculates the number of permutations of n things taken k at a time. In the first argument, specify the number of
items. In the second argument, specify the number to choose. The number of items must be greater than or equal
to 1, and the number to choose must be greater than or equal to 0. Missing values are not allowed.
DIFFERENCES (C, K)
Calculates row-by-row differences between the numeric values in a column. In the first argument, specify the
column. Minitab subtracts from each row the element K rows above, where K is the lag you specify, and stores
the differences in a new column. If you don't specify a value for lag, the differences are computed between
consecutive rows (lag = 1). The first K rows of the new column will contain the missing value symbol, *.
LAG (C, K)
Moves the row elements of a column down K rows, storing the result in a new column of the same length. If no
value is specified, the default lag (K =1) is used. There will be K missing value symbols, *, at the top of the output
column. The output column has the same number of rows as the input column, so the last value from the input
column is not lagged.
RANK (C)
Calculates and stores the ranks of the input column. Assigns the numeral 1 to the smallest value, the numeral 2
to the second smallest value, the numeral 3 to the third smallest value, and so on. Ties are assigned the average
rank.
The following command language ranks the values in C1 and puts the ranked values in C2.
RANK C1 C2
Before ranking
C1
0.5
1.0
1.5
1.0
2.0
0.0
After ranking
C1 C2
0.5 2.0
1.0 3.5
1.5 5.0
1.0 3.5
2.0 6.0
0.0 1.0
67
Minitab 18 Statistical Software Manipulating and Calculating Data
SORT (C)
Sorts the numerical values in a column in ascending order. Specify the column. Data must be numerical.
CTIME ()
Returns the current time, for example, 9:26:20 AM.
Note If stored in a column, the result is in a date/time format. If stored in a constant, the result is the numeric representation of the
date/time value. Currently, stored constants in Minitab do not have date/time formats.
DATE ("text")
DATE (E)
Returns the date portion corresponding to the argument. The argument should be a text string, such as "3/6/99
10:23", a column, or a stored constant. Text columns and constants should be in one of the Default date/time
formats on page 983.
Note If stored in a column, the result is in a date/time format. If stored in a constant, the result is the numeric representation of the
date/time value. Currently, stored constants in Minitab do not have date/time formats.
ELAPSED (E)
Returns the elapsed time, given the start and end times. Enter the column with the end times minus the column
with the start times. The columns or values must be in numeric or date/time format. The elapsed time in the
output is in minutes and seconds (mm:ss) if the maximum value of the output column is less than one hour; the
elapsed time in the output is in hours, minutes, and seconds (hh:mm:ss) if the maximum of the output column is
an hour or more.
NOW ()
Returns the current date and time, for example, 3/8/2003 9:24.
Note If stored in a column, the result is in a date/time format. If stored in a constant, the result is the numeric representation of the
date/time value. Currently, stored constants in Minitab do not have date/time formats.
TIME ("text")
TIME (E)
Returns the time portion corresponding to the argument. The argument should be a text string, such as "3/6/99
10:23", a column, or a stored constant. Text columns and constants should be in one of the Default date/time
formats on page 983.
Note If stored in a column, the result is in a date/time format. If stored in a constant, the result is the numeric representation of the
date/time value. Currently, stored constants in Minitab do not have date/time formats.
TODAY ()
Returns today's date, for example, 3/8/2003.
Note If stored in a column, the result is in a date/time format. If stored in a constant, the result is the numeric representation of the
date/time value. Currently, stored constants in Minitab do not have date/time formats.
68
Minitab 18 Statistical Software Manipulating and Calculating Data
WHEN ("text")
WHEN (E)
Returns the date and time corresponding to the argument. The argument should be a text string, such as "3/6/99
10:23", or a column or stored constant. Text columns and constants should be in one of the Default date/time
formats on page 983.
Note If stored in a column, the result is in a date/time format. If stored in a constant, the result is the numeric representation of the
date/time value. Currently, stored constants in Minitab do not have date/time formats.
IF (C<>=C, C, [C])
Chooses which of two values to return based on whether a condition is true or false. Conditions can be any
numerical or logical expressions. For the first argument, specify the column and the condition using >, <, or =.
For the second argument, specify the value to return if the condition is true. The third argument is optional and
allows you to specify a value to return if the condition is false. If nothing is specified, Minitab returns a missing
value. For example, IF(c1 = 1, "male", "female") returns "male" for values in c1 equal to 1 and returns "female" for
the other values in c1.
For example, IF(c1 <= 2, "low", c1 <=4, "medium", "high") returns "low" for c1 values less than or equal to 2,
"medium" for values less than or equal to 4 but greater than 2, and "high" for the remaining data in c1.
69
Minitab 18 Statistical Software Manipulating and Calculating Data
COUNT (C)
Counts the number of nonmissing and missing values in a column.
GMEAN (C)
Calculates the geometric mean, the nth root of the product of the n values. All values must be greater than 0.
MAXIMUM (C)
Calculates the maximum value in a column. Missing values are omitted from the calculation.
MEAN (C)
Calculates the arithmetic mean of all the values in a column. Missing values are omitted from the calculation.
MEDIAN (C)
Calculates the median of the values in a column. Missing values are omitted from the calculation.
MINIMUM (C)
Identifies the minimum value in a column. Missing values are omitted from the calculation.
N (C)
Counts the number of nonmissing values in a column.
NMISS (C)
Counts the number of missing values in a column.
NSCORES (C)
Calculates normal scores.
PERC (C, E)
Calculates the sample percentiles For the first argument, enter the column of data. For the second argument,
enter the column or constant specifying the desired percentiles, from 0 to 1. Missing values are ignored. For
th
example, to find the first quartile (25 percentile) of a column of data, enter the column number and the percentile
0.25.
RANGE (C)
Calculates the range of the values in a column. Missing values are omitted from the calculation.
SSQ (C)
Calculates the uncorrected sum of squares for a column. Missing values are omitted from the calculations.
STDEV (C)
Calculates the standard deviation for all the values in a column. Missing values are omitted from the calculation.
SUM (C)
Adds all the values in a column. Missing values are omitted from the calculation.
CLEAN ("text")
CLEAN (E)
Removes all nonprintable characters. Specify the text, column, or stored constant.
70
Minitab 18 Statistical Software Manipulating and Calculating Data
By default, Minitab searches from the first position of each text entry. You can also specify another starting position
(the location in the string from where to start the search) by inserting a number for K, the optional third argument.
For example, if c1 contains 234b75, FIND("b7",c1) returns 4, because b7 begins at the 4th position in the text.
Minitab inserts commas to separate some place values (hundreds and thousands, hundred-thousands and millions,
etc.) in the converted text. If you don't want the commas to appear, enter a value of 1 for the optional third
argument.
HTOD (E)
Converts hexadecimal values to their equivalent decimal form. The original hexadecimal data must be in text
format.
ITEM E, E, [E])
Extracts the nth word from a string of text. For the first argument, specify the text or column of text. For the second
argument, specify the position of the word to extract.
By default, one or more spaces define where each word begins and ends. If you want to specify other criteria for
determining the separation between the words, such as a comma, specify the separator using the optional third
argument.
The ITEM function is similar to the WORD function, except that ITEM extracts empty text that occurs between
consecutive separators (such as ,,) while WORD ignores the empty string and extracts the text that follows
consecutive separators.
71
Minitab 18 Statistical Software Manipulating and Calculating Data
LEFT ("text", E)
LEFT (C, E)
Returns the specified number of characters from the beginning of a string of text. For the first argument, specify
the text or the column of text values. For the second argument, indicate how many characters from the left you
want to retain.
LEN ("text")
LEN (C)
Identifies the number of characters in a string of text. Specify the text or the column of text values.
LOWER ("text")
LOWER (C)
Converts all letters to lowercase. Specify the text or the column of text values.
You can specify an integer for the optional third argument to limit the number of characters that Minitab returns.
If you don't enter the third argument, Minitab returns all the characters that follow the starting position.
PAD ("text", E)
PAD (C, E)
Pads text with trailing spaces. For first argument, specify the text or the column of text values. For the second
argument, enter the total number of characters needed for the text and the trailing spaces. The padding is indicated
by total number of characters minus the number of characters in the text.
PROPER ("text")
PROPER (C)
Capitalizes the first letter in each word and converts all other characters to lowercase. Specify the text or the
column of text values.
REPT ("text", E)
REPT (C, E)
Repeats text a given number of times. For the first argument, specify the text or the column of text. For the second
argument, specify how many times to repeat the text.
REPLACE ("text", E, E, E)
REPLACE (C, E, E, E)
Replaces a substring of text within a string of text. For the first argument, specify the original text or column of
text values. For the second argument, specify the position of the first character to replace. For the third argument,
specify how many characters to replace. For the last argument, enter the new text that you want to replace the
old text with.
72
Minitab 18 Statistical Software Manipulating and Calculating Data
RIGHT ("text", E)
RIGHT (C, E)
Returns the specified number of characters from the end of a string of text. For the first argument, specify the
text or the column of text values. For the second argument, indicate how many characters from the right you want
to retain.
SEARCH (E, E, E)
Identifies the starting position of a string of text within another string of text. For the first argument, specify the
text string you want to find. For the second argument, specify the column of text to search. FIND is case-sensitive
(distinguishes between b and B).
By default, Minitab searches from the first position of each text entry. You can also specify another starting position
(the location in the string from where to start the search) by inserting a number for K, the optional third argument
of the function.
SEARCH is similar to FIND, except that SEARCH is not case-sensitive (does not distinguish between b and B).
TEXT (E)
Converts a numeric value to text. Converting numeric values to text allows you to edit and manipulate the values
using text manipulation functions. Specify the number or the column of numeric values.
TRIM ("text")
TRIM (C)
Removes all spaces except single spaces between words. Specify the text or column of text.
By default, one or more spaces define where each word begins and ends. If you want to specify other criteria for
determining the separation between the words, such as a comma, specify the separator using the optional third
argument.
The WORD function is similar to the ITEM function, except that ITEM extracts the empty text that occurs between
consecutive separators (such as the comma and space) while WORD ignores the empty string and extracts the
text that follows the consecutive separators.
ACSH (E)
Calculates the hyperbolic arccosine of a value. Specify the value or the column of values.
73
Minitab 18 Statistical Software Manipulating and Calculating Data
ASNH (E)
Calculates the hyperbolic arcsine of a value. Specify the value or the column of values.
ATNH (E)
Calculates the hyperbolic arctangent of a value. Specify the value or the column of values.
COSH (E)
Calculates the hyperbolic cosine of a value. Specify the value or the column of values.
DEGREES (E)
Calculates the hyperbolic cosine of a value. Specify the value or the column of values.
RADIANS (E)
Calculates the hyperbolic cosine of a value. Specify the value or the column of values.
SINH (E)
Calculates the hyperbolic cosine of a value. Specify the value or the column of values.
TANH (E)
Calculates the hyperbolic cosine of a value. Specify the value or the column of values.
E ( )
Calculates e = 2.71828...
MISS ( )
Returns the * = missing value symbol in the specified column.
PI ( )
Calculates pi = 3.14159...
However, you can use the session command RCOUNT on page 78 to count the number of values in each row
while specifying a range of columns, such as C1-C4.
74
Minitab 18 Statistical Software Manipulating and Calculating Data
However, you can use the session command RMAXIMUM on page 78 to calculate the maximum value in each
row while specifying a range of columns, such as C1-C4.
However, you can use the session command RMEAN on page 78 to calculate the mean of each row while specifying
a range of columns, such as C1-C4.
However, you can use the session command RMEDIAN on page 79 to calculate the median of each row while
specifying a range of columns, such as C1-C4.
However, you can use the session command RMINIMUM on page 78 to calculate the minimum value in each row
while specifying a range of columns, such as C1-C4.
RN (E, E...)
Counts the number of nonmissing values in the row. You cannot use a hyphen to specify a range of columns. For
example, Minitab would interpret C1-C4 as C1 minus C4.
However, you can use the session command RN on page 79 to count the number of nonmissing values in each
row while specifying a range of columns, such as C1-C4.
However, you can use the session command RNMISS on page 79 to count the number of missing values in each
row while specifying a range of columns, such as C1-C4.
However, you can use the session command RRANGE on page 79 to calculate the range of each row while
specifying a range of columns, such as C1-C4.
However, you can use the session command RSSQ on page 79 to calculate the uncorrected sum of squares for
each row while specifying a range of columns, such as C1-C4.
75
Minitab 18 Statistical Software Manipulating and Calculating Data
However, you can use the session command RSTDEV on page 80 to calculate the standard deviation of each row
while specifying a range of columns, such as C1-C4.
However, you can use the session command RSUM on page 80 to add values in each row while specifying a range
of columns, such as C1-C4.
MULTIPLY E...E E
Note This functionality is available only as a session command, and not in a menu.
Multiplies E by E and stores the result in E. E can be any column, any constant, or any matrix. For columns and
constants, MULTIPLY allows up to 50 arguments. If any element of a row is missing, the result is set to missing. If
the operation is impossible, the result is also set to missing, *.
Column Statistics
COUNT: Session command for counting the number of values in a column
COUNT C [K]
Counts and optionally stores the number of nonmissing and missing values in a column. (Equivalent to N total
in the menu command dialog box.)
You can also use this command as a function with LET on page 64.
MEAN
Calculates the arithmetic mean of all the values in a column and optionally stores the result. Missing values are
omitted from the calculation.
You can also use this command as a function with LET on page 64.
MEDIAN C [K]
Identifies the median of the values in a column and optionally stores the result. Missing values are omitted from
the calculation.
76
Minitab 18 Statistical Software Manipulating and Calculating Data
You can also use this command as a function with LET on page 64.
N C [K]
Counts and optionally stores the number of nonmissing values in a column. (Equivalent to N nonmissing in the
menu command dialog box.)
You can also use this command as a function with LET on page 64.
NMISS C [K]
Counts and optionally stores the number of missing values in a column. (Equivalent to N missing in the menu
command dialog box.)
You can also use this command as a function with LET on page 64.
RANGE C [K]
Calculates the range of values in a column and optionally stores the result. Missing values are omitted from the
calculation.
You can also use this command as a function with LET on page 64.
SSQ C [K]
Calculates the uncorrected sum of squares for a column and optionally stores the result. Missing values are omitted
from the calculations.
You can also use this command as a function with LET on page 64.
STDEV: Session command for calculating the standard deviation of all the values in a column
STDEV C [K]
Calculates the standard deviation for all the values in a column and optionally stores the result. Missing values
are omitted from the calculation.
You can also use this command as a function with LET on page 64.
77
Minitab 18 Statistical Software Manipulating and Calculating Data
SUM C [K]
Adds all the values in a column and optionally stores the result. Missing values are omitted from the calculation.
You can also use this command as a function with LET on page 64.
Row Statistics
RCOUNT: Session command for counting missing and nonmissing values in a row
RCOUNT E...E C
Counts and stores the number of missing and nonmissing values in the row. (Equivalent to N total in the menu
command dialog box.)
Note You can also use this command as a function with LET on page 64. If you use this command as an argument of LET, you cannot
use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1 minus C4.
RMAXIMUM: Session command for identifying the maximum value in each row
RMAXIMUM E...E C
Identifies and stores the maximum value in each row. Missing values are omitted from the calculation.
You can also use this command as a function with LET on page 64. If you use this command as an argument of
LET, you cannot use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1
minus C4.
RMINIMUM: Session command for identifying the minimum value in each row
RMINIMUM E...E C
Identifies and stores the minimum value in each row. Missing values are omitted from the calculation.
You can also use this command as a function with LET on page 64. If you use this command as an argument of
LET, you cannot use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1
minus C4.
RMEAN: Session command for calculating the arithmetic mean in each row
RMEAN
Calculates and stores the arithmetic mean of the values in each row. Missing values are omitted from the calculation.
You can also use this command as a function with LET on page 64. If you use this command as an argument of
LET, you cannot use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1
minus C4.
78
Minitab 18 Statistical Software Manipulating and Calculating Data
RMEDIAN
Identifies and stores the median of the values in each row. Missing values are omitted from the calculation.
You can also use this command as a function with LET on page 64. If you use this command as an argument of
LET, you cannot use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1
minus C4.
RN: The session command for counting the nonmissing values in a row
RN E...E C
Counts and stores the number of nonmissing values in the row. (Equivalent to N nonmissing in the menu command
dialog box.)
You can also use this command as a function with LET on page 64. If you use this command as an argument of
LET, you cannot use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1
minus C4.
RNMISS E...E C
Counts and stores the number of missing entries in the row. (Equivalent to N missing in the menu command
dialog box.)
You can also use this command as a function with LET on page 64. If you use this command as an argument of
LET, you cannot use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1
minus C4.
RRANGE E...E C
Calculates and stores the range of values in each row. Missing values are omitted from the calculation.
You can also use this command as a function with LET on page 64. If you use this command as an argument of
LET, you cannot use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1
minus C4.
RSSQ E...E C
Calculates and stores the uncorrected sum of squares of the values in each row. Missing values are omitted from
the calculation.
You can also use this command as a function with LET on page 64. If you use this command as an argument of
LET, you cannot use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1
minus C4.
79
Minitab 18 Statistical Software Manipulating and Calculating Data
RSTDEV: Session command for calculating the standard deviation in each row
RSTDEV E...E C
Calculates and stores the standard deviation of the values in each row. Missing values are omitted from the
calculation.
You can also use this command as a function with LET on page 64. If you use this command as an argument of
LET, you cannot use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1
minus C4.
RSUM E...E C
Adds and stores the values in each row. Missing values are omitted from the calculation.
You can also use this command as a function with LET on page 64. If you use this command as an argument of
LET, you cannot use a hyphen to specify a range of values. For example, Minitab would interpret C1-C4 as C1
minus C4.
Standardize
CENTER: Session command for centering data
When you do not including subcommands, Minitab transforms each input column by subtracting its mean and
then dividing by its standard deviation. This is often called standardizing a variable.
LOCATION [K...K]
When you do not include Ks, Minitab transforms each column by subtracting its mean. When you specify
one K, Minitab subtracts that value from each column. Otherwise, you must list one K for each column to be
centered. Then Minitab subtracts each K from the corresponding column.
SCALE [K...K]
When you use LOCATION, Minitab first subtracts the location. When you do not specify Ks on SCALE, Minitab
divides each column by its standard deviation. When you specify one K, Minitab divides each column by K.
Otherwise, you must list one K for each column to be centered. Then Minitab divides each column by the
corresponding K.
MINMAX [K K]
When you do not specify Ks, Minitab transforms all columns (linearly) to have minimum –1 and maximum
+1. When you specify both Ks, Minitab transforms all columns (linearly) to have the first K as minimum and
the second K as maximum.
80
Minitab 18 Statistical Software Manipulating and Calculating Data
SET C
Inputs data, from the keyboard or from an ASCII file, into one column.
If there is any data in the column you list, SET erases that data and replaces it with the new data you enter. To
add data to an existing column, use INSERT on page 36. SET is especially useful for entering data that follow a
pattern, such as the numbers 1 through 10, into a column. For more information, go to Entering patterned data
for the SET session command on page 986.
If you execute SET from the menu, the FORMAT and NOBS options are not available, the form of the data is
restricted, and data cannot be read from a file.
As a simple example, the following command language puts the numbers 2, 7, 9, 3.8, and 22 in column C7.
SET C7
2 7 9
3.8 22
END
FILE 'filename'
Enters data from the specified ASCII file. If the file has an extension other than DAT and/or if it is not in your
current directory, include the file extension and the path within the single quotation marks.
FORMAT
The FORMAT subcommand for SET is similar to that for READ (for information, go to READ data into a
matrix on page 43 or READ data into columns on page 40). For example, the following command
language reads 10 numbers from each data line-the first from spaces 1 and 2, the second from spaces
3 and 4, and so on.
SET C1 ;
FILE "MYFILE";
FORMAT (10F2).
Text data can be input using the FORMAT subcommand. The field width can be up to 80 characters.
You cannot mix text and numeric data in a single column.
Here is an example that inputs four "words" using A format into C1.
SET C1;
FORMAT (A11, T16, A2).
ABCDEFGHIJK LM
abcdefghijk lm
END
For more information, go to Valid format items on page 1032.
NOBS K
Specifies the number of observations (rows) to be read. If an END on page 34 subcommand or end-of-file
is encountered before K observations are read, NOBS is ignored. NOBS is useful when you want to read
just the first portion of a file. NOBS is also useful when you prompt the user for information. For more
information, go to Prompting a user for information on page 1021.
SKIP K
Tells Minitab to skip K lines at the top of the data file before beginning to READ, INSERT, or SET data
into the file. This is most useful when you have one or more lines of text, such as column names and
titles, at the top of a data file that you want to import into Minitab.
81
Minitab 18 Statistical Software Manipulating and Calculating Data
TSET: Session command for creating data that follow complicated patterns
TSET
Using TSET, you can create data that follow more complicated patterns. You can also use TSET to import text files.
TSET is the same as SET except there is no through construct, and you list text constants, stated or stored, instead
of numbers. Repeat factors are integers, stated or stored. A text string must be enclosed in double quotes as in
LET.
As in SET, you can input data from a file in addition to typing it from the keyboard.
FILE "filename"
list-of-text-constants-and-repeat-factors
Examples
TSET C1
5("Red" "Green") 2("Yellow") 3("Green")
END
LET K1 = "Low"
LET K2 = 10
TSET C1
5(K1 "Medium" "High")K2 K1 K1
END
DSET C
Creates a new column of dates and/or times that follow a pattern.
For example, the commands store the dates 1/1/15, 1/2/15, ..., 1/31/15 into C1.
DSET C1;
DSTART "1/1/15";
DEND "1/31/15";
DAY 1.
Note Minitab's default date/time formats can change depending on the Windows Control Panel Regional Settings. For more
information, go to Default date/time formats on page 983.
LIST
Date/time K...K or "text" ..."text".
FORMAT K
The format statement can be used for two purposes. It provides the format for the resulting patterned data.
If no format is given then the resulting column will be in the format of the last date/time value given either
on the DSTART or DEND subcommand lines. Also, it can be utilized as a user-defined format for specifying
82
Minitab 18 Statistical Software Manipulating and Calculating Data
the input format of the start and end date/time value. If no format statement is given, the date/time values
on the DSTART and DEND subcommands must be in a default format. For example:
DSET C1;
DSTART "1/1/15";
DEND "1/31/15";
FORMAT (DTm-d-yy);
DAY 1.
The format statement must begin with the characters DT followed by the desired date/time format. The
preceding example displays dates in the form 1-1-15.
Note Minitab's default date/time formats can change depending on the Windows Control Panel Regional Settings. For more
information, go to Default date/time formats on page 983.
DSTART K
DSTART specifies the beginning date/time value. The argument can be either a stored text constant or a text
string in double quotation marks. If you want to use a non-default date/time format for the text given with
DSTART and DEND, you must use the FORMAT subcommand. (If you are using a default date/time format,
FORMAT is not necessary.)
Note Minitab's default date/time formats can change depending on the Windows Control Panel Regional Settings. For more
information, go to Default date/time formats on page 983.
DEND K
DEND specifies the ending date/time value. The argument can be either a stored text constant or a text string
in double quotation marks. If you want to use a non-default date/time format for the text given with DSTART
and DEND, you must use the FORMAT subcommand. (If you are using a default date/time format, FORMAT
is not necessary.)
Note Minitab's default date/time formats can change depending on the Windows Control Panel Regional Settings. For more
information, go to Default date/time formats on page 983.
RLIST K
RLIST specifies the number of times to repeat the list. K must be a positive integer greater than or equal to
1.
RVALUE K
RVALUE specifies the number of times to repeat each value. K must be a positive integer greater than or
equal to 1.
The patterned data ends when a date/time value is greater than or equal to the end date/time value (DEND). The end
date/time value is part of the column only if the pattern equals the end date/time value.
Note Minitab's default date/time formats can change depending on the Windows Control Panel Regional Settings. For more information,
go to Default date/time formats on page 983.
DAY
Increments day by K units.
WDAY
Increments workday (M–F) by K units.
83
Minitab 18 Statistical Software Manipulating and Calculating Data
WEEK
Increments week by K units.
MONTH
Increments month by K units.
QUARTER
Increments quarter by K units.
YEAR
Increments year by K units.
HOUR
Increments hour by K units.
MINUTE
Increments minute by K units.
SECOND
Increment second by K units.
HUNDREDTH
Increment hundredth by K units.
THOUSANDTHS
Increment thousandths by K units.
MESH C C
Creates a mesh of regular x-y data and stores the data in C and C. (Data with a regular shape form a grid with
evenly spaced intervals. Data with an irregular shape are not located on evenly spaced intervals.)
You can use the mesh data for drawing surface and wireframe plots, with an option to create the z-data at the
same time.
XMESH K K K (optional)
Specifies the lowest x-value, the highest x-value, and the number of x-values. The default is – 5 5 11.
YMESH K K K (optional)
Specifies the lowest y-value, the highest y-value, and the number of y-values. The default is – 5 5 11.
%USERFUNC K C C C (optional)
Specifies your own function as indicated by function number K in the macro %USERFUNC. For instructions
to add your own function, go to Add your own function on page 974.
84
Minitab 18 Statistical Software Manipulating and Calculating Data
BOWL C A, B, C
(A ≠ 0, B ≠ 0, C ≠ 0)
CONE C A, B, C
(A ≠ 0, B ≠ 0, C ≠ 0)
COWBOYHAT C A, B, C
(A ≠ 0, B ≠ 0, C ≠ 0)
EGGCARTON C A, B, C
(A ≠ 0, B ≠ 0, C ≠ 0)
HEMISPHERE C A, B, C, R
(A ≠ 0, B ≠ 0, C ≠ 0, R ≠ 0)
where if z < 0, set z = 0
HILLANDDALE C A, B, C
(A ≠ 0, B ≠ 0, C ≠ 0)
SADDLE C A, B, C
(A ≠ 0, B ≠ 0, C ≠ 0)
WAVE C A, B, C
(A ≠ 0, B ≠ 0, C ≠ 0)
85
Minitab 18 Statistical Software Manipulating and Calculating Data
INDICATOR C C...C
Creates indicator variables (also called dummy variables) that you can use in a regression analysis. If you use
REGRESS on page 161, you do not need to create indicator variables.
The smallest number in C2 is 2 and the largest is 6. INDICATOR creates one indicators variable for unique value.
• C11 is the indicator variable for the value 2. C11 contains a 1 in every row where C2 contains a 2, and 0
otherwise.
• C12 is the indicator variable for the value 3. C12 contains a 1 in every row where C2 contains a 3, and 0
otherwise.
• C13 is the indicator variable for 5. C13 contains a 1 in every row where C2 contains 5, and 0 otherwise.
• C14 is the indicator variable for 6. C13 contains a 1 in every row where C2 contains 6, and 0 otherwise.
If C2 contains an * (missing data code), then all indicator variables are also set to *.
The number of storage columns must be equal to the number of distinct values (not including *) in the input
column. Up to 100 storage columns are allowed on INDICATOR.
C1
2
2
5
3
6
5
*
86
Minitab 18 Statistical Software Manipulating and Calculating Data
Random Data
BASE: Session command for fixing a starting number for the random number generator
BASE K
Fixes a starting point for Minitab's random number generator.
Minitab has a long string of random numbers available. Minitab normally chooses its own starting point for this
process. If Minitab always started at the beginning of the list, you would always get the same data. To avoid this,
Minitab uses the time of day to choose a random starting point in the string.
However, you might want to control where Minitab starts the string. For example, you may wish to repeat a
sequence by generating the same set of random data. In this case, the BASE command tells the random number
generator where to start. The generator will use this base until you set a new BASE or exit Minitab.
Note If you use the same base on different platforms or different versions of Minitab, you might not get the same random number
sequence.
RANDOM E [E]
Use RANDOM to generate and store a random sample of one or more observations from a specified distribution.
The subcommand specifies the distribution. If no subcommand is given, data are simulated from a normal
distribution with mu = 0 and sigma = 1.
Use the BASE on page 87 command to generate the same set of data more than once.
Suppose you want 50 random samples, each containing 20 observations, from a binomial distribution with number
of trials n = 5, and probability of success p = 0.3. To place each sample in a separate column, type the following
commands.
RANDOM 20 C1-C50;
BINOMIAL 5 0.3.
CHISQUARE K
Specifies distribution to sample, with degrees of freedom = K.
NORMAL [K [K]]
Specifies distribution to sample. Generates data from a standard normal. Optionally, specify mean = K, and
standard deviation = K.
MNORMAL C M
Specifies distribution to sample, with mean column = C, and variance-covariance matrix = M.
F K K
Specifies distribution to sample, with numerator degrees of freedom = K, denominator degrees of freedom
= K.
T K
Specifies distribution to sample, with degrees of freedom = K.
UNIFORM [K K]
Specifies distribution to sample. Generates data using lower endpoint = 0.0 and upper endpoint = 1.0.
Optionally, specify lower endpoint = K and upper endpoint = K.
87
Minitab 18 Statistical Software Manipulating and Calculating Data
BERNOULLI K
Specifies distribution to sample, with probability of success = K.
BINOMIAL K K
Specifies distribution to sample, with number of trials = K and event probability = K.
GEOMETRIC K
Specifies distribution to sample, with event probability = K.
NONEVENT
Models the number of nonevents before the first event occurs.
TOTAL
Models the total number of trials needed to produce one event.
NEGBINOMIAL K K
Specifies distribution to sample, with event probability = K and number of events needed = K.
NONEVENT
Models the number of nonevents before the specified number of events occurs.
TOTAL
Models the total number of trials needed to produce the specified number of events.
HYPERGEOMETRIC K K K
Specifies distribution to sample, with population size = K, event count in population = K, and sample size =
K.
DISCRETE C C
Specifies distribution to sample, with values in C and probabilities in C.
INTEGER K K
Specifies distribution to sample, with discrete uniform on integers from minimum value = K to maximum
value = K.
POISSON K
Specifies distribution to sample, with mean = K.
BETA K K
Specifies distribution to sample, with first shape parameter = K and second shape parameter = K.
CAUCHY [K [K]]
Specifies distribution to sample. Generates data using location = 0.0 and scale = 1.0. Optionally, specify
location = K and scale = K.
EXPONENTIAL [K [K]]
Specifies distribution to sample. Generates data using mean = 1.0 and threshold = 0.0. Optionally, specify
mean = K and threshold = K.
GAMMA K K [K]
Specifies distribution to sample, with shape = K, scale = K, and optionally, threshold = K.
LAPLACE [K [K]]
Specifies distribution to sample. Generates data using location = 0.0 and scale = 1.0. Optionally, specify
location = K and scale = K.
88
Minitab 18 Statistical Software Manipulating and Calculating Data
LEXTREME [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
LOGISTIC [K [K]]
Specifies distribution to sample. Generates data using location = 0.0 and scale = 1.0. Optionally, specify
location = K and scale = K.
LLOGISTIC [K [K [K]]]
Specifies distribution to sample. Generates data using location = 0.0, scale = 1.0, and threshold = 0.0.
Optionally, specify location = K, scale = K, and threshold = K.
LNORMAL [K [K [K]]]
Specifies distribution to sample. Generates data using location = 0.0, scale = 1.0, and threshold = 0.0.
Optionally, specify location = K, scale = K, and threshold = K.
SEXTREME [K [K]]
Specifies distribution to sample. Generates data using location = 0.0 and scale = 1.0. Optionally, specify
location = K and scale = K.
TRIANGULAR K K K
Specifies distribution to sample, with lower endpoint = K, mode = K, and upper endpoint = K.
WEIBULL K K [K]
Specifies distribution sample, with shape = K, scale = K, and optionally, threshold = K.
SAMPLE: Session command for generating rows of random data from specified columns
SAMPLE K C...C
Generates K rows of random data from specified input columns, C...C, and stores in specified storage columns,
C...C.
Takes a random sample of rows. If you use REPLACE, you can select the same row more than once. If you use
NOREPLACE, you cannot select the same row more than once. If you do not use a subcommand, Minitab samples
without replacement.
Tip If there are K rows in C...C columns, you can randomize their order by sampling all K rows and storing in the original input columns.
For example, SAMPLE K C1 C1.
REPLACE
When you sample with replacement, a selected observation goes back into the pool of possible choices and
can be selected again.
NOREPLACE
When you sample without replacement, a selected observation can be chosen only once.
89
Minitab 18 Statistical Software Manipulating and Calculating Data
Probability Distributions
PDF: Session command for calculating the probability distribution of a continuous random
variable
PDF E [E]
Calculates density values or probabilities for the specified values in E from a standard normal distribution or
another specified distribution and stores in E.
• For a discrete distribution, the probability distribution function (pdf) calculates probabilities for the specified
values (sometimes called the discrete probability distribution function). If you specify a discrete distribution
(BINOMIAL, GEOMETRIC, NEGBINOMIAL, HYPERGEOMETRIC, DISCRETE, INTEGER, POISSON), the arguments
on the PDF line are optional. If you do not specify arguments, Minitab displays a table of the distribution. If
you execute PDF from the menu, you must supply the input columns.
• For a continuous distribution, pdf calculates the continuous probability density function (often called the
density function).
• If you do not specify a distribution, results are generated for a normal distribution with mu = 0 and sigma =
1.
Storage is optional. If you specify a storage column, pdf values are stored there and are not displayed in the
Session window. If you do not specify a storage column, Minitab displays pdf values.
CHISQUARE K [K]
Specifies distribution with degrees of freedom = K.
NORMAL [K [K]]
Specifies distribution. Generates data from a standard normal; optionally specify mean = K, and standard
deviation = K.
F K K
Specifies distribution, with numerator degrees of freedom = K, denominator degrees of freedom = K.
T K
Specifies distribution, with degrees of freedom = K.
UNIFORM [K K]
Specifies distribution. Generates data using lower endpoint = 0.0 and upper endpoint = 1.0. Optionally,
specify lower endpoint = K and upper endpoint = K.
BINOMIAL K K
Specifies distribution, with number of trials = K and event probability = K.
GEOMETRIC K
Specifies distribution, with event probability = K.
NONEVENT
Models the number of nonevents before the first event occurs.
TOTAL
Models the total number of trials needed to produce one event.
NEGBINOMIAL K K
Specifies distribution, with event probability = K and number of events needed = K.
90
Minitab 18 Statistical Software Manipulating and Calculating Data
NONEVENT
Models the number of nonevents before the specified number of events occurs.
TOTAL
Models the total number of trials needed to produce the specified number of events.
HYPERGEOMETRIC K K K
Specifies distribution, with population size = K, event count in population = K, and sample size = K.
DISCRETE C C
Specifies distribution, with values in C and probabilities in C.
INTEGER K K
Specifies distribution, with discrete uniform on integers from minimum value = K to maximum value = K.
POISSON K
Specifies distribution, with mean = K.
BETA K K
Specifies distribution, with first shape parameter = K and second shape parameter = K.
CAUCHY [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
EXPONENTIAL [K [K]]
Specifies distribution. Generates data using mean = 1.0 and threshold = 0.0. Optionally, specify mean = K
and threshold = K.
GAMMA K K [K]
Specifies distribution, with shape = K, scale = K, and optionally, threshold = K.
LAPLACE [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
LEXTREME [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
LOGISTIC [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
LLOGISTIC [K [K [K]]]
Specifies distribution. Generates data using location = 0.0, scale = 1.0, and threshold = 0.0. Optionally, specify
location = K, scale = K, and threshold = K.
LNORMAL [K [K [K]]]
Specifies distribution. Generates data using location = 0.0, scale = 1.0, and threshold = 0.0. Optionally, specify
location = K, scale = K, and threshold = K.
SEXTREME [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
91
Minitab 18 Statistical Software Manipulating and Calculating Data
TRIANGULAR K K K
Specifies distribution, with lower endpoint = K, mode = K, and upper endpoint = K.
WEIBULL K K [K]
Specifies distribution, with shape = K, scale = K, and optionally, threshold = K.
CDF E [E]
Calculates probabilities for the specified values in E from a standard normal distribution or another specified
distribution and stores the probabilities in E.
The cumulative distribution function, cdf, for any value x is the probability that a random variable with the specified
distribution has a value less than or equal to x. That is:
Storage is optional. If you specify a storage column, the cdf values are stored there and are not displayed in the
Session window. If you do not specify a storage column, Minitab displays the cdf values.
CHISQUARE K [K]
Specifies distribution with degrees of freedom = K, and, optionally, noncentrality parameter = K.
NORMAL [K [K]]
Specifies distribution. Generates data from a standard normal. Optionally, specify mean = K and standard
deviation = K.
F K K [K]
Specifies distribution, with numerator degrees of freedom = K, denominator degrees of freedom = K, and,
optionally, noncentrality parameter = K.
T K [K]
Specifies distribution, with degrees of freedom = K and, optionally, noncentrality parameter = K.
UNIFORM [K K]
Specifies distribution. Generates data using lower endpoint = 0.0 and upper endpoint = 1.0. Optionally,
specify lower endpoint = K and upper endpoint = K.
BINOMIAL K K
Specifies distribution, with number of trials = K and event probability = K.
GEOMETRIC K
Specifies distribution, with event probability = K.
NONEVENT
Models the number of nonevents before the first event occurs.
92
Minitab 18 Statistical Software Manipulating and Calculating Data
TOTAL
Models the total number of trials that are needed to produce one event.
NEGBINOMIAL K K
Specifies distribution, with event probability = K and number of events that are needed = K.
NONEVENT
Models the number of nonevents before the specified number of events occurs.
TOTAL
Models the total number of trials that are needed to produce the specified number of events.
HYPERGEOMETRIC K K K
Specifies distribution, with population size = K, event count in population = K, and sample size = K.
DISCRETE C C
Specifies distribution, with values in C and probabilities in C.
INTEGER K K
Specifies distribution, with discrete uniform on integers from minimum value = K to maximum value = K.
POISSON K
Specifies distribution, with mean = K.
BETA K K
Specifies distribution, with first shape parameter = K and second shape parameter = K.
CAUCHY [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
EXPONENTIAL [K [K]]
Specifies distribution. Generates data using mean = 1.0 and threshold = 0.0. Optionally, specify mean = K
and threshold = K.
GAMMA K K [K]
Specifies distribution, with shape = K, scale = K, and optionally, threshold = K.
LAPLACE [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
LEXTREME [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
LOGISTIC [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
LLOGISTIC [K [K [K]]]
Specifies distribution. Generates data using location = 0.0, scale = 1.0, and threshold = 0.0. Optionally, specify
location = K, scale = K, and threshold = K.
93
Minitab 18 Statistical Software Manipulating and Calculating Data
LNORMAL [K [K [K]]]
Specifies distribution. Generates data using location = 0.0, scale = 1.0, and threshold = 0.0. Optionally, specify
location = K, scale = K, and threshold = K.
SEXTREME [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
TRIANGULAR K K K
Specifies distribution, with lower endpoint = K, mode = K, and upper endpoint = K.
WEIBULL K K [K]
Specifies distribution, with shape = K, scale = K, and optionally, threshold = K.
INVCDF: Session command for calculating the variable for a cumulative probability
INVCDF E [E]
Calculates the inverse of the cdf for the specified values in E from a standard normal distribution or another
specified distribution and stores in E.
INVCDF returns the inverse of the cumulative distribution function (cdf), meaning that for a given probability, p,
INVCDF finds a value of x such that p = CDF(x).
For discrete distributions, INVCDF (p) = min {x such that CDF(x) > p}.
If you do not specify a distribution, results are generated for a normal distribution with mu = 0 and sigma = 1.
Storage is optional. If you specify a storage column, the INVCDF values are stored there and are not displayed. If
you do not specify a storage column, Minitab displays the INVCDF values.
CHISQUARE K [K]
Specifies distribution with degrees of freedom = K, and, optionally, noncentrality parameter = K.
NORMAL [K [K]]
Specifies distribution. Generates data from a standard normal distribution. Optionally, specify mean = K, and
standard deviation = K.
F K K [K]
Specifies distribution, with numerator degrees of freedom = K, denominator degrees of freedom = K, and,
optionally, noncentrality parameter = K.
T K [K]
Specifies distribution, with degrees of freedom = K and, optionally, noncentrality parameter = K.
UNIFORM [K K]
Specifies distribution. Generates data using lower endpoint = 0.0 and upper endpoint = 1.0. Optionally,
specify lower endpoint = K and upper endpoint = K.
BINOMIAL K K
Specifies distribution, with number of trials = K and event probability = K.
GEOMETRIC K
Specifies distribution, with event probability = K.
94
Minitab 18 Statistical Software Manipulating and Calculating Data
NONEVENT
Models the number of nonevents before the first event occurs.
TOTAL
Models the total number of trials that are needed to produce one event.
NEGBINOMIAL K K
Specifies distribution, with event probability = K and number of events needed = K.
NONEVENT
Models the number of nonevents before the specified number of events occurs.
TOTAL
Models the total number of trials that are needed to produce the specified number of events.
HYPERGEOMETRIC K K K
Specifies distribution, with population size = K, event count in population = K, and sample size = K.
DISCRETE C C
Specifies distribution, with values in C and probabilities in C.
INTEGER K K
Specifies distribution, with discrete uniform on integers from minimum value = K to maximum value = K.
POISSON K
Specifies distribution, with mean = K.
BETA K K
Specifies distribution, with first shape parameter = K and second shape parameter = K.
CAUCHY [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
EXPONENTIAL [K [K]]
Specifies distribution. Generates data using mean = 1.0 and threshold = 0.0. Optionally, specify mean = K
and threshold = K.
GAMMA K K [K]
Specifies distribution, with shape = K, scale = K, and, optionally, threshold = K.
LAPLACE [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
LEXTREME [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
LOGISTIC [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
95
Minitab 18 Statistical Software Manipulating and Calculating Data
LLOGISTIC [K [K [K]]]
Specifies distribution. Generates data using location = 0.0, scale = 1.0, and threshold = 0.0. Optionally, specify
location = K, scale = K, and threshold = K.
LNORMAL [K [K [K]]]
Specifies distribution. Generates data using location = 0.0, scale = 1.0, and threshold = 0.0. Optionally, specify
location = K, scale = K, and threshold = K.
SEXTREME [K [K]]
Specifies distribution. Generates data using location = 0.0 and scale = 1.0. Optionally, specify location = K
and scale = K.
TRIANGULAR K K K
Specifies distribution, with lower endpoint = K, mode = K, and upper endpoint = K.
WEIBULL K K [K]
Specifies distribution, with shape = K, scale = K, and optionally, threshold = K.
Matrices
READ data into a matrix
READ
Puts numbers into a matrix. To input data to columns, go to READ data into columns on page 40. You can specify
the filename as either the name of the file in double quotes, or a stored text constant. If the file has an extension
other than DAT and/or if it is not in your current directory, include the file extension and the path within the single
quotation marks.
You can use either spaces or commas to separate the data in the matrix.
You must specify the dimension of the matrix in the READ command. The first K gives the number of rows, the
second K the number of columns. If a file name is not used, READ is followed by data lines, each containing one
row of the matrix. The following command creates the following matrix.
Command
READ 3 4 M2
1 2 3 4
5 6 7 8
9 10 11 12
END
Matrix
1 2 3 4
5 6 7 8
9 10 11 12
FILE "filename"
FILE K
Reads or inserts data from the specified text file.
96
Minitab 18 Statistical Software Manipulating and Calculating Data
DEFINE K K K M
Defines a constant matrix where K is the value, K is the number of rows, K is the number of columns, and M is the
stored matrix. For example, the following command language creates a matrix, M1, has 4 rows and 3 columns,
and all of whose entries are 1.
DEFINE 1 4 3 M1
DIAGONAL C M
Forms a matrix out of a column. If C has n entries, then M will be an n x n matrix with C as its diagonal and zeros
elsewhere.
DIAGONAL M C
Takes the diagonal of a matrix and puts it into a column.
INVERT: Session command for replacing a matrix value with its inverse
INVERT M M
Replaces each value in the matrix with its inverse. The first M is the matrix to be replaced. The second M is the
new inverted matrix. The matrix must be square.
TRANSPOSE: Session command for changing rows to columns, and columns to rows
TRANSPOSE C...C
TRANSPOSE C M
TRANSPOSE M C
TRANSPOSE M [M]
TRANSPOSE reconfigures data so that rows become columns and columns become rows.
• TRANSPOSE C...C transposes the values in the columns.
• TRANSPOSE C M transposes the values in a column to a matrix.
• TRANSPOSE MC transposes the values in a single row matrix to a column.
• TRANSPOSE M [M] transposes the values in a matrix to another matrix.
VARNAMES C
Specifies a column that contains variable names for the transposed columns.
STORE C...C
STORE M
Specifies where the transposed data are to be written. You can store the data in columns or a matrix. When
you transpose data to columns, the number of columns specified must equal the number of rows in the
original columns.
97
Minitab 18 Statistical Software Manipulating and Calculating Data
LABELS C
Specifies the column in which the labels of the transposed column or columns or matrix are stored.
NEWWS
NEWWS "text"
NEWWS K
Stores the results in a new worksheet. If you do not specify a worksheet name in "text" or in a constant (K)
argument, then Minitab uses the default naming of worksheets.
Important You cannot use NEWWS in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
NEW
NEW is superseded by NEWWS. In future releases of Minitab Statistical Software, NEW might not be recognized
and might generate errors.
Important You cannot use NEW in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
NAME K
NAME "text"
NAME is superseded by NEWWS. In future releases of Minitab Statistical Software, NAME might not be
recognized and might generate errors.
Specifies the name of the new worksheet. NAME accepts constant (K) or quoted text strings as arguments.
Important You cannot use NAME in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
AFTER
Appends the transposed data into empty columns after the last column of data in the current worksheet.
Important You cannot use AFTER in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
EIGEN M C [M]
Calculates eigenvalues (also called characteristic values or latent roots) and eigenvectors for a symmetric matrix.
The eigenvalues are stored in decreasing order of magnitude down the column. The eigenvectors are stored as
columns of the matrix. The first column corresponds to the first eigenvalue (largest magnitude), the second column
to the second eigenvalue, and so on.
98
Minitab 18 Statistical Software Manipulating and Calculating Data
Data
INFO: Session command for summarizing the current worksheet
INFO [C...C]
Summarizes the current worksheet.
If no columns are specified, INFO prints a list of all columns used with their names and counts, all stored constants,
all matrices. If there are missing observations, a count of these is also given. If a column contains text data, the
letter T is printed to the left of the column. If columns have assigned formulas, these are printed along with the
method selected for updating the calculations (manual or automatic). If you list columns, information is given on
just those columns.
You can also customize the merged worksheet using the optional subcommands. You can use BY to combine the
worksheets according to the order and length of one or more columns. In addition, you can specify whether or
not to include unmatched values, missing values or multiple values from one or both of the BY columns. You can
also specify which columns will be included from each original worksheet using INCLUDE.
Note Stored constants, matrices, DOE objects, and worksheet descriptions do not transfer into the merged worksheet.
NAME K
Specifies the name K for the new worksheet. The argument is a text constant, stated or stored. By default,
the name is Merge Worksheet.
WORKSHEET K
Specifies the name of one of the worksheets to be merged. The argument is a text constant, stated or stored.
This subcommand must be given twice.
BY C...C
Standardizes the combination of two worksheets. The order of the data within the BY columns becomes
ascending. The length and order of the remaining columns in the merged worksheet are manipulated
according to the BY column adjustments, no matter the order or length of the original columns.
The length of the columns also depends on how you would like to handle multiple, unmatched, and
missing observations within the BY columns. The adjusted length of the BY column or columns is still
applied to the order and length of the remaining columns.
99
Minitab 18 Statistical Software Manipulating and Calculating Data
• You must specify at least one pair of BY columns (one column from each worksheet) in the BY Columns
sub-dialog box. Additional BY columns must also come in pairs.
• BY columns must have the same data type (numeric, date/time, or text).
• When merging columns with value ordered text, the value orders in the BY columns must be the
same for both worksheets. For more information on value ordering, go to VORDER: Session command
for controlling the order for text categories to be processed by Minitab commands on page 132.
• Column lengths must be the same between multiple BY columns.
• Columns that are not the same lengths as the BY columns are excluded from the merged worksheet.
A note in the session window documents the number of columns excluded.
NOMULTIPLES
Ignores all but the first row with the same values for the BY columns. If more than one row in a worksheet
has values for the BY columns, then only the first such row is used.
Including multiple observations indicates that you wish to keep the observations of the BY column that
are repeated within the column, regardless of the BY column values in the other worksheet. However,
the values can still be matched to multiple observations in the BY columns of the other worksheet,
depending on whether or not NOMULTIPLES is used for the other worksheet. Therefore, you could end
up with longer columns in the merged worksheet. For example, if there are two rows in one worksheet
and three rows in the other, all with the same values of the BY columns, then six rows would result.
NOUNMATCHED
Removes unmatched BY column rows from the merged worksheet. If any row in a worksheet has values
for the BY columns that are not matched in the BY columns for the other worksheet, then that row is
not used.
By default, unmatched values are included which means that all of the rows in the opposite worksheet
that do not have matching BY column values are included. Missing value symbols would be added to
the cells for the entire row associated with the unmatched BY column values for the opposite worksheet.
Consequently, padding rows with missing values will make all of the columns for both of the worksheets
the same length as the BY columns.
INCLUDE C...C
Specifies which columns to include from the worksheet, whether you merge worksheets using the default
settings or using BY Columns. By default, all columns are included.
MISSINGS
Includes missing values within BY columns for both worksheets. The missing observations will be treated as
distinct values. The missing BY column value will be matched with a missing BY column value in the other
worksheet.
Note Missing values in text columns are represented by blanks and missing values in numeric and date/time columns are
represented by an asterisk.
100
Minitab 18 Statistical Software Manipulating and Calculating Data
The default is to sort by the first column and carry along additional columns. Sorting by multiple columns is done
with the BY subcommand. SORT handles any combination of alpha or numeric columns.
The following is a simple example of the default method. Sorting is done based on the first column specified, C2.
The next two columns, C3 and C4, are carried along. Sorting is done in ascending order unless you use the
subcommand DESCENDING.
SORT C2 C3 C4 C12 C13 C14
Before sorting
C2 C3 C4
2 10 -1
3 11 -1
1 12 -3
4 13 -1
5 14 -1
After sorting
BY C...C
Specifies the columns to use to sort the worksheet. Rows are first sorted by the first column listed following
BY, then, within that, by the second column, then, within that, by the third, and so on.
C2 C3 C4
2 10 -1
3 11 -1
1 12 -3
4 13 -1
5 14 -1
101
Minitab 18 Statistical Software Manipulating and Calculating Data
DESCENDING C...C
Requests that sorting be done in descending, rather than the default ascending, order. Columns listed on
DESCENDING must also be listed on BY, or must be the first column listed on SORT if no BY is used.
SORT C3 C23;
BY C2;
DESCENDING C2.
C2 C3
2 10
3 11
1 12
4 13
5 14
C23
14
13
11
10
12
UNEQUAL
If the columns to be sorted have different numbers of rows, adds missing values so that the columns have an
equal number of rows.
Storage
Important You cannot use NEWWS and AFTER local macros. For more information, go to Session commands that are not allowed in
macros on page 1023.
Note These subcommands are optional, and are mutually exclusive. If you do not use one of these subcommands, results are stored in
the columns that you specify with the main command.
102
Minitab 18 Statistical Software Manipulating and Calculating Data
NEWWS
Stores the results in a new worksheet, with the default name.
NEWWS ["text"]
NEWWS [K]
Stores the results in a new worksheet. If you do not specify a worksheet name in a "text" argument or in a constant
(K) argument, then Minitab uses the default naming of worksheets.
AFTER ["text"]
Stores the results at the end of the specified worksheet. If you do not specify a worksheet name in a "text" argument
or in a constant (K) argument, then Minitab stores the copied data at the end of the active worksheet.
ORIGINAL
Stores the results in the original columns.
The following command language ranks the values in C1 and puts the ranked values in C2.
RANK C1 C2
Before ranking
C1
0.5
1.0
1.5
1.0
2.0
0.0
After ranking
C1 C2
0.5 2.0
1.0 3.5
1.5 5.0
1.0 3.5
2.0 6.0
103
Minitab 18 Statistical Software Manipulating and Calculating Data
C1 C2
0.0 1.0
For example, the following command language changes the worksheet as shown below.
DELETE 2 5 6 C2-C4
Before DELETE
C2 C3 C4
23 4 154
31 5 175
22 4 143
26 3 153
32 6 167
30 6 158
24 4 155
After DELETE
C2 C3 C4
23 4 154
22 4 143
26 3 153
24 4 155
You can abbreviate a list of consecutive rows by using a colon. For example, to delete rows 1 through 10 and
rows 25 through 30 from C1, use the following command language.
DELETE 1:10 25:30 C1
The SPLIT command splits a worksheet into multiple new worksheets, one for each combination of a set of BY
variables. Each new worksheet is automatically named to reflect the combination of the BY variables.
104
Minitab 18 Statistical Software Manipulating and Calculating Data
Use SUBSET on page 106 to copy specified rows from the active worksheet to a new worksheet. With this command,
you can specify the subset based on row numbers, brushed points on a graph, or a condition such as unmarried
males under 50 years old.
BY C...C (required)
Specifies the columns to use to subset the worksheet. A new worksheet will be created for each unique value
or combination of values in the columns. Columns must be non-empty, all the same length, and can be of
any data type.
COLUMNS C...C
Specifies the columns to be copied to the new worksheet. Columns must be the same length as the BY
columns. Columns other than these are not copied.
MATRICES M...M
Specifies the matrices to be copied to the new worksheet. Matrices must has the same number of rows as
the BY columns. Matrices other than these are not copied.
NOMATRICES
Prevents matrices from being copied to the new worksheets.
NOCONSTANTS
Prevents stored constants from being copied to the new worksheets.
MISSINGS
Specifies that missing values are treated as a distinct value of the BY variable.
FORMAT
Indicates the format of the new date/time column or columns. For example:
• FORMAT (DTm/d/yy) formats a new column as 5/25/16
• FORMAT (DTm-d-yy) formats a new column as 5-25-16
For multiple columns, add the number of columns to the format statement. For example, for 2 columns, use
FORMAT (2DTm-d-yy).
For more information on date/time formats, go to Default date/time formats on page 983.
105
Minitab 18 Statistical Software Manipulating and Calculating Data
EXPAND C...C
Expands the specified column or columns, while stacking the rows.
EXSTORE C...C
Stores the expanded columns in the specified column.
SUBSCRIPTS C
Stores row subscripts in the specified column.
CSUBS C
Stores column subscripts in the specified column.
Use SUBSET to copy specified rows from the active worksheet to a new worksheet. With this command, you can
specify the subset based on rows that match conditions, row numbers, formatted rows, brushed points on a graph,
or a formula that you specify, such as unmarried males under 50 years old.
One of BRUSHED, WHERE, ROWS, conditions for values in a column, or conditions for row numbers, must be used.
If more than one is used, only the last valid one is honored.
Use SPLIT on page 104 to split, or unstack, the active worksheet into two or more new worksheets based on one
or more "By" variables. SUBSET and SPLIT always copy data to new worksheets.
INCLUDE
Includes the specified rows.
INCLUDE and EXCLUDE are mutually exclusive: the last one issued is honored. Choose INCLUDE or EXCLUDE
based on the degree of subsetting. For example, if you wish to use all but a few select rows in creating your
graph, it is more efficient to use EXCLUDE and name a small number of rows with the ROWS subsubcommand.
EXCLUDE
Excludes the specified rows.
INCLUDE and EXCLUDE are mutually exclusive: the last one issued is honored. Choose INCLUDE or EXCLUDE
based on the degree of subsetting. For example, if you wish to use all but a few select rows in creating your
graph, it is more efficient to use EXCLUDE and name a small number of rows with the ROWS subsubcommand.
106
Minitab 18 Statistical Software Manipulating and Calculating Data
MINCLUDE
Includes rows that contain missing values in the subset column.
MINCLUDE and MEXCLUDE are mutually exclusive: the last one issued is honored.
MEXCLUDE
Excludes rows that contain missing values in the subset column.
MINCLUDE and MEXCLUDE are mutually exclusive: the last one issued is honored.
AND
Allows you to specify multiple conditions. For example, LT C1 50 AND EQUAL C2 'Blue' denotes rows that
contain 50 or less in C1 and contain 'Blue' in C2.
OR
Allows you to specify multiple conditions.
ANY C K...K
Values in C that equal any of the specified values.
EQUALS C K
Values in C that equal the specified value.
NEQUALS C K
Values in C that do not equal the specified value.
LT C K
Values in C that are less than K.
LE C K
Values in C that are less than or equal to K.
GT C K
Values in C that are greater than K.
GE C K
Values in C that are greater than or equal to K.
107
Minitab 18 Statistical Software Manipulating and Calculating Data
LELE K C K
Values in C that are greater than or equal to K and less than or equal to K.
LELT K C K
Values in C that are greater than or equal to K and less than K.
LTLE K C K
Values in C that are greater than K and less than or equal to K.
LTLT K C K
Values in C that are greater than K and less than K.
BEGINS C K
Values in C that begin with K (text columns only).
ENDS C K
Values in C that end with K (text columns only).
CONTAINS C K
Values in C that contain K (text columns only).
NCONTAINS C K
Values in C that do not contain K (text columns only).
ROWS K...K
Specifies row numbers K through K. List all row numbers to be included or excluded with a space between each.
Denote a patterned range by K:K/K. For example, 10:50/5 denotes all values from 10 to 50 by intervals of 5.
ROWLE K
The row number is less than or equal to K.
ROWGE K
The row number is greater than or equal to K. For example, ROWGE 12 denotes row numbers that are greater
than or equal to 12.
ROWBETWEEN K K
The row number is between K and K inclusive. The first value must be less than or equal to the second.
Other conditions
BRUSHED
Specifies the rows that are currently brushed.
108
Minitab 18 Statistical Software Manipulating and Calculating Data
WHERE expression
Specify a formula for subsetting. This formula must be in quotes. For example:
• To subset where C1 is 2, enter WHERE "C1 = 2".
• To subset where C2 = a, enter WHERE "C2 = ""a""".
• To subset where C3 = 3/3/16, enter WHERE "C3 = DATE(""3/3/98"")".
CFORMAT C
Specifies a column that includes formatted rows.
NAME "text"
NAME K
Specifies the name of the new worksheet in a "text" argument or in a constant (K).
COLUMNS C...C
Specifies one or more columns of the appropriate length to be copied to the new worksheet. Columns other than
these are not copied.
EQLN
Includes in the subset only columns that are the same length as the column with the condition. If this subcommand
is not used, all columns in the worksheet are included in the subset.
MATRICES M...M
Specifies one or more matrices with the appropriate number of rows to be copied to the new worksheet. Matrices
other than these are not copied.
NOMATRICES
Prevents matrices from being copied to the new worksheet.
NOCONSTANTS
Prevents stored constants from being copied to the new worksheet.
For information on using this command without subcommands to select data entry options, Using READ and
INSERT without subcommands on page 1028.
For additional information on INSERT, go to Reading in data from a text file on page 1021 and Inserting data into
existing columns on page 1014.
Note The menu commands File > Open Worksheet and File > Merge Worksheet also open ASCII (text) files, and many other types
of files as well. They also provide several useful options that are not available with READ or INSERT.
109
Minitab 18 Statistical Software Manipulating and Calculating Data
FILE "filename"
FILE K
Inserts data from the specified text file. You may specify the filename as either the name of the file in double
quotes, or a stored text constant. If the file has an extension other than DAT and/or if it is not in your current
directory, include the file extension and the path within the single quotation marks. For example, use the
following command to read a copy of the file SALES.ASC stored in the subdirectory JANUARY underneath
the directory SMITH on the C drive.
READ C1-C5;
FILE "C:\SMITH\JANUARY\SALES.ASC".
The FORMAT subcommand is useful when you want to skip over spaces, read data that have no spaces
between them, insert decimal points in numbers, or read in text data, date/time data, or currency data.
Format items may be combined together according to the normal rules of Fortran formats. For example, the
following command reads the name in the first 20 spaces of each data line into Name (C12), skips the next
10 spaces (spaces 21 through 30), then reads the number in space 31 into C1, the number in space 32 into
C2, ..., the number in space 40 into C10.
NAME C12 'Name'
READ 'Name' C1-C10;
FILE "MYDATA";
FORMAT(A20, 10X, 10F1).
Minitab has a special date/time (DT) format which works as shown below. This says to read the date/time
value in the first 8 spaces in the file into C1, and that the format of the date/time data in the file is m/d/yy.
READ C1;
FILE "DATEDATA";
FORMAT(DT8m/d/yy).
The following example shows the use of a repeat factor in front of parentheses, T format, and the slash.
READ C11-C15;
FILE "EMPLOYEEDATA";
FORMAT (F2.1, 2(1X,F3), T60, F4/F2).
This example uses two data lines for every row read. From the first line, the value of C11 is in spaces 1 and
2. Space 3 is skipped, and C12 is read from spaces 4 to 6. Space 7 is skipped, and C13 is read from spaces 8
to 10. Then the reading jumps to space 60, and C14 is read from spaces 60 to 63. In response to the /, reading
moves to the second data line, and C15 is read from spaces 1 and 2. For more information, go to Valid format
items on page 1032.
NOBS K
The NOBS subcommand specifies the number of observations (rows) to be inserted. If an END on page 34
subcommand or end-of-file is encountered before K observations are inserted, NOBS is ignored. NOBS is
useful when you want to insert just the first portion of a file. It is also useful for Prompting a user for
information on page 1021.
SKIP K
Tells Minitab to skip K lines at the top of the data file before beginning to INSERT data into the file. This is
most useful when you have one or more lines of text, such as column names and titles, at the top of a data
file that you want to import into Minitab.
110
Minitab 18 Statistical Software Manipulating and Calculating Data
READ enters new data into columns, replacing any data already in those columns, if it exists. Use INSERT on page
36 to add data to the top, between two rows, or at the bottom of existing columns. For information on entering
data into a matrix, go to READ data into a matrix on page 43.
When you enter data manually, type END. after you enter your final value.
When you use READ, you can use a space or a comma to separate data entries. For example:
READ C1 C5.
1 2
3,4
END.
For details on using this command without subcommands to select data entry options, go to Using READ and
INSERT without subcommands on page 1028.
Note The menu commands File > Open Worksheet and File > Merge Worksheet also open ASCII (text) files and many other types
of files. They also provide several useful options not available with READ or INSERT.
FILE "filename"
Inserts data from the specified text file. You may specify the filename as either the name of the file in double
quotes, or a stored text constant. If the file has an extension other than DAT and/or if it is not in your current
directory, include the file extension and the path within the single quotation marks. For example, use the
following command to read a copy of the file SALES.ASC stored in the subdirectory JANUARY underneath
the directory SMITH on the C drive.
READ C1-C5;
FILE "C:\SMITH\JANUARY\SALES.ASC".
The FORMAT subcommand is useful when you want to skip over spaces, read data that have no spaces
between them, insert decimal points in numbers, or read in text data, date/time data, or currency data.
Format items may be combined together according to the normal rules of Fortran formats. For example, the
following command reads the name in the first 20 spaces of each data line into Name (C12), skips the next
10 spaces (spaces 21 through 30), then reads the number in space 31 into C1, the number in space 32 into
C2, ..., the number in space 40 into C10.
NAME C12 'Name'
READ 'Name' C1-C10;
FILE "MYDATA";
FORMAT(A20, 10X, 10F1).
Minitab has a special date/time (DT) format which works as shown below. This says to read the date/time
value in the first 8 spaces in the file into C1, and that the format of the date/time data in the file is m/d/yy.
READ C1;
FILE "DATEDATA";
FORMAT(DT8m/d/yy).
111
Minitab 18 Statistical Software Manipulating and Calculating Data
The following example shows the use of a repeat factor in front of parentheses, T format, and the slash.
READ C11-C15;
FILE "EMPLOYEEDATA";
FORMAT (F2.1, 2(1X,F3), T60, F4/F2).
This example uses two data lines for every row read. From the first line, the value of C11 is in spaces 1 and
2. Space 3 is skipped, and C12 is read from spaces 4 to 6. Space 7 is skipped, and C13 is read from spaces 8
to 10. Then the reading jumps to space 60, and C14 is read from spaces 60 to 63. In response to the /, reading
moves to the second data line, and C15 is read from spaces 1 and 2. For more information, go to Valid format
items on page 1032.
NOBS K
The NOBS subcommand specifies the number of observations (rows) to be inserted. If an END on page 34
subcommand or end-of-file is encountered before K observations are inserted, NOBS is ignored. NOBS is
useful when you want to insert just the first portion of a file. It is also useful for Prompting a user for
information on page 1021.
SKIP K
Tells Minitab to skip K lines at the top of the data file before beginning to INSERT data into the file. This is
most useful when you have one or more lines of text, such as column names and titles, at the top of a data
file that you want to import into Minitab.
TAB
TAB, NONAMES and ALPHA work with READ when only when reading a file. They do not work with READ if you
type data at the DATA> prompt. For more information, go to Using READ with TAB on page 1029.
TAB imports tab-delimited data into Minitab. TAB automatically checks for column names and text columns. You
cannot use TAB with FORMAT.
Suppose your text file looks like this, where <Tab> is used in place of tab characters:
ID <Tab> Height <Tab> Weight
3B <Tab> 60 <Tab> 100
4A <Tab> 58 <Tab> 89
42 <Tab> 60 <Tab> 120
The following command reads the file MYFILE.DAT (or the file MYFILE with no extension) into the first three
columns of the worksheet, identifies the first column as text, the next two columns as numeric, and names the
three columns ID, Height, and Weight.
READ C1-C3;
FILE "MYFILE";
TAB.
If you use TAB alone (without NONAMES or ALPHA), Minitab proceeds as follows: It checks the first row of the
file. If the row contains non-numeric values, Minitab reads that row as column names.
If the first row is all numeric (or an allowable currency format), Minitab reads it as numeric data. Minitab then
reads the remaining rows as data. To determine whether a column is text or numeric, Minitab looks at the first
row of data (either row one or two). If a column contains a text value in that row (other than an allowable currency
symbol), the column is treated as text. Otherwise, it is treated as numeric.
NONAMES
If you do not want TAB to read the first row of your file as column names, use NONAMES in addition to TAB.
112
Minitab 18 Statistical Software Manipulating and Calculating Data
ALPHA K...K
If you want READ to treat particular columns as text columns, thereby overriding TAB's automatic checking,
use ALPHA. The numbers you list with ALPHA tell Minitab which columns in the data file are text. For example,
ALPHA 2 tells Minitab that the second column in the data file (and only the second column) is text. The
following command imports a tab-delimited, data (text) file into C11- C15, with no column names, and treats
the third and fourth input columns (these were put into C13 and C14 in this case) as text columns.
READ C11-C15;
FILE "MYFILE";
TAB;
NONAMES;
ALPHA 3 4.
DECIMAL ","
DECIMAL "."
Specifies a comma or period as a decimal separator.
You can use either spaces or commas to separate the data in the matrix.
You must specify the dimension of the matrix in the READ command. The first K gives the number of rows, the
second K the number of columns. If a file name is not used, READ is followed by data lines, each containing one
row of the matrix. The following command creates the following matrix.
Command
READ 3 4 M2
1 2 3 4
5 6 7 8
9 10 11 12
END
Matrix
1 2 3 4
5 6 7 8
9 10 11 12
FILE "filename"
FILE K
Reads or inserts data from the specified text file.
113
Minitab 18 Statistical Software Manipulating and Calculating Data
In the following example, portions of numbers were originally entered into columns C1–C3. CONCATENATE
combines C1-C3 into one column, C4.
READ C1-C3;
FORMAT (A4, A3, A4).
192-42-7777
123-45-6789
END
CONCATENATE C1-C3 C4
The worksheet is changed as follows.
C1 C2
-1.0 100.0
3.0 3.0
1.1 1.1
-1.0 100.0
0.0 0.0
-2.0 100.0
2.4 2.4
An interval can be abbreviated with a colon. For example, the following command language changes all values
in the range 1 to 1.5, and the value 2 into a 5.
CODE (1:1.5, 2)5 C1-C3 C11-C15
You can make several changes at one time. For example, suppose the data in columns C1–C5 include integers 1
through 10. In this case, the following command language changes all values in C1–C5 that are from 1 to 5 into
10, and all values that are from 6 to 10 into 20, and stores the results in C11–C15.
CODE (1:5)10 (6:10)20 C1-C5 C11-C15
CODE can change values into the missing data code. For example, to change –99 to *, use the following command
language.
CODE (–99) '*' C1-C10;
ORIGINAL.
114
Minitab 18 Statistical Software Manipulating and Calculating Data
You can also code text data. Enclose text values with double quotation marks. Denote a missing text value as two
double quotation marks, with no space in between, as "". For example, use the following command language to
code 1, 2, and 3 to low, medium, and high.
CODE (1) "low" (2) "medium" (3) "high" C1 C2
You can also use CONVERT on page 116 to recode text data.
ENDPOINTS K
For coding ranges of values, the value of K controls inclusion of the endpoints.
TSUMMARY
Shows the summary table in the output.
NODEFAULT
Suppresses the summary table in the output.
LFPERCENT K K
Recodes the unique values (of the input columns specified in the CODE command) above the Kth percentile
in count to K, and places the recoded values into output columns specified in the CODE command.
LFVALUE K K
Recodes the unique values (of the input columns specified in the CODE command) that occur less than K
times to K, and places the recoded values into output columns specified in the CODE command.
Storage
The following subcommands are optional, and are mutually exclusive. If you do not use one of these subcommands,
results are stored in the columns that you specify with the main command.
NEWWS
NEWWS "text"
NEWWS K
Stores the results in a new worksheet. If you do not specify a worksheet name in a "text" argument or in a constant
(K) argument, then Minitab uses the default naming of worksheets.
115
Minitab 18 Statistical Software Manipulating and Calculating Data
AFTER
AFTER "text"
Stores the results at the end of the specified worksheet. If you do not specify a worksheet name in a "text"
argument, then Minitab stores the copied data at the end of the active worksheet.
ORIGINAL
Stores the results in the original columns.
A conversion table, assigning a numeric value to each text value, must be put into two columns before CONVERT
is used. Then, using these matching values, CONVERT changes all corresponding numeric values to the correct
text values (or vice versa). If no match is found, a missing value is stored. Missing values are denoted by * in a
numeric column and a blank in a text column. CONVERT can also be used to convert from numeric to numeric or
from text to text.
Use the following commands to store a conversion table in C1–C2. For more information on entering data using
format statements, go to READ data into a matrix on page 43 or READ data into columns on page 40 and INSERT
on page 36.
READ C1 C2;
FORMAT (F1, 1X, A6).
1 RED
2 YELLOW
END
Use the conversion table to do two conversions. The first CONVERT converts numbers in C3 to colors in C10. The
second converts colors in C4 to numbers in C11.
CONVERT C1 C2 C3 C10
CONVERT C2 C1 C4 C11
The worksheet is changed as follows.
NODEFAULT
Suppresses the summary table in the output.
116
Minitab 18 Statistical Software Manipulating and Calculating Data
For example, suppose you have sales data for each day of the year, but you want to summarize sales for each
quarter of the year. You can use Round Date/Time to round the dates down to the nearest quarter.
QUARTER
MONTH
WEEK
DAY
HOUR
MINUTE
SECOND
TENTH
HUNDREDTH
THOUSANDTH
Options
UP
Use UP to round up to the nearest whole unit.
NEAREST
Use NEAREST to round up or down to the nearest whole unit.
Note To round down to the nearest whole unit, don't specify UP or NEAREST.
117
Minitab 18 Statistical Software Manipulating and Calculating Data
Date/time input
WKDAY
Extracts the day of the week (Sun, Mon, Tue, Wed, Thu, Fri, Sat).
DAY
Extracts the day of the month (01, 02, ..., 31).
WEEK
Extracts the week of the year number (Wk01 - Wk53).
MONTH
Extracts the month (Jan, Feb, Mar, Apr, ..., Dec).
QUARTER
Extracts the quarter (Q1, Q2, Q3, Q4).
YEAR
Extracts the year.
TWODIGIT
Uses the two digit format (00, 01, ..., 99).
FOURDIGIT
Uses the four digit format (2000, 2001, ..., 2099).
HOUR
Extracts the hour (00, 01, ..., 23).
MINUTE
Extracts the minute (00, 01, ..., 59).
SECOND
Extracts the second (00, 01, ..., 59).
HUNDREDTH
Extracts the hundredth of a second (00, 01, ..., 99).
Minitab automatically formats the new alpha column up to 8 characters wide. Use WIDTH or MAXWIDTH (you
cannot use both) to override this default.
118
Minitab 18 Statistical Software Manipulating and Calculating Data
WKDAY
Extracts the day of the week (Sun, Mon, Tue, Wed, Thu, Fri, Sat).
DAY
Extracts the day of the month (01, 02, ..., 31).
WEEK
Extracts the week of the year number (Wk01 - Wk53).
MONTH
Extracts the month (Jan, Feb, Mar, Apr, ..., Dec).
QUARTER
Extracts the quarter (Q1, Q2, Q3, Q4).
YEAR
Extracts the year.
TWODIGIT
Uses the two digit format (00, 01, ..., 99).
FOURDIGIT
Uses the four digit format (2000, 2001, ..., 2099).
HOUR
Extracts the hour (00, 01, ..., 23).
MINUTE
Extracts the minute (00, 01, ..., 59).
SECOND
Extracts the second (00, 01, ..., 59).
HUNDREDTH
Extracts the hundredth of a second (00, 01, ..., 99).
WIDTH K
Fixes the width (in characters) of the output column.
MAXWIDTH K
Fixes the maximum width (in characters) of the output column.
MISSING "text"
Converts missing values to "text".
WIDTH K
Fixes the width (in characters) of the output column.
MAXWIDTH K
Fixes the maximum width (in characters) of the output column.
119
Minitab 18 Statistical Software Manipulating and Calculating Data
SIGNIFICANT K
Specifies the number of significant digits to maintain (up to a maximum of 6). You cannot use both SIGNIFICANT
and DECIMALS with one command.
DECIMALS K
Specifies the number of decimal digits to maintain. You cannot use both SIGNIFICANT and DECIMALS with one
command.
MISSING "text"
Converts the missing value symbol * to a specified character string. Unless you specify the width of your output
with WIDTH or MAXWIDTH, the default length for the string is 8 characters.
WIDTH K
Fixes the width (in characters) of the output column.
MAXWIDTH K
Fixes the maximum width (in characters) of the output column.
Columns to stack
C1 C2 C3 C4
66 130 70 155
64 125 66 145
65 115 69 160
Stacked columns
C5 C6
70 155
66 145
69 160
66 130
64 125
65 115
120
Minitab 18 Statistical Software Manipulating and Calculating Data
The following command language puts 66, 64, 65, 70, 66, 69, 67, and 63 into C10. The last column (or block of
columns) specified is the target column.
STACK C1 C3 67 63 C10
SUBSCRIPTS C
Creates a column of subscripts in the original worksheet. The first block is given the subscript 1, the second
block the subscript 2, and so on.
USENAMES
Creates subscripts based on variable names.
NEWWS
NEWWS "text"
NEWWS K
Stores the results in a new worksheet. If you do not specify a worksheet name in a "text" argument or in a
constant (K) argument, then Minitab uses the default naming of worksheets. Minitab automatically creates
a subscripts column in the new worksheet.
Important You cannot use NEWWS in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
USENAMES
Creates subscripts based on variable names.
SUBSCRIPTS C...C
Uses columns to unstack data. The rows with the smallest subscript are stored in the first block, the rows
with the second smallest subscript in the second block, and so on. If you do not use SUBSCRIPTS, each row
is stored in a separate block.
In general, each block must be enclosed in parentheses. However, if a block contains just one argument, you
may omit the parentheses.
MISSINGS
Includes rows subscripted with missing data as part of the unstacked data.
121
Minitab 18 Statistical Software Manipulating and Calculating Data
NEWWS
NEWWS "text"
NEWWS K
Stores the results in a new worksheet. If you do not specify a worksheet name in "text" or in a constant (K)
argument, then Minitab uses the default naming of worksheets.
Important You cannot use NEWWS in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
VARNAMES
Labels the columns for the unstacked data with the source variable name (the source column's label or
number if no label exists) and the corresponding row entries from the subscript column or columns. If you
do not use SUBSCRIPT, the text strings "Row1", "Row2", and so on are used.
AFTER
Appends the unstacked data into empty columns after the last column of data in the current worksheet.
Important You cannot use AFTER in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
Use WSTACK to stack two or more worksheets. The argument is the names of the worksheets. For example,
WSTACK "Worksheet1" "Worksheet 2" stacks Worksheet 1 on top of Worksheet 2. Minitab stacks columns with
the same names. Columns that don't have the matching names are kept as separate columns.
Within this command, you can specify that the results are placed in a new worksheet (NEWWS) or appended to
an existing worksheet (APPEND). NEWWS and APPEND subcommands are mutually exclusive. If neither is specified,
NEWWS is assumed.
NEWWS "text"
NEWWS K
Stores the results in a new worksheet. If you do not specify a worksheet name in "text" or in a constant (K)
argument, then Minitab uses the default naming of worksheets.
APPEND
Appends the data to the bottom of the first worksheet that you specified in WSTACK.
TSUMMARY (default)
TSUMMARY and NODEFAULT are mutually exclusive. TSUMMARY shows the summary table in the output.
122
Minitab 18 Statistical Software Manipulating and Calculating Data
NODEFAULT
TSUMMARY and NODEFAULT are mutually exclusive. NODEFAULT suppresses the summary table in the
output.
TRANSPOSE C M
TRANSPOSE M C
TRANSPOSE M [M]
TRANSPOSE reconfigures data so that rows become columns and columns become rows.
• TRANSPOSE C...C transposes the values in the columns.
• TRANSPOSE C M transposes the values in a column to a matrix.
• TRANSPOSE MC transposes the values in a single row matrix to a column.
• TRANSPOSE M [M] transposes the values in a matrix to another matrix.
VARNAMES C
Specifies a column that contains variable names for the transposed columns.
STORE C...C
STORE M
Specifies where the transposed data are to be written. You can store the data in columns or a matrix. When
you transpose data to columns, the number of columns specified must equal the number of rows in the
original columns.
LABELS C
Specifies the column in which the labels of the transposed column or columns or matrix are stored.
NEWWS
NEWWS "text"
NEWWS K
Stores the results in a new worksheet. If you do not specify a worksheet name in "text" or in a constant (K)
argument, then Minitab uses the default naming of worksheets.
Important You cannot use NEWWS in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
NEW
NEW is superseded by NEWWS. In future releases of Minitab Statistical Software, NEW might not be recognized
and might generate errors.
123
Minitab 18 Statistical Software Manipulating and Calculating Data
Important You cannot use NEW in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
NAME K
NAME "text"
NAME is superseded by NEWWS. In future releases of Minitab Statistical Software, NAME might not be
recognized and might generate errors.
Specifies the name of the new worksheet. NAME accepts constant (K) or quoted text strings as arguments.
Important You cannot use NAME in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
AFTER
Appends the transposed data into empty columns after the last column of data in the current worksheet.
Important You cannot use AFTER in a local macro. For more information, go to Session commands that are not allowed in
macros on page 1023.
In addition to format, the source and destination must be compatible in size. For example, you cannot copy a
column with 100 rows into a set of 50 constants. You can subset the source data to accommodate the size of the
destination.
If you don't specify an argument, COPY copies the entire contents of the current worksheet to another worksheet.
You can specify an argument to do the following:
• Copy columns into columns, constants, or a matrix.
• Copy constants into constants or columns.
• Copy a matrix into columns or a matrix.
Specify a subset
INCLUDE and EXCLUDE are mutually exclusive. The last one issued is honored. Choose INCLUDE or EXCLUDE based
on the degree of subsetting. For example, if you want to use all rows, except a few, use EXCLUDE and specify a small
number of rows with the ROWS subsubcommand.
INCLUDE
Includes the specified rows.
BRUSHED
Use to specify all brushed rows for subsetting.
WHERE "expression"
Specify a condition to be met for subsetting. This condition must be in double quotation marks. For example:
124
Minitab 18 Statistical Software Manipulating and Calculating Data
ROWS K:K
List all row numbers to be included or excluded with a space between each. Denote a patterned range by
K:K/K. For example, 10:50/5 denotes all values from 10 to 50 by intervals of 5.
EXCLUDE
Excludes the specified rows.
BRUSHED
Use to specify all brushed rows for subsetting.
WHERE "expression"
Specify a condition to be met for subsetting. This condition must be in double quotation marks. For example:
• To subset where C1 is 2, enter WHERE "C1 = 2".
• To subset where C2 = a, enter WHERE "C2 = ""a"".
• To subset where C3 = 3/3/16, enter WHERE "C3 = DATE(""3/3/16"")".
ROWS K:K
List all row numbers to be included or excluded with a space between each. Denote a patterned range by
K:K/K. For example, 10:50/5 denotes all values from 10 to 50 by intervals of 5.
Note You can use only one NEWWS, AFTER, or STORE subcommand.
NEWWS
NEWWS "text"
NEWWS K
Stores the results in a new worksheet. If you do not specify a worksheet name in "text" or in a constant (K) argument,
then Minitab uses the default naming of worksheets.
AFTER
AFTER "text"
AFTER K
Stores the results at the end of the specified worksheet. If you do not specify a worksheet name in a "text" argument
or in a constant (K) argument, then Minitab stores the copied data at the end of the active worksheet.
125
Minitab 18 Statistical Software Manipulating and Calculating Data
STORE K E...E
Naming
VARNAMES
Gives default names to the stored columns, constants, or matrix.
NAME K (optional)
Specifies the name K for the new worksheet.
Editor
CFORMAT: Session command for conditional formatting of
worksheet cells
CFORMAT C...C
Formats cells in the specified columns based on the specified rule.
You can specify only one rule subcommand (and possibly its sub-subcommands) with the CFORMAT command
at a time. However, you can run CFORMAT on the same column multiple times, and the rules accumulate. If a cell
is affected by multiple rules, the formatting of the most recent rule is used.
The availability of a specific rule might depend on the data type of the column specified in CFORMAT.
Attribute subcommands
The following subcommands define the cell format for cells that meet the condition.
TCOLOR K
Specifies the text color with a number value in K, which is a number from Numbers for colors to use in session
commands on page 1016.
BOLD
Applies bold style to text in the cells to format.
126
Minitab 18 Statistical Software Manipulating and Calculating Data
NOBOLD
Removes bold style from text in the cells to formats.
ITALIC
Applies italic style to text in the cells to format.
NOITALIC
Removes italic style from text in the cells to format.
UNDERLINE
Underlines text in the cells to format.
NOUNDERLINE
Removes underline from text in the cells to format.
COLOR K
Specifies the fill color of the cells with a number value in K, which is a number from Numbers for colors to use in
session commands on page 1016.
MISSING
Formats cells that contain missing observations (available for columns with any data type).
GT K
Formats cells that are greater than K (available for columns with any data type).
LT K
Formats cells that are less than K (available for columns with any data type).
BETWEEN K K
Formats cells between K and K, inclusive (available for columns with any data type).
NOTBETWEEN K K
Formats cells that are not between K and K, inclusive (available for columns with any data type).
EQUALS K
Formats cells that are equal to K (available for columns with any data type).
TEXT "text"
Formats cells that contain the text string, 'text" (available for text columns) The text string may be found within a
larger text string. For example, if the rule is to format cells that contain "abc", a cell that contains dabcd would
be formatted.
VALUES C
VALUES K...K
Formats cells that match any of the values in C or in K...K (available for columns with any data type) C or K...K have
the same data type as the columns specified in CFORMAT.
NOVALUES C
NOVALUES K...K
Formats cells that do not match any of the values in C or in K...K (available for columns with any data type) C or
K...K have the same data type as the columns specified in CFORMAT.
127
Minitab 18 Statistical Software Manipulating and Calculating Data
YESTERDAY
Formats cells that contain yesterday's date (available for date/time columns).
TODAY
Formats cells that contain today's date (available for date/time columns).
LAST K
Formats cells that contain a date that occurred within the last K days (available for date/time columns).
LWEEK
Formats cells that contain a date that occurred last week (available for date/time columns).
TWEEK
Formats cells that occur this week (available for date/time columns).
LMONTH
Formats cells that occurred last month (available for date/time columns).
TMONTH
Formats cells that occur this month (available for date/time columns).
Hi low rules
HVALUE K
Formats cells that contain the highest K values in the column (available for numeric and date/time columns). If
there are ties at the Kth location, all tied values will be formatted.
HPERCENT K
Formats cells that contain the highest K percentage of values in the column (available for numeric and date/time
columns).
LVALUE K
Formats cells that contain the lowest K values in the column (available for numeric and date/time columns) If
there are ties at the Kth location, all tied values will be formatted.
LPERCENT K
Formats cells that contain the lowest K percentage of values in the column (available for numeric and date/time
columns).
Pareto rules
MFREQUENT K
Formats cells that contain the K most frequent values (available for columns with any data type).
MPERCENT K
Formats cells that contain the top K% of values (available for columns with any data type).
BFREQUENT
Formats cells that contain the K least frequent values (available for columns with any data type).
BPERCENT K
Formats cells that contain the bottom K% of values (available for columns with any data type).
128
Minitab 18 Statistical Software Manipulating and Calculating Data
Statistical rules
OUTLIER
Formats cells that are outliers (available for columns with any data type) Columns can be different data types.
BOXPLOT
Observations that meet the conditions for outliers on a boxplot are formatted.
STDEV K
Observations that are more than K standard deviations away from the mean are formatted.
CONTROL K K
Formats cells that contain values that are out of control (available for numeric and date/time data).
The CONTROL subcommand honors preferences (Tools > Options) settings to determine the Test 1 rule criteria
and to determine the estimate of standard deviation used.
SPECIFICATION
Formats cells that are outside of the specification limits (available for numeric and date/time data)
LSPEC K
Specifies the lower specification limit. Cells with values less than K are out of specification.
K for LSPEC can be any numeric or date/time value, but K for LSPEC must be less that K for USPEC. Both Ks
must match the type for the argument to CFORMAT.
USPEC K
Specifies the upper specification limit. Cells with values greater than K are out of specification.
K for USPEC can be any numeric or date/time value, but K for LSPEC must be less that K for USPEC. Both Ks
must match the type for the argument to CFORMAT.
RESIDUAL
Formats cells that are unusual observations from a model because of large standardized residual (available for
response columns that have a model associated with them).
129
Minitab 18 Statistical Software Manipulating and Calculating Data
UNUSUAL
Formats cells that are unusual observations from a model because they exhibit high leverage (available for response
columns that have a model associated with them).
For more information on date/time formats, go to Default date/time formats on page 983.
130
Minitab 18 Statistical Software Manipulating and Calculating Data
For multiple columns, add the number of columns to the format statement. For example, for 2 columns, use
FORMAT (2DTm-d-yy).
The culture name is a combination of an ISO 639 two-letter lowercase culture code associated with a language
and an ISO 3166 two-letter uppercase subculture code associated with a country or region. The format for
the culture name is "<languagecode2>-<country/regioncode2>". For example:
• "ja-JP" represents Japanese (Japan)
• "en-US" represents English (United States)
In cases where a two-letter language code is not available, use the three-letter code derived from ISO 639-2.
AUTO
The values in the column determine the format of the column, for example, the number of decimal places
and the currency symbol (if entered).
FIXED K
Displays numeric data to K decimal places.
EXPONENTIAL [K]
Displays numeric data using exponential notation. The optional argument K specifies the number of decimal
places.
CURRENCY [K]
Displays currency data. The optional argument K specifies the number of decimal places, from 0 to 30 inclusive.
SYMBOL "text"
Specifies the currency symbol as a text value.
NEGATIVE K
Displays negative values using a minus sign (K = 1) or parentheses (K = 2).
PERCENTAGE K
Displays percentage data to K decimal places.
131
Minitab 18 Statistical Software Manipulating and Calculating Data
VALUES K...K
VALUES C
Specifies the value order using either stored or stated text constants or a single text column.
If you use the VALUES subcommand more than one time, the last one with valid arguments wins. In the first
form, stored or stated text constants are used to specify the values in order. In the second form, the rows of
a single text column are used to specify the values in order. In either form, it is an error for values to be
repeated. Note that the command language does not provide access to standard orderings.
WORKSHEET
Specifies to order data based on the first occurrence in the worksheet.
ALPHABETICAL
Specifies to order data in alphabetical order.
132
Minitab 18 Statistical Software Basic Statistics
Basic Statistics
DESCRIBE: Session command for summarizing
numeric data with statistics
DESCRIBE C...C
Produces descriptive statistics for each column. You can do the calculations and display graphs separately for
each level of a BY variable. For information on limitations with the BY subcommand, go to Limitations of graphs
with the DESCRIBE and GSUMMARY session commands on page 1015.
Control of grouping
BY
Use BY to produce separate statistics and graphs for each unique value in C. The values in the BY column may
contain numeric, text, or date/time data and may be any value. When the BY column is text, the first entry (row
1) is level 1, the next entry that is different is level 2, and so on. Column lengths must be equal to use BY.
For information on limitations with the BY subcommand, go to Limitations of graphs with the DESCRIBE and
GSUMMARY session commands on page 1015.
Statistics
MEAN
Calculates the arithmetic mean, or average. The mean is a commonly used measure of the center of a batch of
numbers.
Note Missing values are omitted from the calculation of the function Mean.
SEMEAN
Gives the standard error of the mean. It is calculated as StDev / SQRT (N).
STDEV
Calculates the sample standard deviation, which provides a measure of how spread out the data are. To calculate
the variance, simply square the standard deviation value.
If the column contains x1, x2, ..., xn, with mean x, then the standard deviation is calculated as follows:
Note Missing values are omitted from the calculation of the function Standard deviation.
133
Minitab 18 Statistical Software Basic Statistics
VARIANCE
Variance is a measure of how far the data are spread about the mean. Sample variance equals the standard
deviation squared. It can also be computed with this formula:
CVARIATION
Displays the coefficient of variation, a measure of relative variability. It is calculated as: 100 (s / x).
MEDIAN
Stores the median of a column. The median is in the middle of the data: half the observations are less than or
equal to it. Suppose the column contains n values. If n is odd, the median is the value in the middle. If n is even,
the median is the average of the two middle values.
Note Missing values are omitted from the calculation of the function Median.
MODE
Displays the mode of a column. The mode of a data set is the value that occurs most frequently. For example, the
mode for data set {1, 3, 4, 4, 7} is 4.
Note For data sets that have multiple mode values, Minitab displays only the four smallest modes.
TRMEAN
A 5% trimmed mean is calculated. Minitab removes the smallest 5% and the largest 5% of the values (rounded
to the nearest integer).
SUM
Calculates the sum.
Note Missing values are omitted from the calculation of the function Sum.
MIN
Stores the smallest number in a column.
Note Missing values are omitted from the calculation of the function MIN.
MAX
Stores the largest number in a column.
Note Missing values are omitted from the calculation of the function MAX.
RANGE
Calculates the difference between the largest and smallest data value.
SSQ
Squares each value in the column, and computes the sum of those squared values. That is, if the column contains
x1, x2, ..., xn, then sum of squares calculates (x12 + x22 + ... + xn2).
Note Missing values are omitted from the calculation of the function the function Sum of Squares (corrected).
134
Minitab 18 Statistical Software Basic Statistics
SKEWNESS
Skewness is a measure of asymmetry. A value more than or less than zero indicates skewness in the data. But a
zero value does not necessarily indicate symmetry.
KURTOSIS
Kurtosis is one measure of how different a distribution is from the normal distribution. A positive value characterizes
a distribution with a sharper peak than the normal distribution. A negative value characterizes a distribution with
a flatter peak than the normal distribution.
MSSD
MSSD computes half the Mean of the Squared Successive Differences of a batch of numbers. For example, suppose
a column contains 1, 2, 4, and 10. The successive differences are 2 - 1 = 1, 4 - 2 = 2, and 10 - 4 = 6. Then:
N
Returns the number of nonmissing observations in a column.
NMISS
Returns the number of missing observations in a column.
COUNT
Returns the total number of observations in a column.
When used as an option with TALLY on page 749 (Stat > Tables > Tally > Tally Individual Variables) or the
STATS on page 137, COUNT computes the number of observations in each group. For example, if you tally a column
containing 1s, 2s and 3s, COUNT tells you how many of each there are. Using COUNTS with STATS, you can store
these counts, which is useful if you want to generate a frequency plot.
CUMN
CUMN, or cumulative n, computes a cumulative frequency count of the number of non-missing observations in
each group listed in the BY columns. If there are no BY columns listed, CUMN simply counts the non-missing
observations in the columns listed with DESCRIBE or STATS. CUMN counts observations for non-missing groups
only, unless you include the MISSING subcommand.
PERCENT
If you want statistics for different groups listed in one or more BY columns, PERCENT computes what percentage
of the whole is accounted for by each group.
For example, suppose you list one BY column containing five 1s, one 2, and four 3s. PERCENT computes 50% for
the first group, 10% for the second, and 40% for the third.
If you omit the BY subcommand, then PERCENT and CUMPERCENT calculate the value 100 (for 100%).
If you include columns on the main DESCRIBE or STAT command line, then PERCENT and CUMPERCENT calculate
percentages for only the non-missing values in those columns.
CUMPERCENT
If you want statistics for different groups listed in one or more BY columns, CUMPERCENT computes the cumulative
percentage represented by each group.
For example, suppose you list one BY column containing five 1s, one 2, and four 3s.
If you omit the BY subcommand, then PERCENT and CUMPERCENT calculate the value 100 (for 100%).
135
Minitab 18 Statistical Software Basic Statistics
If you include columns on the main DESCRIBE or STAT command line, then PERCENT and CUMPERCENT calculate
percentages for only the non-missing values in those columns.
Graphs
Each graph subcommand displays a graph in a separate Graph window for each variable listed on the command line.
If you use the BY subcommand, Minitab generates one graph for each column listed on the command line.
GHISTOGRAM
Displays a histogram for each variable.
GHISTOGRAM and GNHISTOGRAM display a histogram for each level of the BY variable in a separate Graph
window. The histograms for one variable are on the same scale to facilitate comparisons between the levels.
GNHISTOGRAM
Displays a histogram with a normal curve for each variable. GNHISTOGRAM bases each normal curve on the
sample mean and standard deviation of the data in the corresponding histogram.
GHISTOGRAM and GNHISTOGRAM display a histogram for each level of the BY variable in a separate Graph
window. The histograms for one variable are on the same scale to facilitate comparisons between the levels.
GINDPLOT
Displays an individual value plot for each variable.
GINDPLOT and GBOXPLOT display side-by-side plots in a single graph, one for each level of the BY variable. This
allows you to easily compare the different levels of the BY variable.
GBOXPLOT
Displays a boxplot for each variable.
GINDPLOT and GBOXPLOT display side-by-side plots in a single graph, one for each level of the BY variable. This
allows you to easily compare the different levels of the BY variable.
GSUMMARY
Displays a graphical summary for each variable.
Quartiles
Every group of data has three quartiles. To calculate quartiles, use Sort (Data > Sort) to order the data from smallest
to largest. The first quartile (Q1) is the observation at position (n+1) / 4. The second quartile is the median. The third
quartile (Q3) is the observation at position 3(n+1) / 4, where n is the number of observations. If the position is not an
integer, interpolation is used.
For example, suppose n=10. Then (10 + 1)/4 = 2.75, and Q1 is between the second and third observations (call them
x2 and x3), three-fourths of the way up. Thus, Q1 = x2 + 0.75(x3 – x2). Since 3(10 + 1)/4 = 8.25, Q3 = x8 + 0.25(x9 –
x8), where x8 and x9 are the eight and ninth observations.
QONE
The first quartile is also referred to as the 25th percentile because data from 25% of the observations are less than
or equal to this value.
136
Minitab 18 Statistical Software Basic Statistics
IQRANGE
The interquartile range equals Q3 – Q1.
QTHREE
The third quartile is also referred to as the 75th percentile because data from 75% of the observations are less
than or equal to this value.
STATS is similar to the commands TALLY on page 749, TABLE on page 747, and DESCRIBE on page 133. TALLY, TABLE,
and DESCRIBE compute many of these statistics and display them in an easy-to-read table format. But TABLE and
DESCRIBE cannot store the values of these statistics for use in further analysis as STATS can.
Here is an example using the PULSE.MTW data set. This data set includes three columns named Height, Weight,
and Sex (containing 1's for males, 2's for females). The NAME command names the three new columns that STATS
will store its results in. GVALUES will store the numbers 1 and 2 into C11, because these are the distinct values in
the BY column named Sex. MEAN will store the mean height for males and the mean height for females in C12,
and the mean weight for males and the mean weight for females in C13.
NAME C11 'SexID' C12 'MeanHt' C13 'MeanWt'
STATS 'Height' 'Weight';
BY 'Sex';
GVALUES C11;
MEAN C12 C13.
When there is no BY subcommand, you must list at least one column on the main STATS command line. In that
case, STATS computes the requested statistics for the entire column.
When you omit columns from the main STATS command line, you must use the BY subcommand. In that case,
you may store these statistics: N, NMISS, COUNT, CUMN, PERCENT, and CUMPERCENT. For more information,
go to Notes on subcommands that store statistics on page 1016.
You can use either the GLABELS, GVALUES, or GIDS subcommand so that you know which group each row of
statistics belongs to. Use the NAME on page 56 command to name each column so that you know what you
stored.
Control of grouping
BY C...C
BY lists the columns that contain the group variables (such as a column named Temp containing the values Low,
Medium, and High). Columns listed with BY may contain numeric, text, or date/time data. When you include the
BY subcommand, STATS computes statistics for each group listed in the BY columns or columns. When you omit
the BY subcommand, STATS computes statistics for whole columns rather than for subgroups.
NOEMPTY
NOEMPTY omits empty cells.
137
Minitab 18 Statistical Software Basic Statistics
MISSINGS
MISSINGS includes missing as a distinct value of the BY column (when the BY column includes a missing value).
Otherwise, rows with missing values in BY columns are omitted.
Options
These subcommands store each distinct value listed in each BY column. Therefore, use the same number of columns
as you list with BY. It is a good idea to include at least one of these subcommands so you will know which group each
row of statistics belongs to.
GLABELS C...C
GLABELS stores the actual labels from your BY columns (such as 10, 20, 30, or Low, Medium, High). GLABELS
always stores the labels as text.
GVALUES C...C
GVALUES also stores the actual labels from your BY columns, but it stores them as the same data type (numeric
or text) as the BY variable.
GIDS C...C
GIDS stores a 1 for the first value in your BY column, a 2 for the second value, and so on, in a numeric column. If
the BY column is numeric, GIDS stores a 1 for the smallest number in the BY column, a 2 for the next largest
number, and so on. If the BY column contains text, GIDS stores a 1 for the first entry (row 1), a 2 for the next entry
that is different, and so on.
EXPAND
Stores a row of the desired statistic for each row of input instead. If you do not issue EXPAND, Minitab stores the
statistic in the first row.
Statistics
MEAN
Stores the arithmetic mean, or average. The mean is a commonly used measure of the center of a batch of numbers.
Note Missing values are omitted from the calculation of the function Mean.
SEMEAN
Stores the standard error of the mean. It is calculated as StDev / SQRT (N).
STDEV
Stores the sample standard deviation, which provides a measure of how spread out the data are. To calculate the
variance, simply square the standard deviation value.
If the column contains x1, x2, ..., xn, with mean x, then the standard deviation is calculated as follows:
Note Missing values are omitted from the calculation of the function Standard deviation.
VARIANCE
Stores the sample variance, which is a measure of how far the data are spread about the mean. Sample variance
equals the standard deviation squared. It can also be computed with this formula:
138
Minitab 18 Statistical Software Basic Statistics
CVARIATION
Stores the coefficient of variation, a measure of relative variability. It is calculated as: 100 (s / x).
MEDIAN
Stores the median of a column. The median is in the middle of the data: half the observations are less than or
equal to it. Suppose the column contains n values. If n is odd, the median is the value in the middle. If n is even,
the median is the average of the two middle values.
Note Missing values are omitted from the calculation of the function Median.
TRMEAN
Stores a 5% trimmed mean. Minitab removes the smallest 5% and the largest 5% of the values (rounded to the
nearest integer).
SUM
Stores the sum.
Note Missing values are omitted from the calculation of the function Sum.
MIN
Stores the smallest number in a column.
Note Missing values are omitted from the calculation of the function MIN.
MAX
Stores the largest number in a column.
Note Missing values are omitted from the calculation of the function MAX.
RANGE
Stores the difference between the largest and smallest data value.
SSQ
Stores the sum of squares. Squares each value in the column, and computes the sum of those squared values.
That is, if the column contains x1, x2, ..., xn, then sum of squares calculates (x12 + x22 + ... + xn2).
Note Missing values are omitted from the calculation of the function the function Sum of Squares (corrected).
SKEWNESS
Stores the skewness value. Skewness is a measure of asymmetry. A value more than or less than zero indicates
skewness in the data. But a zero value does not necessarily indicate symmetry.
KURTOSIS
Stores the kurtosis value. Kurtosis is one measure of how different a distribution is from the normal distribution.
A positive value characterizes a distribution with a sharper peak than the normal distribution. A negative value
characterizes a distribution with a flatter peak than the normal distribution.
MSSD
Stores half the Mean of the Squared Successive Differences of a batch of numbers. For example, suppose a column
contains 1, 2, 4, and 10. The successive differences are 2 – 1 = 1, 4 – 2 = 2, and 10 – 4 = 6. Then:
139
Minitab 18 Statistical Software Basic Statistics
N
Stores the number of nonmissing observations in a column.
NMISS
Stores the number of missing observations in a column.
COUNT
Stores the total number of observations in a column.
When used as an option with TALLY on page 749 (Stat > Tables > Tally > Tally Individual Variables) or the
STATS command, COUNT computes the number of observations in each group. For example, if you tally a column
containing 1s, 2s and 3s, COUNT tells you how many of each there are. Using COUNTS with STATS, you can store
these counts, which is useful if you want to generate a frequency plot.
CUMN
Stores a cumulative frequency count of the number of non-missing observations in each group listed in the BY
columns. If there are no BY columns listed, CUMN simply counts the non-missing observations in the columns
listed with DESCRIBE or STATS. CUMN counts observations for non-missing groups only, unless you include the
MISSING subcommand.
PERCENT
If you want statistics for different groups listed in one or more BY columns, PERCENT computes what percentage
of the whole is accounted for by each group.
For example, suppose you list one BY column containing five 1s, one 2, and four 3s. PERCENT computes 50% for
the first group, 10% for the second, and 40% for the third.
If you omit the BY subcommand, then PERCENT and CUMPERCENT calculate the value 100 (for 100%).
If you include columns on the main DESCRIBE or STAT command line, then PERCENT and CUMPERCENT calculate
percentages for only the non-missing values in those columns.
CUMPERCENT
If you want statistics for different groups listed in one or more BY columns, CUMPERCENT computes the cumulative
percentage represented by each group.
For example, suppose you list one BY column containing five 1s, one 2, and four 3s.
If you omit the BY subcommand, then PERCENT and CUMPERCENT calculate the value 100 (for 100%).
If you include columns on the main DESCRIBE or STAT command line, then PERCENT and CUMPERCENT calculate
percentages for only the non-missing values in those columns.
140
Minitab 18 Statistical Software Basic Statistics
BY
Lists the columns that contain the group variables (such as a column named Temp containing the values
Low, Medium, and High). Columns listed with BY may contain numeric, text, or date/time data.
When you include the BY subcommand, GSUMMARY creates a summary for each group listed in the BY
column or columns. When you omit the BY subcommand, GSUMMARY creates a summary for whole columns
rather than for subgroups. For more information, go to Limitations of graphs with the DESCRIBE and
GSUMMARY session commands on page 1015.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default
value of K is 95.
SMCONF C C
Stores the confidence interval for the median in C and C.
SSCONF C C
Stores the confidence interval for the standard deviation in C and C.
ONEZ K K
Performs a 1-sample Z-test for the raw or summarized data. You need to provide a value for population standard
deviation the SIGMA subcommand. When you do not know the population standard deviation, you can use ONET
on page 142.
ONEZ K K performs a Z-test using summarized data with sample size and sample mean in K and K, respectively.
SIGMA K (required)
Specifies the value of the population standard deviation.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default
value of K is 95.
ALTERNATIVE K
Enter K to specify the direction of the alternative hypothesis.
141
Minitab 18 Statistical Software Basic Statistics
TEST K
Tests the null hypothesis using the hypothesized mean specified in K.
SPVALUE C
SPVALUE stores the p-value of the test in a column.
SCONF C C
SCONF stores the confidence interval for the mean in two columns.
Graphs
Displays a graph for each column listed with ONEZ. Each graph displays the sample mean and a K% confidence interval
for the mean. No graph is displayed for the summarized data.
GHISTOGRAM
Displays a histogram.
GINDPLOT
Displays an individual value plot.
GBOXPLOT
Displays a boxplot.
ONET K K K
Performs a t-test using raw or summarized data. The population standard deviation for the test is estimated form
the columns listed with ONET. A test value is specified with the TEST subcommand. ONET performs a two-sided
test unless you use the ALTERNATIVE subcommand to specify a one-sided test. If you know the population
standard deviation or deviations, use ONEZ on page 141 instead.
ONET K K K performs a t-test for the summarized data using sample size, sample mean, and population standard
deviation specified in K, K, and K, respectively.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default
value of K is 95.
ALTERNATIVE K
Enter K to specify the direction of the alternative hypothesis.
142
Minitab 18 Statistical Software Basic Statistics
TEST K
Tests the null hypothesis using the hypothesized mean specified in K.
SPVALUE C
SPVALUE stores the p-value of the test in a column.
SCONF C C
SCONF stores the confidence interval for the mean in two columns.
Graphs
Displays a graph for each column listed with ONET. Each graph displays the sample mean and a K% confidence interval
for the mean. No graph is displayed for the summarized data.
GHISTOGRAM
Displays a histogram.
GINDPLOT
Displays an individual value plot.
GBOXPLOT
Displays a boxplot.
TWOT K K K K K K
TWOT performs a two-sample t-test and confidence interval when the samples and subscripts are in separate
columns or when you have summarized data. Use TWOSAMPLE on page 144 when the samples are in different
columns.
You can specify a confidence level to change the default level for the confidence interval produced by TWOT. The
default level is 95%. K can be any number between 1 and 100. For example, if you enter the command TWOT 90
C1 C2, Minitab calculates a 90% confidence interval.
TWOT C C performs a 2-sample t-test when the samples are in one column and subscripts are in another column.
TWOT K K K K K K performs a 2-sample t-test using summarized data with sample size, mean, and standard
deviation listed for each sample.
ALTERNATIVE K
Specifies a one-sided test. K = –1 gives H1: μ < K, and K = +1 gives H1: μ > K1.
143
Minitab 18 Statistical Software Basic Statistics
TEST K
Specifies the null hypothesis value K.
POOLED
Uses a pooled procedure to estimate σ. This procedure assumes the two populations have equal variances.
The POOLED procedure is slightly more powerful than the method that does not assume equal variances,
but can be seriously in error if the variances are not equal. Thus, the POOLED subcommand should not be
used in most cases.
GINDPLOT
The graph for GINDPLOT contains two individual value plots, one for each sample. The individual value plots
displays the sample mean and a K% confidence interval for each sample.
GBOXPLOT
The graph for GBOXPLOT contains two boxplots, one for each sample. The boxplots display the sample mean
and a K% confidence interval for each sample.
SPVALUE C
SPVALUE stores the p-value of the test in a column.
SCONF C C
SCONF stores the confidence interval for the mean in two columns.
You can specify a confidence level to change the default level for the confidence interval produced by TWOSAMPLE.
The default level is 95%. K can be any number between 1 and 100. For example, if you enter the command
TWOSAMPLE 90 C1 C2, then a 90% confidence interval is calculated.
ALTERNATIVE K
Specifies a one-sided test. K = –1 gives H1: μ < K, and K = +1 gives H1: μ > K1.
TEST K
Specifies the null hypothesis value K.
POOLED
Uses a pooled procedure to estimate σ. This procedure assumes the two populations have equal variances.
The POOLED procedure is slightly more powerful than the method that does not assume equal variances,
but can be seriously in error if the variances are not equal. Thus, the POOLED subcommand should not be
used in most cases.
144
Minitab 18 Statistical Software Basic Statistics
GINDPLOT
The graph for GINDPLOT contains two individual value plots, one for each sample. The individual value plots
displays the sample mean and a K% confidence interval for each sample.
GBOXPLOT
The graph for GBOXPLOT contains two boxplots, one for each sample. The boxplots display the sample mean
and a K% confidence interval for each sample.
SPVALUE C
SPVALUE stores the p-value of the test in a column.
SCONF C C
SCONF stores the confidence interval for the mean in two columns.
PAIR K K K
Performs a paired t-test. This test is appropriate for testing the mean difference between paired observations
when the paired differences follow a normal distribution.
Use to calculate a confidence interval and perform a hypothesis test of the mean difference between paired
observations in the population. A paired t-procedure matches responses that are dependent or related in a pairwise
manner. This matching allows you to account for variability between the pairs usually resulting in a smaller error
term, thus increasing the sensitivity of the hypothesis test or confidence interval.
Typical examples of paired data include measurements on twins or before-and-after measurements. For a paired
t-test, the hypotheses are as follows:
where μd is the population mean of the differences and μ0 is the hypothesized mean of the differences.
When the samples are drawn independently from two populations, use TWOSAMPLE on page 144 or TWOT on
page 143.
PAIR K K K performs a paired t-test using summarized data when K = sample size, K = mean difference, and K =
standard deviation difference.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default
value of K is 95.
ALTERNATIVE K
Specifies a one-sided test. K = –1 gives H1: μd < μ0, and K = +1 gives H1: μd > μ0.
TEST K
Conducts a test of the null hypothesis μ = K.
145
Minitab 18 Statistical Software Basic Statistics
SPVALUE C
SPVALUE stores the p-value of the test in a column.
SCONF C C
SCONF stores the confidence interval for the mean in two columns.
Graphs
Each of the following graphs displays the sample mean, a K% confidence interval for the mean, and the value under
H0.
GHISTOGRAM
Displays a histogram of the paired differences.
GINDPLOT
Displays an individual value plot of the paired differences.
GBOXPLOT
Displays a boxplot of the paired differences.
PONE K K...K
Performs a test of one binomial proportion.
Use PONE to compute a confidence interval and perform a hypothesis test of the proportion. For example, an
automotive parts manufacturer claims that his spark plugs are less than 2% defective. You could take a random
sample of spark plugs and determine whether or not the actual proportion defective is consistent with the claim.
For a two-tailed test of a proportion:
PONE K K...K performs a test of one proportion on summarized data where K = the number of trials and subsequent
Ks = the number of events.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default
value of K is 95.
ALTERNATIVE K
Specify a one-sided test. K = –1 gives H1: p < K, and K = +1 gives H1: p > K1.
146
Minitab 18 Statistical Software Basic Statistics
TEST K
Specifies the null hypothesis value K.
USEZ
Specifies to use the normal approximation to the binomial distribution for calculating the hypothesis test
and confidence interval.
SPVALUE C
SPVALUE stores the p-value of the test in a column.
SCONF C C
SCONF stores the confidence interval for the mean in two columns.
PTWO K K K K
Performs a test of two binomial proportions.
Use PTWO to compute a confidence interval and perform a hypothesis test of the difference between two
proportions. For example, suppose you wanted to know whether the proportion of consumers who return a survey
could be increased by providing an incentive such as a product sample. You might include the product sample
with half of your mailings and see if you have more responses from the group that received the sample than from
those who did not. For a two-tailed test of two proportions:
• Enter each sample (unstacked) in separate numeric or text columns. Both columns must be the same
type-numeric or text. Successes and failures are defined as above for stacked data.
You can reverse the definition of success and failure in a text column by applying a value order. For more
information, go to VORDER on page 132.
147
Minitab 18 Statistical Software Basic Statistics
The sample sizes do not need to be equal. Minitab automatically omits missing data from the calculations.
For raw data, enter the number of trials and the number of successes for each sample on the main command line.
Enter four integers: the number of trials and the number of successes in the first sample followed by the number
of trials and the number of successes in the second sample.
PTWO K K K K performs a test of two proportions on summarized data where K = the number of trials and K =
the number of events for the first proportion, and K = the number of trials and K = the number of events for the
second proportion.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default
value of K is 95.
ALTERNATIVE K
Specify a one-sided test. K = –1 gives H1: p < K, and K = +1 gives H1: p > K1.
TEST K
Specifies the null hypothesis value K.
STACKED
Specifies that the data have been entered in a stacked format: the raw data is in one column and the subscripts
or group column to identify the population are in a second column.
POOLED
Specifies to use a pooled estimate of p to calculate the test statistic.
SPVALUE C
Stores the p-value of the test in a column.
SFISHER C
Stores the p-value for the Fisher's exact test in a column.
SCONFC C
Stores the confidence interval for the mean in two columns.
ONERATE K K...K
Performs a hypothesis test and calculates a confidence interval for the population Poisson rate for each sample
you input. You can enter data in raw, summarized, or frequency format. Specify a hypothesized test value with
the TEST subcommand. Minitab performs a two-sided test unless you use the ALTE subcommand to specify a
one-sided test. Specify the length of the observation space with the LENGTH subcommand to analyze the mean
number of occurrences in addition to the occurrence rate.
ONERATE C...C calculates a confidence interval for the population Poisson rate for each column of raw sample
data.
148
Minitab 18 Statistical Software Basic Statistics
ONERATE K K...K calculates a confidence interval for the population Poisson rate for summarized data. The first
K equals the sample size; subsequent values of K correspond to the number of events in each summarized sample.
You cannot use this command to analyze samples with different sample sizes.
FREQ C...C
If your data exists in frequency format, use this subcommand to specify the frequency columns. Enter them
in the same order in which you enter the columns of unique observations.
LENGTH K [K]...[K]
Specify the length of the observation space for each sample to obtain confidence intervals of mean number
occurrences in addition to the rate of occurrences. By default, length equals 1, and the occurrence rate equals
the mean number of occurrences.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default
value of K is 95.
ALTERNATIVE K
Enter K to specify the direction of the alternative hypothesis.
TEST K
Performs a hypothesis test of population Poisson rate. Enter the hypothesized value of the population Poisson
rate for K.
USEZ
Specifies the normal approximation method for calculating the hypothesis test and confidence interval. By
default, Minitab uses the exact method instead of the normal approximation method. This subcommand
accepts no arguments.
TWORATE K K K K
Use TWORATE C C to perform a hypothesis test and calculates a confidence interval for the difference between
the Poisson rates of two populations. For unstacked data, the arguments correspond to the two columns of data.
For stacked data, the first C corresponds to the column of stacked sample data, and the second C corresponds
to the column of subscripts.
Use TWORATE K K K K with summarized data to perform a hypothesis test and calculate a confidence interval for
the difference between the Poisson rates of two populations. The first K equals the size of the first sample; the
second K equals the number of occurrences in the first sample; the third K equals the size of the second sample;
the fourth K equals the number of occurrences in the second sample.
149
Minitab 18 Statistical Software Basic Statistics
LENGTH K [K]
Specify the length of observation for each sample to analyze both the mean number of occurrences and the
occurrence rate. If you enter one K, this value becomes the length for both samples. If you enter two values
for K, the first becomes the length for the first sample, and the second K becomes the length of the second
sample.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default
value of K is 95.
ALTERNATIVE K
Enter K to specify the direction of the alternative hypothesis.
TEST K
Specifies the hypothesized value for the difference between the two population Poisson rates. The default
value is 0.
STACKED
Indicates that the data for both samples are stacked in a single column. This subcommand accepts no
arguments.
FREQ C [C]
Use this subcommand if your data exists in frequency format. For stacked data, enter only one column of
frequencies. For unstacked data, enter two columns of frequency data in the same order in which you enter
the columns of unique observations.
POOLED
Uses a pooled estimate of the occurrence rate for both populations. The argument for the TEST subcommand
must equal zero to use this option. By default, Minitab estimates the rate of each population separately by
using the observed sample rates. This subcommand accepts no arguments.
ONEV K K
For each sample you input, this command performs a one variance hypothesis test and produces a confidence
interval for the population variance. A test value is specified with the STEST or VTEST subcommands. Minitab
performs a two-sided test unless you use the ALTERNATIVE subcommand to specify a one-sided test. If you prefer
to work in terms of standard deviation instead of variance, use the STDEV subcommand.
150
Minitab 18 Statistical Software Basic Statistics
ONEV C...C calculates a confidence interval for the population variance for each column of raw data. Output
includes results of the chi-square method (for normal distributions) and the Bonett method (for any continuous
distribution).
ONEV K K calculates a confidence interval for the population variance with summarized data. The first K equals
the sample size; the second K equals the sample variance. Output only includes results of the chi-square method
(for normal distributions).
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default
value of K is 95.
ALTERNATIVE K
Enter K to specify the direction of the alternative hypothesis.
STEST K
STEST performs a hypothesis test of the population standard deviation.
VTEST K
VTEST performs a hypothesis test of the population variance. K specifies the hypothesized value of the
population and must be a positive number.
STDEV
This subcommand indicates that input values refer to standard deviation instead of variance, where applicable.
Furthermore, this subcommand causes Minitab to produce output in terms of standard deviation instead of
variance. By default, Minitab interprets input and produces output in terms of variance. This subcommand
accepts no arguments.
151
Minitab 18 Statistical Software Basic Statistics
TWOVARIANCES C C
Performs two variances test when sample data are in different columns.
TWOVARIANCES C C
Performs two variances test when all sample data are in one column C and subscripts are in a second column C.
Use STACKED with this option.
STACKED
Specifies that data are stacked.
TWOVARIANCES K K K K
Performs two variances test using summarized data. Specify the sample size and variance for Sample 1 and the
sample size and variance for Sample 2. If you specify standard deviations instead of variances, use the STDEV
subcommand.
Options
STDEV
Indicates that the input summary values refer to standard deviations instead of variances.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
ALTERNATIVE K
Enter K to specify the direction of the alternative hypothesis.
STEST K
STEST specifies the hypothesized value K for the ratio of two standard deviations. K must be a positive number.
The default is 1, which tests for equal standard deviations. STEST and VTEST are mutually exclusive.
VTEST K
VTEST specifies the hypothesized value K for the ratio of two variances. K must be a positive number. The default
is 1, which tests for equal variances. STEST and VTEST are mutually exclusive.
152
Minitab 18 Statistical Software Basic Statistics
SNAMES K K
Specifies names for the samples when you enter summarized data. The default sample names are "Sample 1" and
"Sample 2".
USEF
Specifies to use the F-test method instead of Bonett's method and Levene's method. The F-test is accurate only
for normally distributed data. Any departure from normality can cause the F-test to yield inaccurate results.
However, if the data conform to the normal distribution, then the F-test is typically more powerful than either
Bonett's test or Levene's test.
Graphs
GINTERVAL
GINTERVAL displays a graphical summary of the results including the following:
• Confidence intervals for the ratio of the standard deviations or variances
• P-values for the hypothesis tests
• Boxplots of each sample
GHISTOGRAM
GHISTOGRAM displays a graph containing a histogram for each sample.
GINDPLOT
GINDPLOT displays a graph containing an individual value plot for each sample.
Results
NODEFAULT
Specifies that none of the following results are displayed.
TMETHOD
TMETHOD displays the method table which includes the null hypothesis, the alternative hypothesis, and the
significance level (denoted by α or alpha).
TSTATISTICS
TSTATISTICS displays the statistic table which includes the standard deviation of each sample, the variance of
each sample, and the confidence interval for the standard deviation or the variance of each sample. The ratio of
the standard deviations and the ratio of the variances are also displayed.
TCONFIDENCE
TCONFIDENCE displays the confidence interval table which includes confidence intervals for the ratio of the
standard deviations and the ratio of the variances.
TTEST
TTEST displays the test table which includes the degrees of freedom, the test statistics, and the p-values. When
the sample sizes are unequal, the test statistic for Bonett's method is undefined. However, the p-value can be
calculated by inverting the confidence interval procedure.
153
Minitab 18 Statistical Software Basic Statistics
When you list two columns on the main command line, Minitab calculates the correlation coefficient for the pair.
When you list more than two columns, Minitab calculates the correlation between every pair of columns, and
displays the lower triangle of the resulting correlation matrix (in blocks if there is insufficient room to fit across a
page).
Minitab does not display the correlation matrix when the matrix is stored in M.
For more information, go to Calculating a partial correlation coefficient using the CORRELATION session command
on page 979.
SPEARMAN
Calculates the Spearman rank-order correlation (also called Spearman's rho). The Spearman correlation
evaluates the monotonic relationship between two continuous or ordinal variables. In a monotonic relationship,
the variables tend to change together, but not necessarily at a constant rate. The Spearman correlation
coefficient is based on the ranked values for each variable rather than the raw data.
Spearman correlation is often used to evaluate relationships involving ordinal variables. For example, you
might use a Spearman correlation to evaluate whether the order in which employees complete a test exercise
is related to the number of months they have been employed.
NOPVALUES
Suppresses the display of the p-values for correlations.
SPVALUE M
Stores the matrix of p-values for the hypothesis test of the correlation coefficient being zero for each pair.
A missing value is stored for a p-value that corresponds to the test of a variable with itself.
When you list two columns on the command line, Minitab calculates the covariance for the pair. When you list
more than two columns, Minitab calculates the covariance for every pair of columns, and displays the lower triangle
of the resulting covariance matrix (in blocks if there is insufficient room to fit across a page). Minitab does not
display the covariance matrix when the matrix is stored in M.
154
Minitab 18 Statistical Software Basic Statistics
Normal plots use the values in the input column as x-values. The grid on the graph resembles the grids found on
normal probability paper. The horizontal axis is a linear scale. The line forms an estimate of the cumulative
distribution function for the population from which data are drawn.
By default, an Anderson-Darling test for normality is performed and the numerical results are displayed with the
graph. You can also use a Ryan-Joiner test (similar to a Shapiro-Wilk test) or a Kolmogorov-Smirnov test.
PTILES C
PTILES K...K
Specifies a set of reference percents. The values must be between 0 and 100 when percents are used as the
y-scale type or 0 to 1 when probability is the y-scale type. Minitab marks each percent in the column with a
horizontal reference line on the plot, and marks each line with the percent value. Minitab draws a vertical
reference line where the horizontal reference line intersects the line fit to the data, and marks this line with
the estimated data value.
DVALUE
Use DVALUE to show the percents at the reference x-scale positions specified in PTILES.
PERCENT
Specifies a percent y-scale.
PROBABILITY
Specifies a probability y-scale.
SCORES
Specifies a percentile y-scale.
TITLE "title"
Specifies a title for the graph. If you do not specify a title, Minitab uses a default title.
SPVALUE C
SPVALUE stores the p-value of the test in a column.
GSAVE "file_name"
GSAVE K
Saves the graph in a file.
The default file name is Minitab.MGF. You can specify a custom file name in double quotation marks
("file_name"), or as a stored text constant (K). You can also use any of the following subcommands to save
the graph in a different graphics format.
Some graph commands—for example, HISTOGRAM C1 C2 C3—generate more than one graph. If you include
the GSAVE subcommand with such a command, Minitab saves multiple files. Minitab gives each file a different
file name. Minitab uses the first five characters of the name you specify, then appends a number (001, 002,
and so on), for up to 500 files.
155
Minitab 18 Statistical Software Basic Statistics
If you try to overwrite an existing file using GSAVE, Minitab displays a message. The message asks whether
you want to replace the existing file. If you use GSAVE with no file name for multiple graphs, Minitab displays
the message only for the first graph. Then, Minitab replaces the other graphs automatically. You can use
REPLACE or NOREPLACE to bypass the message. Bypassing the message is especially useful in a macro. After
you save the file, you can view the graph with GVIEW.
REPLACE
Bypasses the message that asks whether you want to replace the existing file. If you use both REPLACE
and NOREPLACE, Minitab uses the last subcommand.
NOREPLACE
Bypasses the message that asks whether you want to replace the existing file. If a file with the same
name exists, Minitab displays an error and stops the command or quits the macro. If you use both
REPLACE and NOREPLACE, Minitab defaults to the last subcommand.
JPEG
JPEG color
PNGB
PNG black and white
PNGC
PNG color
PNGH
PNG high color
TIFB
TIF black and white
TIF
TIF color
BMPB
BMP black and white
BMPC
BMP color
BMPH
BMP high color
GIF
GIF
EMF
EMF
RESOLUTION K
Saves the graph at a resolution of K dots per inch.
Goodness-of-fit tests
There are 3 types of goodness-of-fit test: a chi-square based test, an ECDF based test, and a correlation based test.
By default, Minitab uses the Anderson-Darling test, which is an ECDF based test.
156
Minitab 18 Statistical Software Basic Statistics
When your α-value is greater than the p-value displayed with the graph, you reject the hypothesis of normality. The
α-value (also called significance level), is the probability that you will reject the hypothesis of normality when the
hypothesis is true.
For example, if you are using an α-value of 0.10 and the p-value displayed in the Graph window is 0.07, then you reject
the hypothesis of normality at the 0.10 level.
RJTEST
Use RJTEST to perform a Ryan-Joiner test, which is a correlation based test.
KSTEST
Use KSTEST to perform a Kolmogorov-Smirnov test, which is a chi-square based test.
You should not use Minitab's outlier tests more than once on the same sample. If you remove an outlier from
your sample and then retest, you risk removing values that are not actually outliers.
BY C...C
Lists the columns that contain the grouping variables (such as a column named Temp that contains the values
Low, Medium, and High). Columns listed with BY may contain numeric, text, or date time data. When you
include the BY subcommand, OUTLIER conducts a separate analysis for each group listed in the BY column
or columns.
Options
GRUBBS
GRUBBS specifies to use Grubbs' test, which is the default test.
The arguments K K specify the specific ratio to test. For example, to perform the standard Dixon's Q test, which
corresponds to a Dixon ratio of r10, the arguments are 1 and 0. The first argument can either be 1 or 2 and the
second argument can be 0, 1, or 2.
DIXON K K
DIXON specifies to use one of the six versions of Dixon's outlier test instead of Grubbs' test.
The arguments K K specify the specific ratio to test. For example, to perform the standard Dixon's Q test, which
corresponds to a Dixon ratio of r10, the arguments are 1 and 0. The first argument can either be 1 or 2 and the
second argument can be 0, 1, or 2.
157
Minitab 18 Statistical Software Basic Statistics
ALPHA K
Specifies the significance level (denoted by α or alpha) for the test as K. The default is 0.05.
ALTERNATIVE K
Enter K to specify the direction of the alternative hypothesis.
Graphs
GOUTLIERPLOT
Displays the outlier plot with a summary of the results, including an individual value plot of the data which
highlights the outlier if one is identified. The outlier plot also includes summary statistics, the test statistic, and
the p-value for the test statistic.
Results
Minitab displays all output tables by default; you do not have to enter the subcommands.
NODEFAULT
If you enter NODEFAULT, then each table is only displayed if you enter TMETHOD, TTEST, or TOUTLIER.
TMETHOD
TMETHOD displays the method table which includes the null hypothesis, the alternative hypothesis, and the
significance level significance level (denoted by α or alpha).
TTEST
TTEST displays the test table which includes the specific test performed, summary statistics for the sample, and
the p-value for the hypothesis test.
TOUTLIER
TOUTLIER displays the value of the outlier if one is identified, and the row in the worksheet that contains the
outlier.
Storage
SINDICATOR C...C
Stores an indicator column for each variable. A one (1) is stored in the row that contains the outlier. A zero (0) is
stored in each of the remaining rows.
158
Minitab 18 Statistical Software Basic Statistics
FREQUENCY C...C
Specifies the frequency column, one for each data set. The length of each column must match the length of
the corresponding data set.
MEAN C
MEAN K...K
Specifies the mean of the Poisson distribution for each data set as K...K or in C. If you specify only one value
for the mean, then this value applies to all data set.
Graphs
GBAR
Displays a bar chart of the observed and expected values.
GCHISQ
Displays a bar chart of each category's contribution to the chi-square value.
PARETO
Use PARETO with GCHISQ to display a bar chart that orders each category's contribution to the chi-square
value from largest to smallest.
Results
RTABLE
Displays a table of the observed values and the expected values and the test results.
159
Minitab 18 Statistical Software Regression
Regression
INDICATOR: Session command for creating indicator
variables
INDICATOR C C...C
Creates indicator variables (also called dummy variables) that you can use in a regression analysis. If you use
REGRESS on page 161, you do not need to create indicator variables.
The smallest number in C2 is 2 and the largest is 6. INDICATOR creates one indicators variable for unique value.
• C11 is the indicator variable for the value 2. C11 contains a 1 in every row where C2 contains a 2, and 0
otherwise.
• C12 is the indicator variable for the value 3. C12 contains a 1 in every row where C2 contains a 3, and 0
otherwise.
• C13 is the indicator variable for 5. C13 contains a 1 in every row where C2 contains 5, and 0 otherwise.
• C14 is the indicator variable for 6. C13 contains a 1 in every row where C2 contains 6, and 0 otherwise.
If C2 contains an * (missing data code), then all indicator variables are also set to *.
The number of storage columns must be equal to the number of distinct values (not including *) in the input
column. Up to 100 storage columns are allowed on INDICATOR.
C1
2
2
5
3
6
5
*
160
Minitab 18 Statistical Software Regression
REGRESS uses least squares to fit a model to one or more continuous or categorical predictors. Optionally, you
can:
• Perform stepwise regression
• Fit the model without an intercept
• Perform weighted regression
• Store the residuals, fitted values, and many other diagnostics for further analysis
• Generate point estimates, and prediction and confidence intervals for predicted values
• Transform non-normal data using the Box-Cox transformation
• Generate several plots for residual analysis. For more information, go to Residual analysis and regression
diagnostics on page 1022.
Options
Specifies information about the variables and terms to include in the model.
RESPONSE C
Specifies the column that contains the response variable. The column must be numeric or date/time.
CONTINUOUS C...C
Specifies the continuous predictors if you have any. The column(s) must be numeric or date/time and must match
the length of the response column.
CATEGORICAL C...C
Specifies the categorical predictors if you have any. The column(s) can be numeric, text, or date/time and must
match the length of the response column.
TERMS termlist
Specifies the model terms. Terms must be legal cross-terms. Only continuous predictors may be repeated. Nested
terms are not allowed. The model can be nonhierarchical.
WEIGHT C
Performs a weighted regression. An n x n matrix W is formed with the column of weights as its diagonal and zeros
elsewhere. The regression coefficients are estimated by:
161
Minitab 18 Statistical Software Regression
−1
(X' W X) (X' W Y)
CONSTANT
When you use CONSTANT, Minitab includes the β0 term (the intercept) in the equation. Thus, Minitab fits the
model:
NOCONSTANT
When you use NOCONSTANT, Minitab omits the β0 term (the intercept) from the equation. Thus, Minitab fits the
model:
Minitab does not print R-squared and adjusted R-squared when NOCONSTANT is in effect because the
interpretation of them is difficult.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
ITYPE K
Specifies the type of confidence interval.
TOLER K
Specifies the tolerance level for collinearity and constant check. By default, K = 4 * 2.22e–016.
SSQUARES
Specifies sequential sum of squares for tests in the ANOVA table. The default is the adjusted sums of squares.
EFFECT
Specifies the effect coding (−1, 0, +1) scheme for categorical predictors.
If you do not specify either EFFECT or BINARY, Minitab uses the preference set in Tools > Options >
LinearModels > Coding of Predictors.
BINARY
Specifies the binary coding (1, 0) scheme for categorical predictors.
If you do not specify either EFFECT or BINARY, Minitab uses the preference set in Tools > Options >
LinearModels > Coding of Predictors.
162
Minitab 18 Statistical Software Regression
REFERENCE C K ... C K
Changes the default coding for the categorical predictor columns. To change the default reference factor level,
specify the factor column followed by the reference level. (You must enclose text and date/time levels in double
quotes.) You can assign a reference level only when you use the binary coding (1, 0) scheme.
If you do not specify LOCATION, SCALE, LEVELS, or UNSTANDARDIZED, Minitab uses the preferences set in Tools >
Options > LinearModels > Coding of Predictors.
LOCATION [K...K]
Specifies that the analysis is to be performed on coded continuous predictors by subtracting a constant from
each predictor. If you do not specify any arguments, the mean of each predictor column is subtracted. K specifies
to subtract a constant. If you specify arguments, the number of arguments must match the number of continuous
predictors.
SCALE [K...K]
Specifies that the analysis is to be performed on coded continuous predictors by dividing each predictor by a
constant. If you do not specify any arguments, each predictor column is divided by the standard deviation. K
specifies to divide by a constant. If you specify arguments, the number of arguments must match the number of
continuous predictors.
LEVELS [K...K]
Specifies that the analysis is to be performed on coded continuous predictors by DOE-type coding for the specified
low and high levels K K&K K. The number of arguments must be twice the number of continuous predictors.
UNSTANDARDIZED
Specifies the analysis is to be performed on the original predictors.
Box-Cox
BOXCOX [K]
Performs a Box-Cox transformation with a specified lambda. K is the value of lambda and must be between −5
and +5. If K is not given, Minitab will find the optimal lambda. By default, Minitab rounds the optimal value.
Minitab cannot calculate the optimal lambda for stepwise regression. Consequently, you must specify a lambda
value for BOXCOX if you use STEPWISE, FORWARD, or BACKWARD.
Stepwise
FINFORMATION, STEPWISE, FORWARD, and BACKWARD perform a stepwise regression procedure to fit the model. No
arguments are needed for these subcommands.
FINFORMATION
Specifies a stepwise model selection procedure that uses forward information criteria selection. Use AICCORRECTED
or BICRITERION to specify which information criterion to use to select the final model. If you do not specify a
criterion, Minitab uses AICCORRECTED.
163
Minitab 18 Statistical Software Regression
The forward information criteria procedure adds the term with the lowest p-value to the model at each step. If
you do not include subcommands about hierarchy, FINFORMATION adds multiple terms at a step to maintain
model hierarchy, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
With these settings, additional terms can enter the model in 1 step. Minitab calculates the information criteria for
each step.
Once Minitab fits the full model or a model that leaves 1 degree of freedom for error, the procedure stops. Minitab
displays the results of the analysis for the model with the minimum value of the selected information criterion,
either the corrected Akaike's Information Criterion (AICc) or the Bayesian Information Criterion (BIC).
AICCORRECTED
Specifies the use of the corrected Akaike's Information Criterion (AICc) to select the final model.
BICRITERION
Specifies the use of the Bayesian Information Criterion (BIC) to select the final model.
STEPWISE
Specifies a stepwise model selection procedure that uses both forward selection and backward elimination. If you
do not include subcommands about hierarchy, STEPWISE and FORWARD add multiple terms at a step to maintain
model hierarchy, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
FORWARD
Specifies a stepwise model selection procedure that uses forward selection. If you do not include subcommands
about hierarchy, STEPWISE and FORWARD add multiple terms at a step to maintain model hierarchy, the equivalent
of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
BACKWARD
Specifies a stepwise model selection procedure that uses backward elimination. Removes a single term at each
step and maintains a hierarchical model, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS.
AENTER K
Specifies the alpha level at which a term is entered into the model. The default is 0.15 for STEPWISE and 0.25
for FORWARD.
AREMOVE K
Specifies the alpha level at which a term is removed from the model. The default is 0.15 for STEPWISE and
0.10 for BACKWARD. For STEPWISE, K must be greater than or equal to K for AENTER.
ENTER termlist
Specifies the terms that are contained in the starting model for STEPWISE. The ENTER termlist must be a
subset of the TERMS termlist or in the default term list in the design.
FORCE termlist
Specifies the terms to be forced in the model. The FORCE termlist must be a subset of the TERMS termlist
or in the default term list in the design.
NOHIERARCHICAL
Specifies that the model selection procedure does not consider hierarchy.
HIERARCHICAL
Maintains a hierarchical model in stepwise regression. In a hierarchical model, if a higher-order term is
included, all lower-order terms that comprise the higher-order term also appear in the model. For example,
164
Minitab 18 Statistical Software Regression
a model that includes the interaction term A*B*C is hierarchical if it includes the following main effects and
lower-order interactions: A, B, C, A*B, A*C, and B*C.
CATONLY
Specifies that only the categorical terms in the model have to be hierarchical.
ALLTERMS
Specifies that both categorical and continuous terms have to be hierarchical.
ATEND
Specifies that the final step of the stepwise procedure adds terms to make the model hierarchical.
ALWAYS
Specifies that the model is hierarchical at every step.
SINGLE
Specifies that only one term can enter the model at each step. So a higher-order term can enter
the model only if the terms that comprise the term are already in the model. For example, the
algorithm does not consider the addition of A*B unless A and B are already in the model.
BACKWARDS does not use SINGLE or MULTIPLE because terms only exit the model.
MULTIPLE
Specifies that multiple terms can enter the model at each step. So a higher order term can enter
the model, and the terms that comprise the term enter the model at the same time. For example,
if A*B is the most statistically significant term, A*B enters the model. At the same time, A and B
enter the model if those terms are not in the model already.
BACKWARDS does not use SINGLE or MULTIPLE because terms only exit the model.
Graphs
RTYPE K
Specifies the type of residual to plot with the graph subcommands.
GHISTOGRAM
Displays a histogram or individual value plot of the residuals, depending on the sample size.
GNORMAL
Displays a normal probability plot of the residuals.
GFITS
Plots the residuals versus the fitted values.
165
Minitab 18 Statistical Software Regression
GORDER
Plots the residuals versus the order of the data. The row number for each data point is shown on the x-axis ( for
example, 1 2 3 4... n).
GFOURPACK
Displays a layout of a histogram of the residuals, a normal probability plot of the residuals, residuals vs fitted
values, and residuals vs order of the data.
GVARIABLE
Displays a separate graph for the residuals versus each specified column.
Results
NODEFAULT
Specifies that no default tables or graphs will be displayed
TBASIC
Displays the tables for the Minitab 16 version of REGRESS.
TMETHOD
Displays the method table.
TMSDETAILS
Displays the type of stepwise procedure and the alpha values to enter and/or remove a predictor from the model.
Use FULL to display the coefficients, p-values, Mallows' Cp, and model summary statistics for each step of the
procedure. Use NOFULL to hide these statistics. If you do not specify FULL or NOFULL, Minitab uses the preferences
set in Tools > Options > Linear Models > Stepwise.
TEQUATION
Displays the regression equation table. Minitab will display up to 50 equations. If you want to see a single equation,
rather than a separate equation for each factor level combination, use SINGLE. To see the separate equations, use
SEPARATE. If you do not specify SINGLE or SEPARATE, Minitab uses the preferences set in Tools > Options >
Linear Models > Display of Results.
TCOEFFICIENTS
Displays the table of coefficients. Use FULL to display the full set of coefficients for categorical predictors. Use
NOFULL to show only the linearly independent coefficients. If you do not specify FULL or NOFULL, Minitab uses
the preferences set in Tools > Options > Linear Models > Display of Results.
TSUMMARY
Displays the summary of model table.
TANOVA
Displays the ANOVA table.
TDIAGNOSTICS
Displays a table of diagnostics. K = 0 displays diagnostics for only unusual observations. K = 1 displays diagnostics
for all observations. If you do not specify K, Minitab uses the preference set in Tools > Options > Linear Models >
Display of Results.
TDW
Displays Durbin-Watson statistics.
166
Minitab 18 Statistical Software Regression
TSIMPLE
Displays the simple versions of the ANOVA table, table of coefficients, model summary table, and table of unusual
observations.
TEXPAND
Displays the expanded version of the ANOVA table, table of coefficients, model summary table, and table of
unusual observations.
BCRESP C
Stores the Box-Cox transformation of the response in C.
BFITS
Stores the fits for the original response.
RESIDUALS C
Stores the residuals (fitted values – observed values).
SRESIDUALS C
Stores the standardized residuals.
TRESIDUALS C
Stores the deleted Studentized residuals.
HI C
Stores the leverages.
COOK C
Stores Cook's distance.
DFITS C
Stores the DFITS.
SDW C
Stores the Durbin-Watson statistic.
COEFFICIENTS C
Stores the estimated coefficients.
FITS C
Stores the fitted values, often called the Y-hats ( ).
MSE K
Stores the mean square error.
167
Minitab 18 Statistical Software Regression
SPVALUE C
Stores the p-values for each predictor.
SVIF C
Stores the VIFs for each predictor.
SS C
Stores the standard deviation of the error term.
SRSQ C
Stores the R-squared for the model.
SRSADJ C
Stores the adjusted r-squared for the model.
SPRESS C
Stores the predicted r-squared for the model.
XMATRIX M
Stores the design matrix for regression model.
XPXINV M
Stores a p x p matrix, inverse of X'X. This matrix, when multiplied by MSE is the variance-covariance matrix of the
coefficients. If the WEIGHTS subcommand is used, then XPXINV stores the inverse of the X'WX.
RMATRIX M
Stores an R matrix of the QR or Cholesky decomposition. The n x p design matrix X can be written as X = QR,
where Q is an n x p orthogonal matrix (that is, Q' Q = I, where I is the p x p identity matrix) and R is a p x p upper
triangular matrix.
Suppose you specify m predictors. BREG first looks at all one-predictor regression models, selects the model with
the largest R-squared, and displays information on this model and the next best one-predictor model. Then BREG
looks at all two-predictor models, selects the model with the largest R-squared, and displays information on this
and the next best one. The process continues until all m predictors are used.
BREG is an efficient way to select a group of "best subsets" for further analysis by selecting the smallest subset
that fulfills certain statistical criteria. The subset model may actually estimate the regression coefficients and
predict future responses with smaller variance than the full model using all predictors.
INCLUDE C...C
Includes the predictors specified in C...C in all models. Only columns that were specified with the BREG
command can be specified in INCLUDE.
168
Minitab 18 Statistical Software Regression
NVARS K [K]
By default, displays the best one-predictor models, the best two-predictor models, on up to the best
m-predictor models. If you specify, for example, NVARS 5 12, then only the best 5-, 6-, ..., 12-predictor
models are displayed.
Note NVARS does not count the predictors given in INCLUDE. Thus, INCLUDE C1–C3 with NVARS 2 6, displays models
with 3 + 2 = 5 to 3 + 6 = 9 predictors.
BEST K
Displays information from the "best" K models of each size, if there are that many. K can be from 1 to 5. The
default is 2.
NOCONSTANT
When you use NOCONSTANT, Minitab omits the b 0 term (the intercept) from the equation. Thus, Minitab
fits the model:
When NOCONSTANT is specified, Minitab does not display R-squared and adjusted R-squared, since their
interpretation is difficult.
You can also use NOCONSTANT as a main command. In that case, it applies to all BREG, REGRESS, and
STEPWISE commands that follow.
CONSTANT
When you use CONSTANT, Minitab includes the b 0 term (the intercept) in the equation. Thus, Minitab fits
the model:
You can also use CONSTANT as a main command. In that case, it applies to all BREG, REGRESS, and STEPWISE
commands that follow.
NOWARN
When you specify more than 14 free variables with BREG, Minitab displays a prompt that asks whether you
want to continue with BREG computations even though it will take a long time. Use NOWARN if you want
to suppress this warning prompt.
TEXPAND
Displays the expanded table that includes PRESS, AICc, BIC, and condition number. You can also set this
option in Tools > Options.
169
Minitab 18 Statistical Software Regression
Polynomial regression is one method for modeling curvature in the relationship between a response variable (Y)
and a predictor variable (X). Polynomial modeling techniques try to account for the curvature by extending the
simple linear regression model to include higher powers of X - such as X-squared - as predictors.
Use the POLY subcommand to specify the order of the polynomial you want to fit. If you have not transformed
the X or Y variables, you can fit the following models with FITLINE:
You can generate additional models by using the log10 of X and/or Y for linear, quadratic, and cubic models. These
models provide another way of modeling curvature. In addition, taking the log10 of Y can reduce right-skewness
and some forms of heteroskedasticity, such as unequal variances.
RTYPE K
Specifies the type of residual to plot with the graph subcommands.
GHISTOGRAM
Displays a histogram of the residuals.
GNORMAL
Displays a normal probability plot of the residuals.
GFITS
Plots the residuals versus the fitted values.
GORDER
Plots the residuals versus the order of the data. The row number for each data point is shown on the x-axis
(for example, 1 2 3 4 ... n).
GFOURPACK
Displays a layout of a histogram of the residuals, a normal probability plot of the residuals, residuals vs fitted
values, and residuals vs order of the data.
GVARIABLE C...C
Displays a separate graph for the residuals versus each specified column.
Options
POLY K
Specifies the order of the polynomial model you want to fit and plot. K is an integer from 1 to 3. The default is 1.
LOGY
Uses log10 Y as the response variable.
170
Minitab 18 Statistical Software Regression
LOGX
Uses log10X as the predictor variable. If LOGX is used with polynomials of order greater than one, then the
polynomial regression will be based on powers of the log10X.
YSCALE
Plots the transformed response and predictor variables on a log scale. FITLINE ignores YSCALE if you do not use
LOGY.
XSCALE
Plots the transformed response and predictor variables on a log scale. FITLINE ignores XSCALE if you do not use
LOGX.
CI
Displays confidence bands about the fitted regression line.
PI
Displays prediction bands about the fitted regression line.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
Storage
RESIDUALS C
Stores the residuals in C. If you specified LOGY, Minitab stores the log-transformed residuals. The residual for the
i th log-transformed response is:
ei = (log10Yi – log10 i)
FITS C
Stores the fitted values, often called the Y-hats ( ), in C. If you specified LOGY, Minitab stores the log-transformed
fits (log10 ) .
COEFFICIENTS C
Stores the estimated coefficients in C.
BRESIDUALS C
Stores in C the residuals of the transformed response in the original scale of the data. This subcommand is only
available if you used LOGY.
BFITS C
Stores in C the fitted values of the transformed response in the original scale of the data. This subcommand is
only available if you used LOGY.
GSAVE "file_name"
GSAVE K
Saves the graph in a file.
The default file name is Minitab.MGF. You can specify a custom file name in double quotation marks ("file_name"),
or as a stored text constant (K). You can also use any of the following subcommands to save the graph in a different
graphics format.
171
Minitab 18 Statistical Software Regression
Some graph commands—for example, HISTOGRAM C1 C2 C3—generate more than one graph. If you include
the GSAVE subcommand with such a command, Minitab saves multiple files. Minitab gives each file a different
file name. Minitab uses the first five characters of the name you specify, then appends a number (001, 002, and
so on), for up to 500 files.
If you try to overwrite an existing file using GSAVE, Minitab displays a message. The message asks whether you
want to replace the existing file. If you use GSAVE with no file name for multiple graphs, Minitab displays the
message only for the first graph. Then, Minitab replaces the other graphs automatically. You can use REPLACE or
NOREPLACE to bypass the message. Bypassing the message is especially useful in a macro. After you save the
file, you can view the graph with GVIEW.
REPLACE
Bypasses the message that asks whether you want to replace the existing file. If you use both REPLACE and
NOREPLACE, Minitab uses the last subcommand.
NOREPLACE
Bypasses the message that asks whether you want to replace the existing file. If a file with the same name
exists, Minitab displays an error and stops the command or quits the macro. If you use both REPLACE and
NOREPLACE, Minitab defaults to the last subcommand.
JPEG
JPEG color
PNGB
PNG black and white
PNGC
PNG color
PNGH
PNG high color
TIFB
TIF black and white
TIF
TIF color
BMPB
BMP black and white
BMPC
BMP color
BMPH
BMP high color
GIF
GIF
EMF
EMF
RESOLUTION K
Saves the graph at a resolution of K dots per inch.
172
Minitab 18 Statistical Software Regression
TITLE "title"
Specifies a title for the graph. If you do not specify a title, Minitab uses a default title.
SSWORKSHEET K K K
Creates a stability study worksheet with the following parameters (in the following order):
• The number of times as K
• The number of batches as K
• The number of replicates per batch at each time as K
TIME C
TIME K...K
Optional subcommand TIME specifies the test times as values from column C or as constants K...K.
SSWORKSHEET K K
Creates a stability study worksheet with the following parameters (in the following order):
• The number of batches as K
• The number of replicates per batch at each time as K
Options
BNAME C
BNAME K...K
Specifies a name for each batch. The default batch names are the text values "1", "2", "3", ... .
TSUMMARY
Displays a summary of the design in the Session window that includes the number of sampling times, the number
of batches, the number of samples per batch at each time, and the total number of runs.
SORDER C
Stores the standard order of the runs in column C.
RORDER C
Stores the run order in column C.
173
Minitab 18 Statistical Software Regression
XMATRIX C C
Stores the sampling times for each run in the first column C and the batch names in the second column C.
Randomization
Use the following commands to control how the runs are randomized in the worksheet. If you do not use any of these
subcommands, then the runs are not randomized, so the run order is the same as the standard order.
To generate the same random order, you can optionally set the base as K, where K is an integer that is greater than
0.
BRANDOMIZE [K]
BRANDOMIZE specifies to randomize the order of the batches at each test time, but to keep all repeats from one
batch together before switching to the next batch.
NRANDOMIZE
NRANDOMIZE specifies to sample each batch in sequential order and to take all repeats from one batch before
switching to the next batch.
Options
RESPONSE C
Specifies the column that contains the response variable. The column must be numeric or date/time.
TIME C (required)
Specifies the time variable. The column must be numeric or date/time and must match the length of the response
column.
BATCH C
Specifies the categorical batch factor, if you have one. The column can be numeric, text, or date/time and must
match the length of the response column.
174
Minitab 18 Statistical Software Regression
RANDOM
Specifies that BATCH is a random factor. If BATCH is not issued, RANDOM is ignored. For random batches, Minitab
uses an iterative algorithm to estimate the variance components and to select the model. There can be cases
where the variance components cannot be estimated and no further analysis is possible.
MAXITER K
Specifies the maximum number of iterations. K must be a nonnegative integer.
STARTING K K K
Specifies the starting estimates for the variance components. If you do not use STARTING, Minitab uses the
minimum norm quadratic unbiased estimation (MINQUE) estimates. The MINQUE estimates are typically
good estimates.
CTOLERANCE K
Specifies the convergence tolerance value for object function. K must be greater than 0. If this subsubcommand
is not issued, Minitab uses the value 1E-7.
ETOLERANCE K
Specifies the convergence tolerance value for estimates. K must be greater than 0. If this subsubcommand
is not issued, Minitab uses the value 1E-7.
LSPEC K
Specifies the lower specification limit. You must use LSPEC, USPEC, or both. If both LSPEC and USPEC are issued,
USPEC must be greater than LSPEC. K must be numeric.
USPEC K
Specifies the upper specification limit. You must use LSPEC, USPEC, or both. If both LSPEC and USPEC are issued,
USPEC must be greater than LSPEC. K must be numeric.
BPERCENT K
Specifies using K percent of the response above the lower spec or below the upper spec to estimate shelflife. K
must be between 0 and 100. Minitab uses 50 percent if BPERCENT is not issued.
PVALUE K
Specifies the p-value used for model selection. K must be between 0 and 1. Minitab uses 0.25 if PVALUE is not
issued.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
Box-Cox
BOXCOX [K]
Performs a Box-Cox transformation with a selected lambda. K is the value of lambda and must be between −5
and +5. If K is not given and you have a fixed batch, Minitab will find the optimal lambda. By default, Minitab
rounds the optimal value.
Minitab cannot calculate the optimal lambda when batch is a random factor. Consequently, you must specify a
lambda value for BOXCOX if you use RANDOM.
175
Minitab 18 Statistical Software Regression
Graphs
GSHELFLIFE
Displays the shelf life plot. Use the subsubcommands to control how the batches are displayed.
INDIVIDUAL
Displays a graph for each individual batch.
ALL [K]
Displays all batches on one graph. If you specify K, each graph displays up to K batches.
RTYPE K
Specifies the type of residual to plot with the graph subcommands in K. If MARGINAL is issued, K must be 1 or 2.
MARGINAL
Displays marginal residuals on the residual plots. If MARGINAL is not issued, the residual plots display
conditional residuals for random batches.
GHISTOGRAM
Displays a histogram or individual value plot of the residuals, depending on the sample size.
GNORMAL
Displays a normal probability plot of the residuals.
GFITS
Plots the residuals versus the fitted values.
GORDER
Plots the residuals versus the order of the data. The row number for each data point is shown on the x-axis (for
example, 1 2 3 4... n).
GVARIABLE C...C
Displays a separate graph for the residuals versus each specified column.
GFOURPACK
Displays a layout that includes a histogram of the residuals, a normal probability plot of the residuals, residuals
vs fitted values, and residuals vs the order of the data.
Results
Displays a variety of tables in the Session window output. The availability of some tables depends on whether BATCH
is a fixed factor or a random factor.
NODEFAULT
Specifies that no default tables and graphs will be displayed.
TMETHOD
Displays the method table.
176
Minitab 18 Statistical Software Regression
TFACTOR
Displays the name, number of levels, and the values for the batch factor in your model.
TITERATION
Displays the estimation iteration history table when batch is a random factor.
TVARIANCE
Displays the variance component table when batch is a random factor.
TCOVARIANCE
Displays the asymptotic variance covariance matrix of variance estimates when batch is a random factor.
TMSELECTION
Displays the model selection results, including the terms that are removed from the final model.
TANOVA
Displays the ANOVA table for a fixed batch.
TSUMMARY
Displays the summary of model table.
TCOEFFICIENTS
Displays the table of coefficients. Use FULL to display the full set of coefficients for the batch factor. Use NOFULL
to show only the linearly independent coefficients. If you do not specify FULL or NOFULL, Minitab uses the
preferences set in Tools > Options > Linear Models > Display of Results.
FULL
Specifies to display the full set of coefficients for the batch factor
NOFULL
Specifies to not display the full set of coefficients for the batch factor
TRANDOM
Displays the random effect prediction table when batch is a random factor.
TEQUATION
Displays the regression equation table, or the marginal fitted equation table if batch is a random factor.
TDIAGNOSTICS [K]
Displays a table of fits and diagnostics. K = 0 displays diagnostics for only unusual observations. K = 1 displays
diagnostics for all observations. If you do not specify K, Minitab uses the preference set in Tools > Options >
Linear Models > Display of Results.
TCONDITIONAL [K]
Displays the conditional fits and residuals when batch is a random factor. K = 0 displays diagnostics for only
unusual observations. K = 1 displays diagnostics for all observations. If you do not specify K, Minitab uses K = 0.
TSHELFLIFE
Displays the shelf life table.
TSIMPLE
Displays the simple versions of the ANOVA table, table of coefficients, model summary table, and table of unusual
observations.
177
Minitab 18 Statistical Software Regression
TEXPAND
Displays the expanded version of the ANOVA table, table of coefficients, model summary table, and table of
unusual observations.
Storage
Use to store analysis results in the specified column or matrix. The availability and function of the storage commands
depends on whether BATCH is a fixed factor or a random factor.
RESIDUALS C
Stores the residuals (fitted values – observed values) if batch is a fixed factor. Marginal residuals (marginal fitted
values – observed values) if batch is a random factor.
SRESIDUALS C
Stores the standardized residuals if batch is a fixed factor. Standardized marginal residuals if batch is a random
factor.
TRESIDUALS C
Stores the deleted Studentized residuals of the fit if batch is a fixed factor. If batch is a random factor, stores the
studentized marginal residuals.
CRESIDUALS C
Stores the conditional residuals when batch is a random factor.
CSRESIDUALS C
Stores the conditional standardized residuals when batch is a random factor.
FITS C
Stores the fitted values if batch is a fixed factor. Marginal fitted values if batch is a random factor.
CFITS C
Stores the conditional fitted values when batch is a random factor.
HI C
Stores the leverages.
COOK C
Stores Cook's distance.
DFITS C
Stores the DFITS.
COEFFICIENTS C
Stores the estimated coefficients.
BLUP C
Stores the best linear unbiased predictor when batch is a random factor.
XMATRIX M
Stores the design matrix for fixed effects terms.
ZMATRIX M
Stores the design matrix for random effects terms.
178
Minitab 18 Statistical Software Regression
COVARIANCE M
Stores the variance-covariance matrix of the variance component estimates if batch is a random factor.
FCOVARIANCE M
Stores the covariance matrix of fixed effect estimates.
Use nonlinear regression to mathematically describe the nonlinear relationship between a response variable and
one or more predictor variables. Specifically, use nonlinear regression instead of ordinary least squares regression
when you cannot adequately model the relationship with linear parameters. Parameters are linear when each
term in the model is additive and contains only one parameter that multiplies the term. Use this procedure for
fitting models that are nonlinear in the parameters, storing regression statistics, examining residual diagnostics,
generating point estimates, and generating prediction and confidence intervals.
Required subcommands
RESPONSE C
Specifies the response column. The column cannot be a text column.
CONTINUOUS C...C
Specifies one or more predictor columns. The columns cannot be text columns, and they must have the same
number of rows as the response column.
The parameter name must be followed by one or more starting values for the parameter. Minitab does not allow
missing values.
If you give a parameter more than one starting value, Minitab evaluates the residual sum of squares (SSE) at all
combinations, and uses the combination with the smallest value of the SSE.
EXPECTATION expression
Specifies the expectation function. The expression must use all of the parameters and predictors. All columns you
use in the expression must be predictor columns.
If a parameter name looks like a variable name, Minitab interprets it as a variable name. To have Minitab interpret
it as a name, you must put quotes around it. For example, a parameter you named k1 must be referred to as 'k1'.
179
Minitab 18 Statistical Software Regression
Options
LOCK parameters
Locks one or more parameters at their starting values. If you give a locked parameter more than one starting
value, the first value is used. You must leave at least one parameter unlocked. For example, LOCK "b1", locks the
parameter b1.
WEIGHT C
Specifies weights for weighted regression in C. Weights must be nonnegative. Rows with zero or missing weight
are omitted. Note that there is no provision for these weights to change from one iteration to the next.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
ITYPE K
Specifies the type of confidence interval.
CONSTRAINT constraint
Specifies a constraint on a parameter. Repeat CONSTRAINT to specify multiple constraints. Each parameter can
appear one time on one CONSTRAINT subcommand. For example, CONSTRAINT 1200 < 'b1' < 1400
constrains the fitted value of parameter b1 to between 1200 and 1400.
MARQUARDT
Specifies the Levenberg-Marquardt algorithm rather than the default Gauss-Newton algorithm. Use this
subcommand if the Gauss-Newton algorithm fails to converge.
TOLERANCE K [K]
−5
K is the tolerance level for convergence, and it must be a positive number. The default value is 10 .
The convergence criterion is the relative offset orthogonality convergence criterion described in Bates and Watts
(1981).
ITERATIONS K
Specifies the maximum number of iterations used in the optimization algorithm. K must be a positive integer. If
you do not specify ITERATIONS, the default value is 200.
Predict
PCONTINUOUS E..E
PCONTINUOUS also computes the standard errors of the fitted values, 95% confidence intervals, and 95% prediction
intervals. The number of arguments must equal the number of predictors in the model. If you include columns,
they must have the same number of rows. Minitab assigns predictors in the same order as they appear on the
CONTINUOUS subcommand.
If you omit PCONTINUOUS and include any of PFITS, PSEFITS, CLIMITS, or PLIMITS, then those subcommands are
ignored.
180
Minitab 18 Statistical Software Regression
The prediction interval computed by PREDICT assumes a weight of 1. If you used the WEIGHT subcommand with
values other than 1, you should adjust the prediction interval values manually.
PFITS C
Stores the predicted values in C.
PSEFITS C
Stores the standard errors of the predicted values in C.
CLIMITS C C
Stores the upper and lower limits of the confidence intervals in C C. If you specify -1 or 1 with ITYPE then only
one argument is allowed.
PLIMITS C C
Stores the upper and lower limits of the prediction intervals in C C. If you specify −1 or 1 with ITYPE then only
one argument is allowed.
Tables
TMETHOD
Displays a table of information about the method and options. Includes the type of algorithm used, the maximum
number of iterations, and the tolerance level for convergence.
TSTARTING
Displays the parameters' starting values.
TCONSTRAINTS
Displays a table of constraints for the parameters.
TITERATIONS
Displays the parameter estimates, and the residual sum of squares (SSE) at each iteration.
TEQUATION
Displays the regression equation.
TPARAMETERS
Displays the parameter estimates and their approximate standard errors.
CI
Adds a confidence interval for each parameter in the parameter estimates table.
TCORRELATION
Displays the correlation matrix for the parameter estimates.
TSUMMARY
Displays a test for lack of fit, and a summary of the fits that includes the number of iterations, SSE, the degrees
of freedom for error, MSE, and S.
TPREDICTIONS
Displays a table of fitted values, confidence intervals, and prediction intervals for the new observations specified
by PCONTINUOUS.
NODEFAULT
Suppresses the display of tables and graphs other than those specifically requested.
181
Minitab 18 Statistical Software Regression
Graphs
GHISTOGRAM
Displays a histogram of the residuals.
GNORMAL
Displays a normal probability plot of the residuals.
GFITS
Plots the residuals versus the fitted values.
GFOURPACK
Displays a layout of a histogram of the residuals, a normal probability plot of the residuals, residuals vs fitted
values, and residuals vs order of the data.
GORDER
Plots the residuals versus the order of the data. The row number for each data point is shown on the x-axis ( for
example, 1 2 3 4... n).
GVARIABLE C...C
Displays a separate graph for the residuals versus each specified column.
GFCURVE
Displays a fitted curve plot. Minitab ignores the subcommand if there is more than one predictor.
GFCI
Overlays the confidence interval bands.
GFPI
Overlays the prediction interval bands.
Storage
RESIDUALS C
Stores the residuals (fitted values – observed values).
FITS C
Stores the fitted values, often called the Y-hats ( ).
SPARAMETERS C
Stores the estimated parameters.
SSEPARAMETERS C
Stores the standard error of each parameter.
SGRID C...C
Stores each starting value combination and the corresponding initial sum of the squared residuals (SSE). Minitab
performs the nonlinear regression analysis using the starting value combination that produces the smallest initial
SSE.
182
Minitab 18 Statistical Software Regression
OREG uses orthogonal regression to fit a model to one predictor. Optionally, you can do the following:
• Store the residuals, fitted values, and variance estimates
• Generate predicted values for new observations
• Control display of results
• Generate several plots for residual analysis. For more information, go to Residual analysis and regression
diagnostics on page 1022.
VARRATIO C
Specifies the error variance ratio (Y/X). K must be greater than 0.
Graphs
RTYPE K
Specifies the type of residual to plot with the graph subcommands in K.
GHISTOGRAM
Displays a histogram of the residuals.
GNORMAL
Displays a normal probability plot of the residuals.
GFITS
Plots the residuals versus the fitted values.
GFOURPACK
Displays a layout of a histogram of the residuals, a normal probability plot of the residuals, residuals vs fitted
values, and residuals vs order of the data.
GORDER
Plots the residuals versus the order of the data. The row number for each data point is shown on the x-axis ( for
example, 1 2 3 4... n).
GVARIABLE C...C
Displays a separate graph for the residuals versus each specified column.
GFLINE
Displays a fitted line plot of the original data.
183
Minitab 18 Statistical Software Regression
LSFIT
Displays the least squares fitted line on the fitted line plot. When you use LSFIT, both the orthogonal and the least
squares regression equations are displayed on the graph.
Options
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
PREDICT K
PREDICT C
Specifies the value of the predictor X. You can enter a constant or a column of values.
SPREDICT C
Stores the predicted values in the specified column.
SSTDEV C
Stores the standard deviations of the predicted values in the specified column.
Results
REVARRATIO
Displays the error variance ratio.
REQUATION
Displays the orthogonal regression equation.
RCOEFFICIENT
Displays the coefficient table.
RVARCOMP
Displays the error variance estimates.
RFITRESID
Displays the fitted values for the true predictor and true response as well as the residuals.
Storage
SRESIDUALS C
Stores the residuals in the specified column.
SSRESIDUALS C
Stores the standardized residuals in the specified column.
SCOEFFICIENT C
Stores the intercept and slope in the specified column.
SVARIANCE C
Stores the error variances for the predictor and response in the specified column.
184
Minitab 18 Statistical Software Regression
SXFIT C
Stores the fitted values of the predictor.
SYFIT C
Stores the fitted values of the response.
CONTINUOUS C...C
Specifies which columns of variables are continuous. Columns must contain numerical or date/time data.
CATEGORICAL C...C
Specifies which, if any, columns of variables are categorical. Columns may be numerical, text, or date/time.
NCOMP K
Sets the maximum number of components to extract or cross-validate, which cannot exceed the number of
predictors in your model or the number of observations minus one. Minitab extracts 10 or cross-validates
10 components by default, unless the number of predictors or the number of observations minus 1 is less
than 10.
Options
XVALIDATION K
XVALIDATION C
XVALIDATION estimates your model's predictive ability by recalculating your model, leaving 1 or more observations
out each time.
Use K to specify the number of observations to leave out each time the model is recalculated. Specifying 1 means
that the model is recalculated as many times as there are observations.
Use C as a group identifier to indicate which observations are deleted together each time the model is recalculated.
Observations with identical numbers in C are removed at the same time. The column must contain positive integers
and equal the length of the predictor and response columns.
CODING K
CODING specifies the type of coding to use for categorical predictors.
• K = −1 for (−1, 0, +1) coding
• K = 1 for (1, 0) coding
185
Minitab 18 Statistical Software Regression
REFERENCE C K...C K
REFERENCE changes the default coding for the categorical predictor columns. To change the default reference
level, specify the categorical predictor column followed by the reference level. (You must enclose text and
date/time levels in double quotes.) You can assign a reference level only when you use 1, 0 coding.
Prediction
Computes the fitted Ys, or for new observations using your PLS model.
PCONTINUOUS E...E
Use PCONTINUOUS for new continuous predictors.
PCONTINUOUS displays a table that contains the fitted Y's, standard errors of the fitted Y's, a 95% confidence
interval, and a 95% prediction interval. E...E may be a list of constants or a list of columns, or a mixture of constants
and columns. The number of predictors must equal the number of predictors in your PLS model.
PCATEGORICAL E...E
Use PCATEGORICAL for new categorical predictors.
PCATEGORICAL displays a table that contains the fitted Y's, standard errors of the fitted Y's, a 95% confidence
interval, and a 95% prediction interval. E...E may be a list of constants or a list of columns, or a mixture of constants
and columns. The number of predictors must equal the number of predictors in your PLS model.
RESPONSE C...C
Specifies response values for your new observations. Minitab calculates a test R2 that indicates how well the model
fits new observations.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
PFITS C...C
Stores the fits from PCONTINUOUS and PCATEGORICAL.
PSEFITS C...C
Stores the estimated standard errors of the fits from PCONTINUOUS and PCATEGORICAL.
CLIMITS C, C...C, C
Stores the lower and upper confidence limits from PCONTINUOUS and PCATEGORICAL.
PLIMITS C, C...C, C
Stores the lower and upper prediction limits from PCONTINUOUS and PCATEGORICAL.
FITS C...C
Stores the fitted values, often called the Y-hats ( ).
CVFITS C...C
Stores the cross-validated fitted values.
186
Minitab 18 Statistical Software Regression
RESIDUALS C...C
Stores the residuals (fitted values – observed values).
PRESIDUALS C...C
Stores the cross-validated residuals.
SRESIDUALS C...C
Stores the standardized residuals.
COEFFICIENTS C...C
Stores the estimated coefficients, one stored column for each response.
SCOEFFICIENTS C...C
Stores the standardized coefficients, one stored column for each response.
HI C
Stores the severage values.
XDISTANCE C
Stores the distances from the x-model.
YDISTANCE C
Stores the distances from the y-model.
XSCORES M
Stores the X-scores.
YSCORES M
Stores the Y-scores.
XLOADINGS M
Stores the X-loadings.
YLOADINGS M
Stores the Y-loadings.
XWEIGHTS M
Stores the X-weights.
XRESIDUALS M
Stores the X-residuals.
YRESIDUALS C...C
Stores the Y-residuals, one stored column for each response.
XCALCULATED M
Stores the X-calculated values.
187
Minitab 18 Statistical Software Regression
YCALCULATED C...C
Stores the Y-calculated values, one stored column for each response.
GSELECTIONPLOT
Displays a scatterplot of R2 and predicted R2 values vs the number of components
GFIT
Displays a scatterplot of fitted and cross-validated responses vs observed responses
GFCOEFFICIENT
Displays a projected scatterplot of the coefficients
GCCOEFFICIENT
Displays a projected scatterplot of the standardized coefficients
GDISTANCE
Displays a scatterplot of each observation's distance from the x-model and the y-model
GHISTOGRAM
Displays a histogram of the standardized residuals
GNORMAL
Displays a normal probability plot of the standardized residuals
GRESIDUALS
Displays a scatterplot of residuals vs fitted values
GLEVERAGE
Displays a scatterplot of standardized residuals vs leverages
GFOURPACK
Displays a layout of a histogram of the standardized residuals, a normal probability plot of the standardized
residuals, standardized residuals vs fitted values, and standardized residuals vs order of the data.
GSCORE
Displays a plot of the x-scores of the first component versus the x-scores of the second component
GTHREEDPLOT
Displays a three-dimensional plot of the x-scores of the first component, second and third components
GLOADING
Displays a plot of the x-loadings of the first component vs the x-loadings of the second component
GXRESIDUALS
Displays a line plot of the x-residual matrix
188
Minitab 18 Statistical Software Regression
GXCALCULATED
Displays a line plot of the x-calculated matrix.
Results
TMETHOD
Displays the number of components and analysis of variance table.
TANOVA
Displays the analysis of variance table.
TSELECTION
Displays the model selection and validation table.
TCOEFFICIENTS
Displays the unstandardized and standardized coefficients.
TFITS
Displays the table of fitted values and residuals.
TLEVERAGES
Displays the leverages and distances from the x- and y-model.
TPREDICTION
Displays the prediction table.
TXSCORES
Displays the x-score matrix.
TYSCORES
Displays the y-score matrix.
TXLOADINGS
Displays the x-loading matrix.
TYLOADINGS
Displays the y-loading matrix.
TXRESIDUALS
Displays the x-residual matrix.
TYRESIDUALS
Displays the y-residual matrix.
TXCALCULATED
Displays the x-calculated matrix.
TYCALCULATED
Displays the y-calculated matrix.
189
Minitab 18 Statistical Software Regression
The predictors can be either factors (categorical predictors) or covariates (continuous predictors). Factors can be
crossed. Covariates can be crossed with each other or with factors. For more information, go to How to specify
the model for GLZM, OLOGISTIC and NLOGISTIC on page 1008.
Factor columns can be numeric or text. For a numeric factor, Minitab designates the lowest numeric value as the
reference level. For a text factor, Minitab determines the reference level alphabetically. For an example, go to
Entering data for factor variables on page 985.
When the response variable column is binary, GZLM defines the highest value as the reference event. When the
response variable column is text, GZLM defines the event by reverse alphabetical order. For example, if you enter
the response variable as success and failure, GZLM defines success as the event. For examples and information
on entering the response data, go to Entering data for response variables on page 986.
GZLM provides diagnostic plots, goodness-of-fit tests, and other diagnostic measures so you can assess the
validity of your model. For more information, go to Regression diagnostics and residual analysis on page 1022.
Minitab excludes all observations with missing values on either the response variable or any of the predictors
from all calculations.
BINOMIAL
Analyzes the relationship between a binary response variable that you specify in RESPONSE and the predictors
that you with CONTINUOUS and CATEGORICAL. You specify the model with TERMLIST.
LOGIT
Use the logit link function.
NORMIT
Use the normit link function.
GOMPIT
Use the gompit link function. The gompit link function is also called the complementary log-log link
function.
POISSON
Analyzes the relationship between a Poisson response variable that you specify in RESPONSE and the predictors
that you with CONTINUOUS and CATEGORICAL. You specify the model with TERMLIST.
LOG
Use the natural log link function.
SQRT
Use the square root link function.
IDENTITY
Use the identity link function. The identity link function does not transform the response.
190
Minitab 18 Statistical Software Regression
RESPONSE C [C]
Enters the response data as counts. With BINOMIAL, you can enter a column that contains the number of
events first and then a column that contains the number of events. For examples, go to Entering data for
response variables on page 986.
CONTINUOUS C...C
Specifies the continuous predictors are in columns C...C. The columns must be numeric or date/time and
must match the length of the response column.
CATEGORICAL C...C
Specifies the categorical predictors are in columns C...C. The columns can be numeric, text, or date/time and
must match the length of the response column.
TERMS termlist
Specifies the model terms. Terms must be legal cross-terms. Only continuous predictors may be repeated.
Nested terms are not allowed. The model can be nonhierarchical. For examples, go to How to specify the
model for GLZM, OLOGISTIC and NLOGISTIC on page 1008.
Options
FREQUENCY C
Indicates how often the data in a row occur. For examples, go to Entering data for response variables on page
986.
CONSTANT
Fits the model with the intercept.
When you use CONSTANT, Minitab includes the intercept term in the model. For example, for a binomial logistic
regression, Minitab fits the model
g(p) = β0 + x'β
If you do not specify CONSTANT or NOCONSTANT, then Minitab includes the intercept.
NOCONSTANT
Fits the model without the intercept.
When you use NOCONSTANT, Minitab omits the intercept term.
g(p) = x'β
If you do not specify CONSTANT or NOCONSTANT, then Minitab includes the intercept.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
ITYPE K
Specifies the type of confidence interval.
191
Minitab 18 Statistical Software Regression
SEQDEVIANCE
Use sequential deviances for the tests of significance in the deviance table. The order of the terms in TERMLIST
affects the statistical significance. The default is to use adjusted deviances.
PEARSON
Specifies the use of Pearson residuals. The default is to use deviance residuals.
WEIGHT C
Performs a weighted regression. An n x n matrix W is formed with the column of weights as its diagonal and zeros
elsewhere. The regression coefficients are estimated by:
EFFECT
Specifies an effect coding scheme for categorical predictors (+1, 0, −1). With effect coding, the coefficients compare
the levels of the categorical variable to the mean. The default is binary coding (1, 0). With binary coding, the
coefficients compare the levels of the categorical variable to a reference level.
HGROUP K
Specifies the number of groups for the Hosmer-Lemeshow goodness-of-fit test with K. The default is 10.
REFERENCE C K...C K
Specifies the reference level for categorical predictor C with K. The coefficients compare the other levels of
categorical variables to the reference level when you use binary coding.
LOCATION [K...K]
Standardize continuous predictors by subtracting the means. Optionally, you can subtract different constants that
you specify with K...K. The order of the constants matches the order of the columns after CONTINUOUS.
SCALE [K...K]
Standardize continuous predictors by dividing by the standard deviations. Optionally, you can divide by different
constants that you specify with K...K. The order of the constants matches the order of the columns after
CONTINUOUS.
LEVELS K K...K K
Standardize continuous predictors by coding the low and high levels K K of each predictor to −1 1. The order of
the constants matches the order of the columns after CONTINUOUS.
UNSTANDARDIZED
Use the original units for the continuous predictors. If you do not specify LOCATION, SCALE, LEVELS, or
UNSTANDARDIZED, then Minitab uses the preferences that are set in Tools > Options > Linear Models > Coding
of Predictors.
REVENT K
Specifies which is the response event with K. The value of K matches one of the values in the response column.
Enclose text values in quotation marks. For example, to model the probability of a "Fail" in the response column,
enter REVENT "Fail".
192
Minitab 18 Statistical Software Regression
EVNAME K
When the RESPONSE command has two columns, you can specify the name of the event with K. Enclose text
values in quotation marks.
ITERATION K
Specifies the maximum number of iterations for the optimization algorithm that estimates the coefficients. The
default is 50.
TOLERANCE K
Specifies the tolerance level for collinearity and constant check. By default, K = 1E-12
CTOLERANCE K
Specifies the convergence criterion for the algorithm that estimates the coefficients.
START C
Specifies a column that contains starting values for the coefficients in the optimization algorithm. The column
begins with the estimate of the constant, then follows the order of the model after TERMS.
FINFORMATION
Specifies a stepwise model selection procedure that uses forward information criteria selection. Use AICCORRECTED
or BICRITERION to specify which information criterion to use to select the final model. If you do not specify a
criterion, Minitab uses AICCORRECTED.
The forward information criteria procedure adds the term with the lowest p-value to the model at each step. If
you do not include subcommands about hierarchy, FINFORMATION adds multiple terms at a step to maintain
model hierarchy, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
With these settings, additional terms can enter the model in 1 step. Minitab calculates the information criteria for
each step.
Once Minitab fits the full model or a model that leaves 1 degree of freedom for error, the procedure stops. Minitab
displays the results of the analysis for the model with the minimum value of the selected information criterion,
either the corrected Akaike's Information Criterion (AICc) or the Bayesian Information Criterion (BIC).
AICCORRECTED
Specifies the use of the corrected Akaike's Information Criterion (AICc) to select the final model.
BICRITERION
Specifies the use of the Bayesian Information Criterion (BIC) to select the final model.
STEPWISE
Specifies a stepwise model selection procedure that uses both forward selection and backward elimination. If you
do not include subcommands about hierarchy, STEPWISE and FORWARD add multiple terms at a step to maintain
model hierarchy, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
FORWARD
Specifies a stepwise model selection procedure that uses forward selection. If you do not include subcommands
about hierarchy, STEPWISE and FORWARD add multiple terms at a step to maintain model hierarchy, the equivalent
of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
193
Minitab 18 Statistical Software Regression
BACKWARD
Specifies a stepwise model selection procedure that uses backward elimination. Removes a single term at each
step and maintains a hierarchical model, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS.
AENTER K
Specifies the alpha level at which a term is entered into the model. The default is 0.15 for STEPWISE and 0.25
for FORWARD.
AREMOVE K
Specifies the alpha level at which a term is removed from the model. The default is 0.15 for STEPWISE and
0.10 for BACKWARD. For STEPWISE, K must be greater than or equal to K for AENTER.
ENTER termlist
Specifies the terms that are contained in the starting model for STEPWISE. The ENTER termlist must be a
subset of the TERMS termlist or in the default term list in the design.
FORCE termlist
Specifies the terms to be forced in the model. The FORCE termlist must be a subset of the TERMS termlist
or in the default term list in the design.
NOHIERARCHICAL
Specifies that the model selection procedure does not consider hierarchy.
HIERARCHICAL
Maintains a hierarchical model in stepwise regression. In a hierarchical model, if a higher-order term is
included, all lower-order terms that comprise the higher-order term also appear in the model. For example,
a model that includes the interaction term A*B*C is hierarchical if it includes the following main effects and
lower-order interactions: A, B, C, A*B, A*C, and B*C.
CATONLY
Specifies that only the categorical terms in the model have to be hierarchical.
ALLTERMS
Specifies that both categorical and continuous terms have to be hierarchical.
ATEND
Specifies that the final step of the stepwise procedure adds terms to make the model hierarchical.
ALWAYS
Specifies that the model is hierarchical at every step.
SINGLE
Specifies that only one term can enter the model at each step. So a higher-order term can enter
the model only if the terms that comprise the term are already in the model. For example, the
algorithm does not consider the addition of A*B unless A and B are already in the model.
BACKWARDS does not use SINGLE or MULTIPLE because terms only exit the model.
MULTIPLE
Specifies that multiple terms can enter the model at each step. So a higher order term can enter
the model, and the terms that comprise the term enter the model at the same time. For example,
if A*B is the most statistically significant term, A*B enters the model. At the same time, A and B
enter the model if those terms are not in the model already.
194
Minitab 18 Statistical Software Regression
BACKWARDS does not use SINGLE or MULTIPLE because terms only exit the model.
TMETHOD
Displays a table of information about the method and options.
TMSDETAILS
Displays the type of stepwise procedure and the alpha values to enter and/or remove a predictor from the model.
If you do not specify FULL or NOFULL, then Minitab uses the preferences that are set in Tools > Options > Linear
Models > Stepwise.
FULL
Specifies to display the coefficients, p-values, and model summary statistics for each step of the procedure.
NOFULL
Hides these statistics.
TEQUATION
Displays the model equation.
SINGLE
SINGLE specifies to show one equation instead of a separate equation for each combination of the levels of
the categorical predictors. The equation has a coefficient for each level of the categorical variables.
SEPARATE
Specifies to show separate equations for each combination of the levels of the categorical predictors. Each
equation has a different constant term.
TDEVIANCE
Displays the deviances by source and the p-values for the likelihood ratio tests.
TSUMMARY
Displays the statistics that evaluate model fit, including deviance R2.
TCOEFFICIENTS
Displays the coefficients and the p-values for the Wald normal approximation tests.
If you do not specify FULL or NOFULL, Minitab uses the preferences set in Tools > Options > Linear Models >
Display of Results.
FULL
Specifies to show the coefficients for the reference level when you use (0, 1) coding for categorical predictors.
NOFULL
Hides these statistics.
TGOODNESS
Displays the Pearson and Deviance goodness-of-fit tests. For the binomial distribution models, also shows the
Hosmer-Lemeshow goodness-of-fit test.
195
Minitab 18 Statistical Software Regression
TDIAGNOSTICS
Displays a table of diagnostics. K = 0 displays diagnostics for only observations with high leverage values or
standardized residuals greater than 2. K = 1 displays diagnostics for all observations.
TSTEP
Displays the deviance at each iteration of the coefficients.
TEXPAND
Displays the expanded versions of the tables that have them. The expanded Analysis of Deviance table adds the
sequential deviances and percent contributions for each term. The Coefficients table adds confidence intervals
for the coefficients. The Fits and Diagnostics table adds the standard error of the fit, the 95% confidence interval
for the fit, the deleted residual, the HI, the Cook's D, and the DFITS.
TSIMPLE
Displays the simple versions of the Analysis of Deviance table, the Coefficients table, and the Fits and Diagnostics
table.
NODEFAULT
Hides default tables and graphs that you do not include the subcommand to display.
TRINFO
Displays the number of events, non-events, and the total. The table also indicates which response value is the
reference event.
TODDS
Displays odds ratios for each continuous predictor and each level of the categorical predictors. The output does
not show odds ratios for predictors with interactions in the model or for categorical predictors with (−1, 0,+1)
coding.
THOSMER
Displays the table of observed and expected values for the Hosmer-Lemeshow test.
TASSOCIATION
Displays the number of concordant and discordant pairs, the Somers' D, the Goodman-Kruskal Gamma, and
Kendall's Tau-a.
Graphs
RTYPE K
Specifies the type of residual to plot with the graph subcommands.
GHISTOGRAM
Displays a histogram of the residuals.
196
Minitab 18 Statistical Software Regression
GNORMAL
Displays a normal probability plot of the residuals.
GFITS
Displays residuals versus fitted values. For binary logistic regression, this plot is not available when the data are
in response/frequency format because the pattern that appears is not a violation of the assumptions.
GORDER
Displays residuals versus the order of the worksheet. The row number for each data point is shown on the x-axis
(for example, 1 2 3 4...n).
GFOURPACK
Choose to display a layout of the residual plots. For Poisson models, the layout includes a histogram of residuals,
a normal plot of residuals, a plot of residuals versus fits, and a plot of residuals versus order.
For the binary logistic model, the layout depends on the format of the data. If the data are in response/frequency
format, the layout has a histogram of residuals, a normal plot of residuals, and a plot of residuals versus order. If
the data are in event/trial format, the layout also has a plot of residuals versus fits.
GVARIABLE C...C
Displays the residuals versus the variables in C. Typically, you enter the columns for the predictors.
FITS C
Stores the event probabilities.
RESIDUALS C
Stores the Deviance residuals.
SRESIDUALS C
Stores the standardized Deviance residuals.
TRESIDUALS C
Stores the deleted Deviance residuals.
COOK C
Stores the Cook's distances.
DFITS C
Stores the DFITS.
HI C
Stores the leverages.
SADJUSTEDRESP C
Stores the final adjusted response values.
SIWEIGHTS C
Stores the internal weights used to estimate the model parameters.
SECOEFFICIENTS C
Stores the standard errors of the estimated coefficients.
197
Minitab 18 Statistical Software Regression
COEFFICIENTS C
Stores the estimated coefficients.
XMATRIX M
Stores the design matrix.
XPWXINVERSE M
Stores the X'WX inverse matrix of the estimated coefficients.
DBETA C
Stores the change in the estimated regression coefficients (delta b) when you delete all observations with a
particular factor/covariate pattern. Use the delta b values to detect observations with a strong influence on the
coefficients.
DSBETA C
Stores the change in the estimated regression coefficients when you delete all observations with a particular
factor/covariate pattern based on the standardized Pearson residual.
DCHISQUARE C
Stores the change in the chi-square statistic when you delete all observations with a particular factor/covariate
pattern. Observations that are poorly fit by the model have high delta chi-square values.
DDEVIANCE C
Stores the change in the deviance when you delete all observations with a particular factor/covariate pattern.
For examples and information on entering the response data, go to Entering data for response variables on page
986.
BFIT provides diagnostic plots, goodness-of-fit tests, and other diagnostic measures so you can assess the validity
of your model. For more information, go to Regression diagnostics and residual analysis on page 1022.
Note Minitab excludes all observations with missing values on either the response variable or any of the predictors from all calculations.
RESPONSE C [C]
Enters the response data as counts. For examples and information on entering the response data, go to
Entering data for response variables on page 986.
CONTINUOUS C
Indicates the continuous predictor is in C.
198
Minitab 18 Statistical Software Regression
LOGIT
Use the logit link function.
NORMIT
Use the normit link function.
GOMPIT
Use the gompit link function. The gompit link function is also called the complementary log-log link function.
Options
FREQUENCY C
Indicates how often the data in a row occur.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
ITYPE K
Specifies the type of confidence interval.
REVENT K
Specifies which is the response event with K. The value of K matches one of the values in the response column.
Enclose text values in quotation marks. For example, to model the probability of a "Fail" in the response column,
enter REVENT "Fail".
EVNAME K
When the RESPONSE command has two columns, you can specify the name of the event with K. Enclose text
values in quotation marks.
Tables
TMETHOD
Displays the link function.
TRINFO
Displays the number of events, non-events, and the total.
TDEVIANCE
Displays the deviances by source and the p-values for the likelihood ratio tests.
TSUMMARY
Displays the statistics that evaluate model fit, including deviance R2.
199
Minitab 18 Statistical Software Regression
TCOEFFICIENTS
Displays the coefficients and the p-values for the Wald normal approximation tests.
TODDS
Displays odds ratios for each continuous predictor and each level of the categorical predictors. The output does
not show odds ratios for predictors with interactions in the model or for categorical predictors with (−1,0 ,+1)
coding.
INCREMENT K
Specifies the increment for the odds ratio for the predictor with K. For example, if the predictor is mass in
grams, enter 1000 to see the change in the odds ratio for a kilogram.
TEQUATION
Displays the model equation.
TGOODNESS
Displays the deviance, Pearson, and Hosmer-Lemeshow tests. These tests assess the overall fit of the model.
TDIAGNOSTICS K
Displays a table of diagnostics. K = 0 displays diagnostics for only observations with high leverage values or
standardized residuals greater than 2. K = 1 displays diagnostics for all observations.
NODEFAULT
Hides default tables and graphs that you do not include the subcommand to display.
Graphs
GFLINE
Displays the fitted line plot. The plot also shows the equation for the probabilities.
PROPORTIONS
Shows the data on the plot.
DCONFIDENCE
Shows the confidence interval for the fitted line on the plot.
RTYPE K
Specifies the type of residual to plot with the graph subcommands.
GHISTOGRAM
Displays a histogram of the residuals.
GNORMAL
Displays a normal probability plot of the residuals.
200
Minitab 18 Statistical Software Regression
GFITS
Displays residuals versus fitted values. This plot is not available when the data are in response/frequency format
because the pattern that appears is not a violation of the assumptions.
GORDER
Displays residuals versus the order of the worksheet. The row number for each data point is shown on the x-axis
(for example, 1 2 3 4... n).
GFOURPACK
Displays a layout of the residual plots. If the data are in response/frequency format, the layout has a histogram
of residuals, a normal plot of residuals, and a plot of residuals versus order. If the data are in event/trial format,
the layout also has a plot of residuals versus fits.
GVARIABLE C...C
Displays the residuals versus the variables. Typically, you enter the columns for the predictors.
Storage
FITS C
Stores the event probabilities.
RESIDUALS C
Stores the Deviance residuals.
SRESIDUALS C
Stores the standardized Deviance residuals.
TRESIDUALS C
Stores the deleted Deviance residuals.
COEFFICIENTS C
Stores the estimated coefficients.
OLOGISTIC fits a model with one or more predictors using an iterative-reweighted least squares algorithm to
obtain maximum likelihood estimates of the parameters. OLOGISTIC assumes parallel lines; therefore, one set of
coefficients is associated with the predictors. When this assumption is not valid, use NLOGISTIC on page 204, which
generates separate logit functions.
The predictors can be either factors (nominal variables) or covariates (continuous variables). Factors can be crossed
or nested. Covariates can be crossed with each other or with factors, or nested within factors. The model can
include up to 9 factors and 50 covariates. Unless you specify a predictor in the model as a factor, Minitab assumes
201
Minitab 18 Statistical Software Regression
the predictor is a covariate. Model continuous predictors as covariates and categorical predictors as factors. For
more information, go to How to specify the model for GLZM, OLOGISTIC and NLOGISTIC on page 1008.
Factor columns can be numeric or text. For a numeric factor, Minitab designates the lowest numeric value as the
reference level. For a text factor, Minitab determines the reference level alphabetically. For an example, go to
Entering data for factor variables on page 985. To change the default coding, use the REFERENCE subcommand.
When the response variable column is numeric, OLOGISTIC orders the levels from smallest to largest. When the
response variable column is text, OLOGISTIC orders the levels alphabetically. For examples and information on
entering the response data, go to Entering data for response variables on page 986. Use the ORDER subcommand
to specify the ordering of the response variable.
FREQUENCY C
Enters the response data as counts. For examples, go to Entering data for response variables on page 986.
Options
LOGIT
Specifies the logit link function (default).
NORMIT
Specifies the normit link function.
GOMPIT
Specifies the gompit link function (also called the complementary log-log function).
FACTORS C...C
Specifies which of the predictors are factors. Minitab assumes all variables in the model are covariates unless
specified to be factors. Model continuous predictors as covariates and categorical predictors as factors.
REFERENCE C K, ..., C K
Changes the default coding for factors. To change the default reference factor level, specify the factor column
followed by the reference level. (Text and date/time levels must be enclosed in quotes.) For a discussion and
examples of the default coding scheme, go to Entering data for factor variables on page 985.
Use the ORDER subcommand to specify the ordering of the response variable.
ORDER C
ORDER K...K
Specifies the order of the response values from lowest to highest. Values can be stored in C or K.
ITERATION K
Changes the maximum number of iterations that Minitab performs to reach convergence. The default value is 20.
Minitab's logistic regression commands obtain maximum likelihood estimates through an iterative process. If the
maximum number of iterations is reached before convergence, the command terminates.
START C
Specifies the initial values for model parameters. The column containing the initial values must have one row for
each estimated coefficient in the model. For OLOGISTIC, the starting values for all the constants appear first,
followed by starting values for the predictors in the model.
202
Minitab 18 Statistical Software Regression
CTOLERANCE K [K]
Changes the convergence criteria. Both Ks must be positive numbers.
You can use CTOLERANCE only when you issue commands in the Session window.
TOLERANCE K [K]
Forces Minitab to keep a predictor in the model that is either highly correlated with another predictor or nearly
constant. Lowering tolerance by giving very small argument values can prevent Minitab from eliminating problematic
predictor columns from the model. Both Ks must be positive numbers.
K
First K 1 – R-squared, where R-squared is the value resulting from regressing one predictor on the
remaining predictors. The default is 1E – 18. If (1 – R-squared) is < (1E – 18), Minitab removes
the predictor from the equation.
Second K The parameter for forcing in a variable that is nearly constant. The default is 2E – 21. If the
coefficient of variation of a predictor (the standard deviation / the mean) is < square root (2E
– 21), Minitab considers the predictor to be essentially constant and removes it from the
equation.
Results
BRIEF K
Controls the amount of output with a value in K.
STEP
Displays the log-likelihood at each iteration of the parameter estimation process.
COEFFICIENTS C
Estimated coefficients in a column.
203
Minitab 18 Statistical Software Regression
SECOEFFICIENTS C
Standard errors of the coefficients in a column.
XPWXINVERSE M
Variance-covariance matrix of the estimated coefficients, expressed as (X' W X)−1.
LOGLIKELIHOOD K
Last log-likelihood value.
EPROBABILITY C...C
Predicted event probabilities. Specify one column for each distinct value of the response.
CUMPROBABILITY C...C
Cumulative event probabilities. Specify one column for each distinct value of the response minus one.
NTRIALS C
Number of trials for each factor/covariate pattern.
NOCCUR C...C
Number of occurrences for the jth factor/covariate pattern. Specify one column for each distinct value of the
response.
OLOGISTIC on page 201 assumes parallel lines. Therefore, one set of coefficients is associated with the predictors.
When this assumption is not valid, use NLOGISTIC, which generates separate logit functions.
The predictors can be either factors (nominal variables) or covariates (continuous variables). Factors can be crossed
or nested. Covariates can be crossed with each other or with factors, or nested within factors. The model can
include up to 9 factors and 50 covariates. Unless you specify a predictor in the model as a factor using the FACTORS
subcommand, Minitab assumes the predictor is a covariate. Model continuous predictors as covariates and
categorical predictors as factors. For more information, go to How to specify the model for GLZM, OLOGISTIC
and NLOGISTIC on page 1008.
Factor columns can be numeric or text. For a numeric factor, Minitab designates the lowest numeric value as the
reference level. For a text factor, Minitab determines the reference level alphabetically. For an example, go to
Entering data for factor variables on page 985.
When the response variable column is numeric, NLOGISTIC defines the highest value as the reference event. When
the response variable column is text, NLOGISTIC defines the event by reverse alphabetical order. For example, if
you enter the response variable as crunchy, mushy, and crispy, NLOGISTIC defines mushy as the event. For examples
and information on entering the response data, go to Entering data for response variables on page 986.
204
Minitab 18 Statistical Software Regression
Use the REFERENCE subcommand to change the default coding for both factor and response variables.
NLOGISTIC provides goodness-of-fit tests and other diagnostic measures so you can assess the validity of your
model.
FREQUENCY C
Enters the response data as counts. For examples and information on entering the response data, go to
Entering data for response variables on page 986.
Options
FACTORS C...C
Specifies which of the predictors are factors. Minitab assumes all variables in the model are covariates unless
specified to be factors. Continuous predictors must be modeled as covariates; categorical predictors must be
modeled as factors.
REFERENCE C K, ..., C K
Changes the default coding for factor and response columns. To change the default reference factor level, specify
the factor column followed by the reference level. (Text and date/time levels must be enclosed in quotes.) For a
discussion and examples of the default coding scheme, go to Entering data for factor variables on page 985.
To change the default event, specify the response column followed by the event value.
START C
Specifies the initial values for model parameters. The column containing the initial values must have one row for
each estimated coefficient in the model. For NLOGISTIC, the starting values for logit 1 appear before logit 2, and
so on. For each logit, the starting value for the constant appears before the starting values for the predictors in
the model.
ITERATION K
Changes the maximum number of iterations that Minitab performs to reach convergence. The default value is 20.
Minitab's logistic regression commands obtain maximum likelihood estimates through an iterative process. If the
maximum number of iterations is reached before convergence, the command terminates.
CTOLERANCE K K
Changes the convergence criteria. Both Ks must be positive numbers.
You can use CTOLERANCE only when you issue commands in the Session window.
TOLERANCE K [K]
Forces Minitab to keep a predictor in the model that is either highly correlated with another predictor or nearly
constant. Lowering tolerance by giving very small argument values can prevent Minitab from eliminating problematic
predictor columns from the model. Both Ks must be positive numbers.
205
Minitab 18 Statistical Software Regression
K
First K 1 – R-squared, where R-squared is the value resulting from regressing one predictor on the
remaining predictors. The default is 1E – 18. If (1 – R-squared) is < (1E – 18), Minitab removes
the predictor from the equation.
Second K The parameter for forcing in a variable that is nearly constant. The default is 2E – 21. If the
coefficient of variation of a predictor (the standard deviation / the mean) is < square root (2E
– 21), Minitab considers the predictor to be essentially constant and removes it from the
equation.
Results
BRIEF K
Controls the amount of output with a value in K.
STEP
Displays the log-likelihood at each iteration of the parameter estimation process.
COEFFICIENTS C
Estimated coefficients in a column.
SECOEFFICIENTS C
Standard errors of the coefficients in a column.
XPWXINVERSE M
Variance-covariance matrix of the estimated coefficients, expressed as (X' W X)−1.
LOGLIKELIHOOD K
Last log-likelihood value.
EPROBABILITY C...C
Predicted event probabilities. Specify one column for each distinct value of the response.
NTRIALS C
Number of trials for each factor/covariate pattern.
206
Minitab 18 Statistical Software Regression
NOCCUR C...C
Number of occurrences for the jth factor/covariate pattern. Specify one column for each distinct value of the
response.
207
Minitab 18 Statistical Software ANOVA
ANOVA
ONEWAY: Session command for performing a
one-way ANOVA
ONEWAY
Performs a one-way analysis of variance. Your data can be arranged in one of two ways:
• Response data are in one column for all factor levels
• Response data are in a separate column for each factor level
Minitab performs the traditional one-way ANOVA procedure if you assume that the variance is constant across
all groups. However, if your data exhibit unequal variances between groups, Minitab can perform Welch's ANOVA.
To perform Welch's ANOVA, use the WELCH subcommand.
Use the comparison method subcommands to determine which group means differ and by how much.
The factor column may be numeric or text, and may contain any value. The levels do not need to be in any special
order. SET is especially useful for entering data that follow a pattern, such as subscripts (factor level values). For
examples, go to Entering patterned data for the SET session command on page 986. (TSET and DSET can be used
to enter text and date/time data, respectively, that follow a pattern.)
RESPONSE C
RESPONSE C...C
Specifies the column or columns that contains the response data. The column or columns must be numeric or
date/time. If your response data are in one column, specify the column with C. If your response data are in a
separate column for each factor level, specify all of the response columns with C...C.
CATEGORICAL C
Required when your response data are in one column for all factor levels. For this data arrangement, you must
use CATEGORICAL to specify the single column that contains the categorical factor. If you specify more than one
column for RESPONSE, CATEGORICAL is not allowed.
Options
CONFIDENCE K
Specifies a confidence level for the interval plot and means table, but not the multiple comparisons, in K. For
example, for a 90% confidence level, enter CONFIDENCE 90. The default value of K is 95.
ITYPE K
Specifies the type of confidence interval for the interval plot and means table.
208
Minitab 18 Statistical Software ANOVA
WELCH
Specifies the Welch method. Use WELCH when you do not assume that all groups have equal variances. One-way
ANOVA with equal variances is slightly more powerful than Welch's ANOVA, but serious error can result if the
variances are not equal.
Comparisons
TUKEY [K]
Calculates all pairwise differences between level means using Tukey's method (also called Tukey's HSD or
Tukey-Kramer method) with the family error rate specified as K. If K is not specified, Minitab uses the default
family error rate of .05.
To obtain output for this comparison method, you must issue at least one of the following subcommands:
TGROUPING, TMTEST, GMCI.
FISHER [K]
Calculates all pairwise differences between level means using Fisher's LSD procedure with the individual error rate
specified as K. If K is not specified, Minitab uses the default individual error rate of .05.
To obtain output for this comparison method, you must issue at least one of the following subcommands:
TGROUPING, TMTEST, GMCI.
DUNNETT [K] K
DUNNETT C
Calculates the difference between each treatment mean and a control mean. The family error rate is specified by
the first K. How you specify the control group depends on how your data are arranged.
If the error rate is not specified, Minitab uses the default family error rate of .05.
When the column of levels contains text data, the control level will also be text so remember to enclose the value
you enter for K in double quotes.
To obtain output for this comparison method, you must issue at least one of the following subcommands:
TGROUPING, TMTEST, GMCI.
MCB [K] K
Calculates the difference between each level mean and the best of the other level means. The family error rate is
specified by the first K and the type of best is specified by the second K. If the error rate is not specified, Minitab
uses the default family error rate of .05.
There are two choices for "best." If the smallest mean is considered the best, set K = -1; if the largest is considered
the best, set K = 1.
209
Minitab 18 Statistical Software ANOVA
To obtain output for this comparison method, you must issue at least one of the following subcommands:
TGROUPING, TMTEST, GMCI.
GAMES [K]
Calculates all pairwise differences between level means using Games-Howell method with the family error rate
specified as K. If K is not specified, Minitab uses the default family error rate of .05. GAMES is only available when
WELCH is issued.
To obtain output for this comparison method, you must issue at least one of the following subcommands:
TGROUPING, TMTEST, GMCI.
Results
NODEFAULT
Specifies that no default tables and graphs will be displayed.
TEXPAND
Displays the expanded versions of the ANOVA table, Model summary, and Multiple comparisons tables.
TSIMPLE
Displays the simple version of all tables.
TMETHOD
Displays the method table.
TFACTOR
Displays the name, number of levels, and the values for the categorical factor.
TANOVA
Displays the ANOVA table.
TSUMMARY
Displays the summary of model table.
TMEANS
Displays the table of group means.
TGROUPING
Displays the grouping information table for each comparison method subcommand that you issue. This table
highlights the significant and non-significant comparisons for each comparison method.
TMTEST
Displays the multiple comparison test table for each comparison method subcommand that you issue. This table
displays the hypothesis test form of the comparison output, which includes the differences of the means, the
numeric values for the confidences intervals, and the adjusted p-values.
GINTPLOT
Displays an interval plot of the group means.
210
Minitab 18 Statistical Software ANOVA
GINDPLOT
Displays an individual value plot for each group.
GBOXPLOT
Displays a boxplot for each sample.
GHISTOGRAM
Displays a histogram of the residuals.
GNORMAL
Displays a normal probability plot of the residuals.
GFITS
Plots the residuals versus the fitted values.
GORDER
Plots the residuals versus the order of the data. The row number for each data point is shown on the x-axis ( for
example, 1 2 3 4... n).
GFOURPACK
Displays a layout of a histogram of the residuals, a normal probability plot of the residuals, residuals versus fitted
values, and residuals versus order of the data.
GVARIABLE C...C
Displays a separate graph for the residuals versus each specified column.
Other graphs
GMCI
Displays an interval plot of the differences between group means for each comparison method subcommand that
you issue.
Storage
FITS C
FITS C...C
Stores fitted values. The fitted values are the level means. Specify one storage column C for each column that
contains response data.
RESIDUALS C
RESIDUALS C...C
Stores residuals. Residual = (response – fit). Specify one storage column C for each column that contains response
data.
211
Minitab 18 Statistical Software ANOVA
For ANOM with a normal distribution and one factor, a single plot displaying the means for each level of the
factor, a center line which is the grand mean, and upper and lower decision limits is produced. If you use ANOM
with a normal distribution and two factors, three plots are given: one showing the interaction effects, one showing
the main effects for the first factor, and one showing the main effects for the second factor. If you choose an
ANOM for a binomial distribution or a Poisson distribution, a single plot displaying the means for each level of
the factor, a center line which is the grand mean, and upper and lower decision points is produced.
The subcommands NORMAL, BINOMIAL, and POISSON replace the commands %ANOM, %BANOM, and %PANOM.
respectively.
NORMAL C [C]
For normal data, each row of the response column represents an observation for measurement data. Response
data are typically measurement data, such as weight or moisture content.
BINOMIAL K
For binomial data, the values in the response column are the numbers of defectives found in each sample.
These values must be positive integers (0 or greater). You can include up to 500 samples.
POISSON
For Poisson data, the values in the response column are the numbers of defects that are found in each sample.
These values must be positive integers (0 or greater). You can include up to 500 samples.
ALPHA K
The decision lines on an ANOM chart are based on an experiment-wide error rate, similar to what you might
use when making pairwise comparisons or contrasts in an ANOVA. By default, a rate of 0.05 is used. Use
ALPHA to enter a number between 0 and 1. Values greater than or equal to 1.0 are interpreted as percentages.
TITLE "title"
Specifies a title for the graph. If you do not specify a title, Minitab uses a default title.
When you use TITLE with %graphs or the DENDROGRAM subcommand, you can use it only one time, and
you cannot use any of the TITLE subcommands available with the graph commands.
GSAVE "file_name"
GSAVE K
Saves the graph in a file.
The default file name is Minitab.MGF. You can specify a custom file name in double quotation marks
("file_name"), or as a stored text constant (K). You can also use any of the following subcommands to save
the graph in a different graphics format.
Some graph commands—for example, HISTOGRAM C1 C2 C3—generate more than one graph. If you include
the GSAVE subcommand with such a command, Minitab saves multiple files. Minitab gives each file a different
file name. Minitab uses the first five characters of the name you specify, then appends a number (001, 002,
and so on), for up to 500 files.
212
Minitab 18 Statistical Software ANOVA
If you try to overwrite an existing file using GSAVE, Minitab displays a message. The message asks whether
you want to replace the existing file. If you use GSAVE with no file name for multiple graphs, Minitab displays
the message only for the first graph. Then, Minitab replaces the other graphs automatically. You can use
REPLACE or NOREPLACE to bypass the message. Bypassing the message is especially useful in a macro. After
you save the file, you can view the graph with GVIEW.
REPLACE
Bypasses the message that asks whether you want to replace the existing file. If you use both REPLACE
and NOREPLACE, Minitab uses the last subcommand.
NOREPLACE
Bypasses the message that asks whether you want to replace the existing file. If a file with the same
name exists, Minitab displays an error and stops the command or quits the macro. If you use both
REPLACE and NOREPLACE, Minitab defaults to the last subcommand.
JPEG
JPEG color
PNGB
PNG black and white
PNGC
PNG color
PNGH
PNG high color
TIFB
TIF black and white
TIF
TIF color
BMPB
BMP black and white
BMPC
BMP color
BMPH
BMP high color
GIF
GIF
EMF
EMF
RESOLUTION K
Saves the graph at a resolution of K dots per inch.
WTITLE "title"
You can use WTITLE as a subcommand with LAYOUT and all graphs. The title that you specify becomes the
window title of the resulting graph window.
213
Minitab 18 Statistical Software ANOVA
For one-way analysis of variance, you can have unbalanced designs. For multi-way analysis of variance, you must
have balanced designs (all cells must have the same number of observations). The command GLM on page 217
analyzes balanced and unbalanced designs. However, if your design is balanced, ANOVA is faster and requires
less space.
Factors can be crossed or nested, fixed or random. ANOVA calculates all exact F-tests, displays expected mean
squares, and estimates variance components. You can specify your own tests, store residuals and fitted values,
and display cell and marginal means. You can analyze up to 50 response variables and up to 9 factors on one
ANOVA command.
Minitab verifies that your model is valid and displays a message if it is not. Minitab also verifies that your data set
is balanced.
If you do not use the subcommand RANDOM, ANOVA fits a fixed effect model. In this case, the F-statistic for a
term is always (MS term) / (MSE). However, when some of your factors are random, the denominator of an F-test,
in general, is not MSE. For more information, see the subcommands RANDOM and EMS.
You can use the subcommands MANOVA, SSCP, EIGEN, PARTIAL, and NOUNIVARIATE to do multivariate analysis
of variance. Hotelling's T-squared test can be performed as a special case of ANOVA with MANOVA.
ANOVA can analyze very complex designs, but, if you have a simple model, ANOVA is very easy to use.
Fore more information, go to How to specify the model in ANOVA on page 1012 and How to enter data for ANOVA
and GLM on page 1002.
Model
RANDOM C...C
Specifies which factors are random. Do not include interaction terms or nested factors. If at least one factor in an
interaction term is random, then Minitab considers the term to be random. Any term that is nested within a
random factor is considered random.
RESTRICT
There are two mixed model analysis of variance models: one requires the crossed, mixed terms to sum to 0 over
subscripts that correspond to fixed effects (Minitab refers to this as the restricted model.), and the other does
not. Most textbooks and BMDP's program 8V use the restricted model. SAS uses the unrestricted model.
By default, ANOVA fits the unrestricted model. This subcommand instructs the program to fit the restricted model,
which assumes that the mixed interaction terms are restricted to sum to 0 over the fixed effects. For more
information, go to Scenario and introduction on page 987.
214
Minitab 18 Statistical Software ANOVA
Results
EMS
Displays a table that contains expected mean squares, estimated variance components, and the error term (the
denominator) used in each exact F-test. If no exact F-test for a term exists, then use the expected mean squares
to determine how to construct an approximate F-test using the subcommand TEST.
The estimates of the variance components are the usual unbiased analysis of variance estimates. They are obtained
by setting each calculated MS equal to its EMS. This gives a system of linear equations in the unknown variance
components. This system is then solved. Unfortunately, this method can result in negative estimates, which should
be set to 0. However, Minitab displays the negative estimates because they sometimes indicate that the model
that is being fit is inappropriate for the data.
MEANS termlist
Displays a table of means corresponding to each term listed. For example, the following command language
displays four tables, one table for each main effect, A, B, D, and one for the three-way interaction, A*B*D.
where DFi is the degrees of freedom for the term MSi. For more information, go to Scenario and introduction on
page 987.
Storage
FITS C...C
Stores fitted values, using one column for each response. If you specify a full model (you include all interaction
terms), then the fitted values are just the cell means. If you fit a reduced model, the fitted values are not the cell
means, but are the sum of the least squares estimates of the effects in the model.
215
Minitab 18 Statistical Software ANOVA
RESIDUALS C...C
Stores residuals, using one column for each response variable. Residual = (response – fit).
Graphs
GHISTOGRAM
Displays a histogram of the residuals.
GNORMAL
Displays a normal probability plot of the residuals.
GFITS
Plots the residuals versus the fitted values.
GORDER
Plots the residuals versus the order of the data. The row number for each data point is shown on the x-axis ( for
example, 1 2 3 4...n).
GFOURPACK
Displays a layout of a histogram of the residuals, a normal probability plot of the residuals, residuals vs fitted
values, and residuals vs order of the data.
GVARIABLE C...C
Displays a separate graph for the residuals versus each specified column.
Balanced MANOVA
If you specify an errorterm, then it must be a single term that is in the model. MANOVA then uses this errorterm
in all tests. If you do not specify an errorterm, then Minitab determines an appropriate errorterm, as in the univariate
case.
All four tests are based on two SSCP (sums of squares and cross products) matrices: H = the hypothesis matrix
and E = the error matrix. There is one H associated with each term in termlist. E is the matrix associated with the
error for the test.
SSCP
Displays the hypothesis matrix, H, that corresponds to each term that is specified by MANOVA, and the error
matrix, E.
EIGEN
Displays a table that contains the eigenvalues and eigenvectors for the (nonsymmetric) matrix, E-1 H. These are
the eigenvalues that are used to calculate the four MANOVA tests. A separate table is displayed for each term
that is specified on MANOVA.
Note If an eigenvalue is repeated, then the corresponding eigenvectors are not unique. In this case, the eigenvectors that Minitab
displays and those in books or other software might not agree. However, the MANOVA tests are always unique.
216
Minitab 18 Statistical Software ANOVA
PARTIAL
Displays a matrix of partial correlations. These are the correlations among the residuals or, equivalently, the
correlations among the responses conditioned on the model. The formula for the matrix is W**-.5 E W**-.5, where
E is the error matrix and W has the diagonal of E as its diagonal and 0s elsewhere.
NOUNIVARIATE
Suppresses the univariate output. Only the multivariate output is displayed.
Factors can be crossed or nested, fixed or random. Covariates can be crossed with each other or with factors, or
nested within factors. You can store residuals, fitted values, and many other diagnostics, and display cell and
marginal means.
GLM does tests for fixed effects models automatically. The TEST subcommand allows you to calculate the
appropriate univariate F-tests for mixed models.
Output contains both the sequential sums of squares and the adjusted sums of squares (that is, each term is fit
after all other terms in the model). Automatic tests are done using the adjusted SS, assuming all factors are fixed.
Observations that are considered unusual are displayed. You can also display coefficients, along with their standard
deviations and t-values, and cell and marginal means.
Calculations are performed using a regression approach. First a "full rank" design matrix is formed from the factors
and covariates. The columns of the design matrix are used as predictors. Then each response variable is regressed
on these columns.
You can store the residuals, fitted values, prediction and confidence intervals, and many other diagnostics for
further analysis.
For more information, go to How to specify the model for GLM on page 1010 and How to enter data for ANOVA
and GLM on page 1002.
Options
RESPONSE C
Specifies the column that contains the response variable. The column must be numeric or date/time.
CONTINUOUS C...C
Specifies the continuous predictors if you have any. The column or columns must be numeric or date/time and
must match the length of the response column.
CATEGORICAL C...C
Specifies the categorical predictors if you have any. The column or columns can be numeric, text, or date/time
and must match the length of the response column.
217
Minitab 18 Statistical Software ANOVA
TERMS termlist
Specifies the model terms. Terms must be legal cross-terms. Only continuous predictors may be repeated. Nested
terms are not entered in the term list. The model can be nonhierarchical when there are no random factors.
RANDOM C...C
Specifies random factors. Random factors must also be specified in CATEGORICAL.
WEIGHT
Performs a weighted regression. Weights cannot be used with optimal Box-Cox transformation. Column must be
numeric with nonnegative values. Length must match response column length.
An n x n matrix W is formed with the column of weights as its diagonal and zeros elsewhere. The regression
coefficients are estimated by:
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
ITYPE K
Specifies the type of confidence interval.
TOLER K
Specifies the tolerance level for collinearity and constant check. Use to force Minitab to keep a predictor in the
model which is either highly correlated with another predictor or nearly constant. The default k = 4*2.22E-16.
SSQUARES
Specifies sequential sum of squares for tests in the ANOVA table. The default is the adjusted sums of squares.
MEANS termlist
Calculates least squares means for specified terms. Terms must be in the model.
218
Minitab 18 Statistical Software ANOVA
EFFECT
Specifies the effect coding (−1, 0, +1) scheme for categorical predictors. If you do not specify either EFFECT or
BINARY, then Minitab uses the preferences set in Tools > Options > Linear Models > Coding of Predictors.
BINARY
Specifies the binary coding (1, 0) scheme for categorical predictors. If you do not specify either EFFECT or BINARY,
then Minitab uses the preferences set in Tools > Options > Linear Models > Coding of Predictors.
REFERENCE C K...C K
Changes the default coding for the categorical predictor columns. To change the default reference factor level,
specify the factor column followed by the reference level. (You must enclose text and date/time levels in double
quotes.) You can assign a reference level only when you use the binary coding (1, 0) scheme.
LOCATION [K...K]
Specifies that the analysis is to be performed on coded continuous predictors by subtracting a constant from
each predictor. If you do not specify any arguments, the mean of each predictor column is subtracted. K specifies
to subtract a constant. If you specify arguments, the number of arguments must match the number of continuous
predictors.
SCALE [K...K]
Specifies that the analysis is to be performed on coded continuous predictors by dividing each predictor by a
constant. If you do not specify any arguments, each predictor column is divided by the standard deviation. K
specifies to divide by a constant. If you specify arguments, the number of arguments must match the number of
continuous predictors.
LEVELS [K...K]
Specifies that the analysis is to be performed on coded continuous predictors by DOE-type coding for the specified
low and high levels K K…K K. The number of arguments must be twice the number of continuous predictors.
UNSTANDARDIZED
Specifies the analysis is to be performed on the original predictors.
Box-Cox
BOX-COX [K]
Performs a Box-Cox transformation with a specified lambda. K is the value of lambda and must be between −5
and +5. If K is not given, Minitab will find the optimal lambda. By default, Minitab rounds the optimal value.
Minitab cannot calculate the optimal lambda for stepwise regression or when the model contains random factors.
Consequently, you must specify a lambda value for BOXCOX if you use RANDOM, STEPWISE, FORWARD, or
BACKWARD.
Stepwise
FINFORMATION, STEPWISE, FORWARD, and BACKWARD perform a stepwise regression procedure to fit the model. No
arguments are needed for these subcommands.
219
Minitab 18 Statistical Software ANOVA
FINFORMATION
Specifies a stepwise model selection procedure that uses forward information criteria selection. Use AICCORRECTED
or BICRITERION to specify which information criterion to use to select the final model. If you do not specify a
criterion, Minitab uses AICCORRECTED.
The forward information criteria procedure adds the term with the lowest p-value to the model at each step. If
you do not include subcommands about hierarchy, FINFORMATION adds multiple terms at a step to maintain
model hierarchy, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
With these settings, additional terms can enter the model in 1 step. Minitab calculates the information criteria for
each step.
Once Minitab fits the full model or a model that leaves 1 degree of freedom for error, the procedure stops. Minitab
displays the results of the analysis for the model with the minimum value of the selected information criterion,
either the corrected Akaike's Information Criterion (AICc) or the Bayesian Information Criterion (BIC).
AICCORRECTED
Specifies the use of the corrected Akaike's Information Criterion (AICc) to select the final model.
BICRITERION
Specifies the use of the Bayesian Information Criterion (BIC) to select the final model.
STEPWISE
Specifies a stepwise model selection procedure that uses both forward selection and backward elimination. If you
do not include subcommands about hierarchy, STEPWISE and FORWARD add multiple terms at a step to maintain
model hierarchy, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
FORWARD
Specifies a stepwise model selection procedure that uses forward selection. If you do not include subcommands
about hierarchy, STEPWISE and FORWARD add multiple terms at a step to maintain model hierarchy, the equivalent
of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
BACKWARD
Specifies a stepwise model selection procedure that uses backward elimination. Removes a single term at each
step and maintains a hierarchical model, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS.
AENTER K
Specifies the alpha level at which a term is entered into the model. The default is 0.15 for STEPWISE and 0.25
for FORWARD.
AREMOVE K
Specifies the alpha level at which a term is removed from the model. The default is 0.15 for STEPWISE and
0.10 for BACKWARD. For STEPWISE, K must be greater than or equal to K for AENTER.
ENTER termlist
Specifies the terms that are contained in the starting model for STEPWISE. The ENTER termlist must be a
subset of the TERMS termlist or in the default term list in the design.
FORCE termlist
Specifies the terms to be forced in the model. The FORCE termlist must be a subset of the TERMS termlist
or in the default term list in the design.
220
Minitab 18 Statistical Software ANOVA
NOHIERARCHICAL
Specifies that the model selection procedure does not consider hierarchy.
HIERARCHICAL
Maintains a hierarchical model in stepwise regression. In a hierarchical model, if a higher-order term is
included, all lower-order terms that comprise the higher-order term also appear in the model. For example,
a model that includes the interaction term A*B*C is hierarchical if it includes the following main effects and
lower-order interactions: A, B, C, A*B, A*C, and B*C.
CATONLY
Specifies that only the categorical terms in the model have to be hierarchical.
ALLTERMS
Specifies that both categorical and continuous terms have to be hierarchical.
ATEND
Specifies that the final step of the stepwise procedure adds terms to make the model hierarchical.
ALWAYS
Specifies that the model is hierarchical at every step.
SINGLE
Specifies that only one term can enter the model at each step. So a higher-order term can enter
the model only if the terms that comprise the term are already in the model. For example, the
algorithm does not consider the addition of A*B unless A and B are already in the model.
BACKWARDS does not use SINGLE or MULTIPLE because terms only exit the model.
MULTIPLE
Specifies that multiple terms can enter the model at each step. So a higher order term can enter
the model, and the terms that comprise the term enter the model at the same time. For example,
if A*B is the most statistically significant term, A*B enters the model. At the same time, A and B
enter the model if those terms are not in the model already.
BACKWARDS does not use SINGLE or MULTIPLE because terms only exit the model.
Graphs
RTYPE K
Specifies the type of residual to plot with the graph subcommands.
GHISTOGRAM
Displays a histogram or individual value plot of the residuals, depending on the sample size.
GNORMAL
Displays a normal probability plot of the residuals.
221
Minitab 18 Statistical Software ANOVA
GFITS
Plots the residuals versus the fitted values.
GFOURPACK
Displays a layout of a histogram of the residuals, a normal probability plot of the residuals, residuals vs fitted
values, and residuals vs order of the data.
GORDER
Plots the residuals versus the order of the data. The row number for each data point is shown on the x-axis (for
example, 1 2 3 4...n).
GVARIABLE C...C
Displays a separate graph for the residuals versus each specified column.
Results
NODEFAULT
Specifies that no default tables and graphs will be displayed.
TMETHOD
Displays the method table.
TFACTOR
Displays the name, number of levels, and the values for all categorical factors in your model.
TMSDETAILS
Displays the type of stepwise procedure and the alpha values to enter and/or remove a predictor from the model.
If you do not specify FULL or NOFULL, then Minitab uses the preferences set in Tools > Options > Linear Models >
Stepwise.
FULL
Displays the coefficients, p-values, Mallows' Cp, and model summary statistics for each step of the procedure.
NOFULL
Hides these statistics.
TEQUATION
Displays the regression equation table. Minitab will display up to 50 equations. If you do not specify SINGLE or
SEPARATE, Minitab uses the preferences set in Tools > Options > Linear Models > Display of Results.
SINGLE
If you want to see a single equation, rather than a separate equation for each factor level combination, use
SINGLE.
SEPARATE
To see the separate equations, use SEPARATE.
TCOEFFICIENTS
Displays the table of coefficients. If you do not specify FULL or NOFULL, Minitab uses the preferences set in Tools >
Options > Linear Models > Display of Results.
FULL
Displays the full set of coefficients for categorical predictors.
222
Minitab 18 Statistical Software ANOVA
NOFULL
Displays only the linearly independent coefficients.
TSUMMARY
Displays the summary of model table.
TANOVA
Displays the ANOVA table.
TDIAGNOSTICS K
Displays a table of diagnostics. K = 0 displays diagnostics for only unusual observations. K = 1 displays diagnostics
for all observations.
TDW
Displays Durbin-Watson statistics.
TEXPAND
Displays the expanded version of the ANOVA table, table of coefficients, model summary table, and table of
unusual observations.
TSIMPLE
Displays the simple version of the ANOVA table, table of coefficients, model summary table, and table of unusual
observations.
TEMS
Displays the table of expected mean squares, estimated variance components, and error term in each F-test.
TMEANS
Displays the table of least squares means.
TVARIANCE
Displays the table of variance components.
TTEST
Displays the table of your own tests.
BCRESP
Stores the Box-Cox transformation of the response in C.
BFITS
Stores the fits for the original response.
BSMEANS
Stores the means for the original response.
RESIDUALS
Stores the residuals (fitted values – observed values).
223
Minitab 18 Statistical Software ANOVA
SRESIDUALS
Stores the standardized residuals.
TRESIDUALS
Stores the deleted Studentized residuals.
HI
Stores the leverages.
COOK
Stores Cook's distance.
DFITS
Stores DFITS.
COEFFICIENTS
Stores the estimated coefficients.
FITS
Stores the fitted values, often called the Y-hats ( ).
SMEANS
Stores the least square means for the terms specified by MEANS.
XMATRIX
Stores the design matrix for regression model.
For REML, at least 1 factor must be random. Other factors can be fixed or random. Covariates can be crossed with
each other, with factors, or nested within factors. You can store residuals, fitted values, and other diagnostic
statistics.
REML tests for fixed effects with either the Kenward-Roger approximation or the Satterthwaite approximation.
To use the Satterthwaite approximation, use the subcommand SATTERTHWAITE. To show the tests, use the
subcommand TFIXEDEFFECT.
Tests use the adjusted sums of squares. Observations with standardized residuals that have absolute values greater
than 2 are in a table of unusual observations. to show the table, use the subcommand TDIAGNOSTICS.
224
Minitab 18 Statistical Software ANOVA
• RANDOM
• CATEGORICAL
• TERMS
Options
RESPONSE C
Specifies the column that contains the response variable. The column must be numeric or date/time.
CATEGORICAL C...C
Specifies the categorical predictors if you have any. The column or columns can be numeric, text, or date/time
and must match the length of the response column.
CONTINUOUS C...C
Specifies the continuous predictors if you have any. The column or columns must be numeric or date/time and
must match the length of the response column.
RANDOM C...C
Specifies random factors. Random factors must also be specified in CATEGORICAL. At least one factor must be
random.
TERMS termlist
Specifies the model terms. Terms must be legal cross-terms. Only continuous predictors may be repeated. Nested
terms are not entered in the term list. The model can be nonhierarchical.
WEIGHT C
Performs a weighted regression. Weights cannot be used with optimal Box-Cox transformation. Column must be
numeric with nonnegative values. Length must match response column length.
An n x n matrix W is formed with the column of weights as its diagonal and zeros elsewhere. The regression
coefficients are estimated by:
REML
Specifies to use the restricted maximum likelihood estimation method to estimate the variance components.
MLE
Specifies to use the maximum likelihood method to estimate the variance components. Usually, you use the REML
method
225
Minitab 18 Statistical Software ANOVA
MAXITER K
Specifies the maximum number of iterations for the Newton-Raphson algorithm to estimate the variance
components.
CTOLERANCE K
Specifies the convergence tolerance value in K for the objective function. The objective function is -2 log likelihood.
ETOLERANCE K
Specifies the convergence tolerance value in K for the estimates of the variance components.
KENWARDROGER
Use Kenward-Roger approximation to estimate the denominator degrees of freedom for the fixed effect tests.
SATTERTHWAITE
Use Satterthwaite approximation to estimate the denominator degrees of freedom for the fixed effects.
DROWSTAT
Computes statistics that require row deletion:
• PRESS
• R-Sq(Pred)
• Cook's D
• DFITS
• Marginal deleted residuals
• Marginal conditional residuals
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
ITYPE K
Specifies the type of confidence interval.
TOLERANCE K [K]
Specifies the tolerance level for the collinearity between variables and whether a variable is constant. The first K
specifies the tolerance for collinearity. The default value is 1E−18. The second K is for the tolerance for whether
a variable is constant. The default value is 1E−21. Lower the tolerance to keep variables in the model that Minitab
would exclude with the default values.
226
Minitab 18 Statistical Software ANOVA
MEANS termlist
Calculates least squares means for specified terms. Terms must be in the model.
LOCATION [K...K]
Specifies that the analysis is to be performed on coded continuous predictors by subtracting a constant from
each predictor. If you do not specify any arguments, the mean of each predictor column is subtracted. K specifies
to subtract a constant. If you specify arguments, the number of arguments must match the number of continuous
predictors.
SCALE [K...K]
Specifies that the analysis is to be performed on coded continuous predictors by dividing each predictor by a
constant. If you do not specify any arguments, each predictor column is divided by the standard deviation. K
specifies to divide by a constant. If you specify arguments, the number of arguments must match the number of
continuous predictors.
LEVELS [K...K]
Specifies that the analysis is to be performed on coded continuous predictors by DOE-type coding for the specified
low and high levels K K…K K. The number of arguments must be twice the number of continuous predictors.
UNSTANDARDIZED
Specifies the analysis is to be performed on the original predictors.
Graphs
RTYPE K
Specifies the type of residual to plot with the graph subcommands.
CONDITIONAL
Specifies to plot residuals for conditional fits.
MARGINAL
Specifies to plot residuals for marginal fits.
GHISTOGRAM
Displays a histogram or individual value plot of the residuals, depending on the sample size.
GNORMAL
Displays a normal probability plot of the residuals.
227
Minitab 18 Statistical Software ANOVA
GFITS
Plots the residuals versus the fitted values.
GFOURPACK
Displays a layout of a histogram of the residuals, a normal probability plot of the residuals, residuals vs fitted
values, and residuals vs order of the data.
GORDER
Plots the residuals versus the order of the data. The row number for each data point is shown on the x-axis (for
example, 1 2 3 4...n).
GVARIABLE C...C
Displays a separate graph for the residuals versus each specified column.
Tables
NODEFAULT
Specifies that no default tables and graphs will be displayed.
TEXPAND
Displays the expanded version of the variance components table, the table of coefficients, the random effect
predictions table, the table of fits and diagnostics, and the table of conditional means.
TSIMPLE
Displays the simple version of the variance components table, the table of coefficients, the random effect predictions
table, the table of fits and diagnostics, and the table of conditional means.
TMETHOD
Displays the method table.
TFACTOR
Displays the name, number of levels, and the values for all categorical factors in your model.
TITERATION
Displays the iteration history table that shows the value of −2 log likelihood for each iteration of the variance
components.
TVARIANCE
Displays the variance component estimates and the tests of whether the components are 0.
TCOVARIANCE
Display the asymptotic variance-covariance matrix of the variance component estimates.
TFIXEDEFFECT
Display tests of the fixed factors in the model.
TSUMMARY
2 2
Display S, R , and R (adj). The expanded version of the table adds AICc and BIC.
TCOEFFICIENTS
Displays the table of coefficients for fixed factors and covariates. If you do not specify FULL or NOFULL, Minitab
uses the preferences set in Tools > Options > Linear Models > Display of Results.
228
Minitab 18 Statistical Software ANOVA
FULL
Displays the full set of coefficients for categorical predictors.
NOFULL
Displays only the linearly independent coefficients.
TRANDOM
Displays the Best Unbiased Linear Predictions (BLUP) and tests of whether the BLUP are 0.
TEQUATION
Displays the marginal fitted equation. Minitab will display up to 50 equations. If you do not specify SINGLE or
SEPARATE, Minitab uses the preferences set in Tools > Options > Linear Models > Display of Results.
SINGLE
If you want to see a single equation, rather than a separate equation for each factor level combination, use
SINGLE.
SEPARATE
To see the separate equations, use SEPARATE.
TCEQUATION
Displays the conditional fitted equation. Minitab will display up to 50 equations. If you do not specify SINGLE or
SEPARATE, Minitab uses the preferences set in Tools > Options > Linear Models > Display of Results.
SINGLE
If you want to see a single equation, rather than a separate equation for each factor level combination, use
SINGLE.
SEPARATE
To see the separate equations, use SEPARATE.
TDIAGNOSTICS K
Displays a table of diagnostics for the marginal fits and residuals. K = 0 displays diagnostics for only unusual
observations. K = 1 displays diagnostics for all observations.
TCONDITIONAL K
Displays a table of diagnostics for the conditional fits and residuals. K = 0 displays diagnostics for only unusual
observations. K = 1 displays diagnostics for all observations.
TMEANS
Displays the table of least squares means.
Storage
RESIDUALS C
Stores the residuals for the marginal fits.
SRESIDUALS C
Stores the standardized residuals for the marginal fits.
TRESIDUALS C
Stores the deleted t residuals for the marginal fits.
229
Minitab 18 Statistical Software ANOVA
FITS C
Stores the marginal fitted values.
CRESIDUALS C
Stores the conditional residuals.
CSRESIDUALS C
Stores the standardized residuals for the conditional fits.
CTRESIDUALS C
Stores the deleted t residuals for the conditional fits.
CFITS C
Stores the conditional fitted values.
HI C
Stores the leverages.
COOK C
Stores Cook's distance.
DFITS C
Stores DFITS.
COEFFICIENTS C
Stores the estimated coefficients.
BLUP C
Stores the best linear unbiased predictors.
XMATRIX M
Stores the design matrix for fixed effects terms.
ZMATRIX M
Stores the design matrix for random effects terms.
COVARIANCE M
Stores the variance-covariance matrix of the variance component estimates.
SMEANS C
Stores the least square means for the terms specified by MEANS.
VARCOMP C
Stores the estimates of the variance components in the same order as the terms appear after TERMS.
LOGLIKE C
Stores the −2 log likelihood values for all iterations.
FIXCOV M
Stores the variance-covariance matrix of the fixed parameters.
230
Minitab 18 Statistical Software ANOVA
If you have a general linear model or a mixed effects model stored in the worksheet, you can use COMPARE to
obtain multiple comparisons of means. Multiple comparisons of means allow you to examine which means are
different and to estimate by how much they are different.
Use MCONTROL when you are comparing treatments to a control. When this method is suitable, it is inefficient to use
the all-pairwise approach, because the all-pairwise confidence intervals will be wider and the hypothesis tests less
powerful for a given family error rate.
Some characteristics of the multiple comparison methods are summarized below. "Conservative" in this context indicates
that the true family error rate is less than the stated one.
231
Minitab 18 Statistical Software ANOVA
Display results
Minitab can present multiple comparison results in the following forms:
• TGROUPING displays the grouping information table that highlights the significant and non-significant comparisons.
• TMTEST displays the hypothesis test form which includes the adjusted p-values.
• GINTPLOT displays the interval plots of the confidence the intervals for the mean difference between two groups.
• Comparisons are not available for terms that contain or interact with random factors. Nesting is a form of interaction.
For a model with random factors, you can do comparisons if you use a mixed effects model with the Restricted
Maximum Likelihood estimation method (REML). Suppose the model contains A B C A*B, where both A and C are
random, and B is fixed. Because A*B is a term in the model, no multiple comparison results for B are available even
though B is a fixed factor. However, if the model does not include A*B, multiple comparison results are available
for B.
There is a special case for a balanced design that has two factors. Suppose the model contains A B A*B, where A
is random, and B is fixed. Even though A*B is in the model, you can perform multiple comparisons for B.
• Comparisons is disabled if you choose (1, 0) coding and the model is non-hierarchical. To enable Comparisons
for this case, choose (−1, 0, +1) coding or specify a hierarchical model.
Commands
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
PAIRWISE [termlist}
Specifies pairwise comparisons using the terms in the termlist. The terms in the termlist must be in the model.
You must use at least one of the following sub-subcommands with PAIRWISE:
TUKEY
BONFERRONI
SIDAK
FISHER
MCONTROL [termlist]
Specifies comparisons with a control using the terms in the termlist. The terms in the termlist must be in the
model.
You must use at least one of the following sub-subcommands with PAIRWISE:
DUNNETT
BONFERRONI
SIDAK
FISHER
232
Minitab 18 Statistical Software ANOVA
LEVELS C K...C K
You must use LEVELS with MCONTROL. Use LEVELS to provide a factor (C) with a control level (K). You must
specify a control level for each factor that you list in MCONTROL. If these levels are text or date/time, enclose
each with double quotation marks.
ALTERNATIVE K
ALTERNATIVE specifies the alternative hypothesis for comparisons to the control level.
GINTPLOT
Displays interval plots that represent the confidence interval for the mean difference between two groups. A
separate graph is created for each comparison.
TGROUPING
Displays the grouping information table for each comparison. This table highlights the significant and non-significant
comparisons for each selected comparison method.
TMTEST
Displays the multiple comparison test table. This table displays the hypothesis test form of the comparison output,
which includes the differences of the means, the numeric values for the confidences intervals, and the adjusted
p-values.
Use general MANOVA to perform multivariate analysis of variance (MANOVA) with balanced and unbalanced
designs, or if you have covariates. This procedure takes advantage of the data covariance structure to simultaneously
test the equality of means from different responses.
Calculations are done using a regression approach. A full rank design matrix is formed from the factors and
covariates and each response variable is regressed on the columns of the design matrix.
Factors can be crossed or nested, but they cannot be declared as random. You can work around this restriction
by specifying the error term to test model terms. Covariates can be crossed with each other or with factors, or
nested within factors. You can analyze up to 50 response variables with up to 31 factors and 50 covariates at one
time.
With the MANOVA subcommand, you can specify model terms for a custom multivariate test and designate the
error term in Error. Minitab performs four multivariate tests (see the MANOVA subcommand) for those terms.
This option is most useful when you have factors that you consider as random factors. Model terms that are
random or that are interactions with random terms may need a different error term than general MANOVA
supplies. You can determine the appropriate error term by entering one response variable with General Linear
233
Minitab 18 Statistical Software ANOVA
Model, choose to display the expected mean square, and determine which error term was used for each model
terms.
If you specify an error term, it must be a single term that is in the model. This error term is used for all requested
tests. If you have different error terms for certain model terms, enter each separately and exercise the general
MANOVA dialog for each one. If you do not specify an error term, Minitab uses MSE.
For more information, go to How to specify the model for GLM on page 1010 and How to enter data for ANOVA
and GLM on page 1002.
Model
If you specify an errorterm, it must be a single term that is in the model. MANOVA then uses this errorterm in all
tests. If you do not specify an errorterm, Minitab uses the error associated with MSE, as in the univariate case.
All four tests are based on two SSCP (sums of squares and cross products) matrices: H = the hypothesis matrix
and E = the error matrix.
If an error term is not specified on MANOVA, then the adjusted SSCP matrix is used for H and the SSCP matrix
associated with MSE is used for E. If an error term is specified on MANOVA, the sequential SSCP matrices associated
with H and E are used. Using sequential SSCP matrices guarantees that H and E are statistically independent.
COVARIATES C...C
The columns listed are used as covariates. If COVARIATES is used, it must be the first subcommand. This restriction
is needed to allow proper error checking. You may have up to 50 covariates.
Options
WEIGHTS C
Performs a weighted least squares fit. The weights must be greater than or equal to zero. An n x n matrix W is
formed with the column of weights as its diagonal and zeros elsewhere. The regression coefficients are calculated
by (X' WX)−1 (X' WY).
PREDICT
Computes the fitted Y's, or for given values of the predictors. PREDICT displays a table that contains the fitted
Y's, standard errors of the fitted Y's, a 95% confidence interval, and a 95% prediction interval. E...E may be a list
of values, one for each predictor, a list of columns, one for each predictor, or a mix of values and columns.
The prediction interval computed by PREDICT assumes a weight of 1. If you used the WEIGHT subcommand with
values other than 1, you should adjust the prediction interval values manually.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default
value of K is 95.
234
Minitab 18 Statistical Software ANOVA
PFITS C
Stores the fits.
PSDFITS C
Stores the estimated standard errors of the fits.
CLIMITS C C, ..., C C
Stores the lower and upper confidence limits.
PLIMITS C C, ..., C C
Stores the lower and upper prediction limits.
TOLERANCE K [K]
Use TOLERANCE to force Minitab to keep a predictor in the model which is either highly correlated with another
predictor or which is nearly constant. Lowering tolerance by giving very small argument values can prevent Minitab
from eliminating problematic predictor columns from the model.
K Description
First K 1 – R-squared, where R-squared is the value resulting from regressing one predictor on the
remaining predictors. The default is 1E – 18. If (1 – R-squared) is < (1E – 18), the predictor is
removed from the equation.
Second K The parameter for forcing in a variable which is nearly constant. The default is 2E – 21. If the
coefficient of variation of a predictor (the standard deviation / the mean) is < square root (2E
– 21), then the predictor is considered essentially constant and is removed from the equation.
Graphs
RTYPE K
Specifies the type of residual to plot with the graph subcommands.
GHISTOGRAM
Displays a histogram of the residuals.
GNORMAL
Displays a normal probability plot of the residuals.
235
Minitab 18 Statistical Software ANOVA
GFITS
Plots the residuals versus the fitted values.
GORDER [C]
Plots the residuals versus the order of the data. The row number for each data point is shown on the x-axis (for
example, 1 2 3 4...n). Optionally, specify a column C that defines the order.
GFOURPACK
Displays a layout of a histogram of the residuals, a normal probability plot of the residuals, residuals vs fitted
values, and residuals vs order of the data.
GVARIABLE C...C
Displays a separate graph for the residuals versus each specified column.
Results
MEANS termlist
Displays a table of adjusted means (sometimes called least squares means) corresponding to each term listed.
Terms listed on MEANS must also be listed on MANOVA. If more than one MEANS subcommand is specified,
only the last one is used.
EMS
Displays a table that contains expected mean squares, estimated variance components, and the error term (the
denominator) used in each exact F-test. If there is no exact F-test for a term, the expected mean squares allow
you to determine how to construct an approximate F-test using the subcommand TEST.
The estimates of the variance components are the usual unbiased analysis of variance estimates. They are obtained
by setting each calculated MS equal to its EMS. This gives a system of linear equations in the unknown variance
components. This system is then solved. Unfortunately, this method can result in negative estimates, which should
be set to zero. Minitab, however, prints the negative estimates because they sometimes indicate that the model
being fit is inappropriate for the data.
BRIEF K
Controls the amount of output with a value in K. You can also use BRIEF as a main command. When you use BRIEF
as a main command, it affects all other commands that use BRIEF to control the amount of output.
SSCP
Displays the hypothesis matrix, H, corresponding to each term specified by MANOVA, and the error matrix, E.
236
Minitab 18 Statistical Software ANOVA
EIGEN
Displays a table containing the eigenvalues and eigenvectors for the (nonsymmetric) matrix, E**-1 H. These are
the eigenvalues that are used to calculate the four MANOVA tests. A separate table is printed for each term
specified on MANOVA.
Note If an eigenvalue is repeated, then the corresponding eigenvectors are not unique. In this case, the eigenvectors Minitab displays
and those in books or other software might not agree. However, the MANOVA tests are always unique.
PARTIAL
Displays a matrix of partial correlations. These are the correlations among the residuals or, equivalently, the
correlations among the responses conditioned on the model. The formula for the matrix is W**-.5 E W**-.5, where
E is the error matrix and W has the diagonal of E as its diagonal and 0's elsewhere.
NOUNIVARIATE
Suppresses the univariate output. Only the multivariate output is displayed.
INTERACT terms
Used with SMEANS to store means for two-way interactions. List the model terms for which you calculate means
for level pairs. The means will be calculated by the order of terms and levels.
SMEANS C...C
Stores means for two-way interactions, main effects, and the overall mean. Use with INTERACT to store means
for two-way interactions. Specify a storage column for each response variable.
Storage
FITS C...C
Stores fitted values, using one column for each response.
RESIDUALS C...C
Stores residuals, using one column for each response variable. Residual = (response – fit).
SRESIDUALS C...C
Stores the standardized residuals, using one column for each response variable.
TRESIDUALS C...C
Stores the deleted Studentized residuals, using one column for each response variable.
HI C
Stores leverages.
COOKD C...C
Stores Cook's distance.
DFITS C...C
Stores the DFITS (also called DFFITS), using one column for each response.
XMATRIX M
Stores the design matrix corresponding to your model in M.
COEFFICIENTS C...C
Stores the coefficients for a model, using one column for each response. These are the same coefficients that are
printed under BRIEF 3. They correspond to the design matrix stored by XMATRIX. Thus, if M1 contains the design
matrix and C1 the coefficients, then M1 times C1 gives the fitted values.
237
Minitab 18 Statistical Software ANOVA
You can analyze up to 50 response variables and up to 9 factors on one NESTED command. The columns specified
before the equal sign are the responses, and the columns after the equal sign are the factors. You can also have
replicates. One row then corresponds to one observation, giving the value of each response and the level of each
factor for that observation. Factor levels can be any real numbers. They do not need to be consecutive or in any
special order.
If you do specify UNSTACKED, VARTEST performs tests for equal variances with data from each factor level in a
different column C...C.
UNSTACKED
Indicates that data for each factor level are in different columns.
Options
CONFIDENCE K
Specifies the confidence level for the Bonferroni simultaneous confidence intervals and also the significance level
(denoted by α or alpha) for the multiple comparison intervals, and the tests. The default is 95, which corresponds
to a confidence level of 95% and an α = 1 – (95 / 100) = 0.05.
USEBARTLETT
Specifies to use the test based on the normal distribution instead of the multiple comparisons method and Levene's
method. If you have only 2 factor levels, then Minitab performs the F-test. If you have 3 or more factor levels,
then Minitab performs Bartlett's test.
The F-test and Bartlett's test are accurate only for normally distributed data. Any departure from normality can
cause these tests to yield inaccurate results. However, if the data conform to the normal distribution, then the
F-test and Bartlett's test are typically more powerful than either the multiple comparisons method or Levene's
method.
238
Minitab 18 Statistical Software ANOVA
Graphs
GINTERVAL
Displays a graphical summary that includes the multiple comparison intervals for standard deviations and test
results by default. The multiple comparison intervals are not confidence intervals of the individual standard
deviations. The multiple comparison intervals are only useful for comparing the population standard deviations.
If USEBARTLETT is used, then GINTERVAL displays Bonferroni confidence intervals of the standard deviations.
GINDPLOT
Displays individual value plot.
GBOXPLOT
Displays a boxplot.
Results
NODEFAULT
Minitab displays all output tables by default. You do not have to enter the subcommands. If you enter NODEFAULT,
then each table is only displayed if you enter the specific subcommand.
TMETHOD
Displays the method table which includes the null hypothesis, the alternative hypothesis, and the significance
level (denoted by α or alpha).
TBONFERRONI
Displays the table of Bonferroni simultaneous confidence intervals for the standard deviations of each factor level.
TTEST
Displays the test table which includes the p-values for the hypothesis tests.
Storage
STDEVS C
Stores the standard deviation of each factor level in column C.
VARIANCES C
Stores the variance of each factor level in column C.
SBONFERRONI C C
Stores Bonferroni confidence limits for the standard deviation of each factor level. The lower limits are stored in
the first column C and the upper limits is stored in the second column C.
SMCI C C
Stores the limits of the multiple comparisons intervals for each factor level. The lower limits are stored in the first
column C and the upper limits is stored in the second column C.
SFPVALUE C
Stores the p-value for Bartlett's test (or the F-test if there are only 2 factor levels).
SLPVALUE C
Stores the p-value for Levene's test.
239
Minitab 18 Statistical Software ANOVA
SMPVALUE C
Stores the p-value for the multiple comparison test.
INTPLOT (C...C) * C
Use to plot means and confidence intervals for one or more variables. An interval plot illustrates both a measure
of central tendency and the variability of the data.
By default, Minitab displays confidence intervals, but you can change the display type to standard error bars using
the INTBAR subcommand.
The data must be numeric or date/time. The categorical grouping data can be numeric, date/time, or text.
INTPLOT C...C displays a separate interval plot for each graph variable.
INTPLOT (C...C) * C displays a separate graph for each C on the left, with an interval for each category of the C on
the right.
The following table shows a few of the possible ways to generate interval plots.
INTPLOT 'Sales' 'Advertis'. Two graphs: interval plots of Sales and of Advertis
Scale
AXLABEL: Session subcommand for customizing graph axis labels on page 841
GAPWIDTH and COFFSET: Session subcommands for the space between clusters and items in a cluster on page 868
MGRID, NOGRID, and NOMGRID: Session subcommands for controlling the grid on a graph on page 869
NOFRAME: Session subcommand for suppressing lines and labels on a graph on page 898
REFERENCE: Session subcommand for specifying the axis and location of reference lines on a graph on page 913
SCALE: Session subcommand for customizing the axes and ticks of a graph on page 917
TRANSPOSE and NOTRANSPOSE: Session subcommands for transposing the x- and y-axis on a graph on page 931
TSHOW: Session subcommand for specifying the level of tick labels that are displayed on page 932
Labels
FOOTNOTE: Session subcommand for adding a footnote to a graph on page 865
ILABEL: Session subcommand for labeling individual values on a boxplot or interval plot on page 874
INTLAB: Session subcommand for labeling interval bar endpoints on an interval plot on page 880
240
Minitab 18 Statistical Software ANOVA
MEALAB: Session subcommand for labeling means on a boxplot or an interval plot on page 891
NODTITLE, NODSUBTITLE, and NODFOOTNOTE: Session subcommands for suppressing titles, subtitles, and footnotes
on a graph on page 897
NOSEPSUBTITLE: Session subcommand for subtitles on separate pages of a multiple graph on page 898
Data view
BAR: Session window subcommand for representing data values with bars on page 843
CMEAN: Session subcommand for connecting means with lines on a boxplot on page 849
CMEDIAN: Session subcommand for connecting means with lines on a boxplot on page 851
INDIVIDUAL: Session subcommand for displaying a symbol for each individual data value on a boxplot or an
individual value plot on page 876
INTBAR: Session subcommand for displaying a vertical line with horizontal lines at the endpoints of the confidence
interval for the mean on page 878
JITTER and NOJITTER: Session subcommands for randomly offsetting data points to reveal overlapping points on
page 883
MEAN: Session subcommand for displaying symbol for each mean on a boxplot, interval plot, or individual value
plot on page 893
MEDIAN: Session subcommand for displaying a symbol for each median on a boxplot, interval plot, or individual
value plot on page 894
SOFFSET: Session subcommand for offsetting points from the center on page 923
Multiple graphs
GROUP: Session subcommand for specifying categorical variables for grouping on page 869
OVERLAY: Session subcommand for combining graphs specified in a multiple graph command into a single graph
on page 902
SAME: Session subcommand for specifying that one or more axes are the same for multiple graphs on page 916
SEPARATE: Session subcommand for placing groups in separate graph windows when you use a paneling variable
on page 920
Data options
FREQUENCY: Session subcommand for using a frequency column for a graph on page 867
INCLUDE and EXCLUDE: Session subcommands for including or excluding rows on a graph on page 876
NOEMPTY and NOMISS: Session subcommands for excluding missing data from graphs on page 898
241
Minitab 18 Statistical Software ANOVA
WTITLE: Session subcommand for specifying the title of the graph window on page 933
Annotation
ELLIPSE: Session subcommand for constructing an ellipse from points on a graph on page 862
LINE: The session subcommand for constructing a line from points on a graph on page 888
MARKER: Session subcommand for displaying a symbol at specified points on a graph on page 890
POLYGON: Session subcommand for constructing a polygon from points on a graph on page 904
RECTANGLE: Session subcommand for constructing a rectangle from points on a graph on page 912
Regions
DATA: Session subcommand for controlling the data region within the figure region on page 855
FIGURE: Session subcommand for controlling the figure region within the graph region on page 863
LEGEND and NOLEGEND: Session subcommands for controlling the legend on a graph on page 885
GRAPH: Session subcommand for controlling the graph region fill and border line on page 868
MAIN generates a plot that uses data means. After you have fit a model, use FACPLOT on page 258 to generate
plots that use fitted means.
Data means are the raw response variable means for each factor level combination whereas fitted means use least
squares to predict the mean response values of a balanced design. Therefore, the two types of means are identical
for balanced designs but can be different for unbalanced designs. While you can use raw data with unbalanced
designs to obtain a general idea of which main effects may be evident, it is generally good practice to use the
fitted means to obtain more precise results.
Enter the factors on the main command line. The factor columns may be numeric or text, and may contain any
values. The levels do not need to be in any special order. When the factor column is text, the first entry (row 1) is
level 1, the next entry that is different is level 2, and so on.
RESPONSE C
Use RESPONSE to enter raw response data. Then, the main effects are calculated based on the means of the
data.
242
Minitab 18 Statistical Software ANOVA
YMIN K
Specifies the y-axis minimum value. Making the minimum and maximum values the same is very useful when
you are comparing several main effects plots of related data.
YMAX K
Specifies the y-axis maximum value. Making the minimum and maximum values the same is very useful when
you are comparing several main effects plots of related data.
TITLE "title"
Specifies a title for the graph. If you do not specify a title, Minitab uses a default title.
GSAVE "file_name"
GSAVE K
Saves the graph in a file.
The default file name is Minitab.MGF. You can specify a custom file name in double quotation marks
("file_name"), or as a stored text constant (K). You can also use any of the following subcommands to save
the graph in a different graphics format.
Some graph commands—for example, HISTOGRAM C1 C2 C3—generate more than one graph. If you include
the GSAVE subcommand with such a command, Minitab saves multiple files. Minitab gives each file a different
file name. Minitab uses the first five characters of the name you specify, then appends a number (001, 002,
and so on), for up to 500 files.
If you try to overwrite an existing file using GSAVE, Minitab displays a message. The message asks whether
you want to replace the existing file. If you use GSAVE with no file name for multiple graphs, Minitab displays
the message only for the first graph. Then, Minitab replaces the other graphs automatically. You can use
REPLACE or NOREPLACE to bypass the message. Bypassing the message is especially useful in a macro. After
you save the file, you can view the graph with GVIEW.
REPLACE
Bypasses the message that asks whether you want to replace the existing file. If you use both REPLACE
and NOREPLACE, Minitab uses the last subcommand.
NOREPLACE
Bypasses the message that asks whether you want to replace the existing file. If a file with the same
name exists, Minitab displays an error and stops the command or quits the macro. If you use both
REPLACE and NOREPLACE, Minitab defaults to the last subcommand.
JPEG
JPEG color
PNGB
PNG black and white
PNGC
PNG color
PNGH
PNG high color
TIFB
TIF black and white
243
Minitab 18 Statistical Software ANOVA
TIF
TIF color
BMPB
BMP black and white
BMPC
BMP color
BMPH
BMP high color
GIF
GIF
EMF
EMF
RESOLUTION K
Saves the graph at a resolution of K dots per inch.
INTERACT generates a plot that uses data means. After you have fit a model, use FACPLOT on page 258 to generate
plots that use fitted means.
Data means are the raw response variable means for each factor level combination whereas fitted means use least
squares to predict the mean response values of a balanced design. Therefore, the two types of means are identical
for balanced designs but can be different for unbalanced designs. While you can use raw data with unbalanced
designs to obtain a general idea of which main effects may be evident, it is generally good practice to use the
fitted means to obtain more precise results.
Enter the columns containing the factors as the arguments to the main command. The factor columns may be
numeric or text, and may contain any values. The levels do not need to be in any special order. When the factor
column is text, the first entry (row 1) is level 1, the next entry that is different is level 2, and so on.
You must use the RESPONSE subcommand with a column argument. When you specify RESPONSE and a response
column, Minitab goes through each two factor pair in sequential order and calculates the means of all the responses
for each unique combination of values in the two factors.
RESPONSE C
Specifies the column containing the response data.
244
Minitab 18 Statistical Software ANOVA
The RESPONSE version of the interaction plot does not require any model to be fit. It is useful for preliminary
exploratory analysis in order to get a preliminary look at which two factor interactions appear to be significant.
It can also be used after a model has been fit, provided the design is balanced.
FULL
Specifies to use the full interaction matrix when more than two factors are specified instead of the default
display of the upper right portion of the matrix. In the full matrix, the transpose of each plot in the upper
right displays in the lower left portion of the matrix. The full matrix takes longer to display than the half
matrix.
YMIN K
Specifies the y-axis minimum value. Making the minimum and maximum values the same is very useful when
you are comparing several main effects plots of related data.
YMAX K
Specifies the y-axis maximum value. Making the minimum and maximum values the same is very useful when
you are comparing several main effects plots of related data.
TITLE "title"
Specifies a title for the graph. If you do not specify a title, Minitab uses a default title.
GSAVE "file_name"
GSAVE K
Saves the graph in a file.
The default file name is Minitab.MGF. You can specify a custom file name in double quotation marks
("file_name"), or as a stored text constant (K). You can also use any of the following subcommands to save
the graph in a different graphics format.
Some graph commands—for example, HISTOGRAM C1 C2 C3—generate more than one graph. If you include
the GSAVE subcommand with such a command, Minitab saves multiple files. Minitab gives each file a different
file name. Minitab uses the first five characters of the name you specify, then appends a number (001, 002,
and so on), for up to 500 files.
If you try to overwrite an existing file using GSAVE, Minitab displays a message. The message asks whether
you want to replace the existing file. If you use GSAVE with no file name for multiple graphs, Minitab displays
the message only for the first graph. Then, Minitab replaces the other graphs automatically. You can use
REPLACE or NOREPLACE to bypass the message. Bypassing the message is especially useful in a macro. After
you save the file, you can view the graph with GVIEW.
REPLACE
Bypasses the message that asks whether you want to replace the existing file. If you use both REPLACE
and NOREPLACE, Minitab uses the last subcommand.
NOREPLACE
Bypasses the message that asks whether you want to replace the existing file. If a file with the same
name exists, Minitab displays an error and stops the command or quits the macro. If you use both
REPLACE and NOREPLACE, Minitab defaults to the last subcommand.
JPEG
JPEG color
PNGB
PNG black and white
245
Minitab 18 Statistical Software ANOVA
PNGC
PNG color
PNGH
PNG high color
TIFB
TIF black and white
TIF
TIF color
BMPB
BMP black and white
BMPC
BMP color
BMPH
BMP high color
GIF
GIF
EMF
EMF
RESOLUTION K
Saves the graph at a resolution of K dots per inch.
246
Minitab 18 Statistical Software DOE
DOE
Screening Designs
DSDESIGN: Session command for creating a definitive screening
design
DSDESIGN K
Creates a definitive screening design with K factors. You can then use REPLICATES to replicate points and BLOCKS
to add block.
The design summary and design table can be displayed. The design table is displayed under BRIEF 3. Factors are
denoted by the letters A, B, C, D, E, F, G, H, J, K, ... , vv, ww, xx.
Quotation marks around column names are required. If you use a subcommand more than one time, DSDESIGN
uses the last instance of the subcommand.
REPLICATES K
Replicates each point K times.
The following example generates a definitive screening design with 4 factors and 2 replicates. Thus, there
are a total of 26 runs in this experiment.
DSDESIGN 4;
REPLICATES 2.
BLOCKS K
Specifies the number of blocks in K. If your design includes blocks, and the number of blocks equals the
number of replicates, each replicate is a separate block. You can include multiple replicates in a block. Each
block has the same number of replicates.
LEVELS K K, ..., K K
With LEVELS K K, ..., K K, you list one pair of arguments for each factor. The first K should be the low level,
and the second K should be the high level. Minitab calculates the center points as the value that is half way
between the low and high levels.
The following example stores 0 for the low level of A, 10 for the high level, and 5 for the center point; 100
for the low level of B, 102 for the high level, and 101 for the center point; .2 for the low level of C, .3 for the
high level, and 2.5 for the center point.
NAME C1='A' C2='B' C3='C'
DSDESIGN 3;
LEVELS 0 10 100 102 .2 .3.
With LEVELS K K, ..., K K, you can set levels to be text data. The arguments that define text data must be
enclosed in double quotation marks. For example, if factor B is whether a catalyst is present or absent, you
can use the following:
NAME C1='A' C2='B' C3='C'
DSDESIGN 3;
LEVELS 0 10 "absent" "present" .2 .3.
247
Minitab 18 Statistical Software DOE
RANDOMIZE [K]
Randomizes the runs in the design matrix. If you specify blocks, randomization is done separately within each
block, and then the blocks are randomized.
K is the base for the random number generator and can take any positive integer as an argument. To always
get the same ordering of the rows, create the same design and randomize the runs with the same base. For
more information, go to BASE on page 87.
FNAME K...K
Specifies the names of the factors. You must enter as many arguments as number of factors. The arguments
must be enclosed in double quotation marks.
BRIEF K
Controls the amount of output.
You can also use BRIEF as a main command. When you use BRIEF as a main command, it affects all other
commands that use BRIEF to control the amount of output.
The two constants on PBDESIGN specify a design. The first K is the number of factors. The second K is the number
of runs. Factor columns can be text or numeric.
To see the designs that Minitab generates, go to Plackett-Burman designs on page 1020. A design is based on the
number of runs, from 8 to 48 and always a multiple of 4. Therefore, the second K on PBDESIGN must be a multiple
of 4. The number of factors must be less than the number of runs. If you don't include the second K, Minitab sets
the number of runs to the smallest possible value for the specified number of factors.
To store your design for additional analysis, use the XMATRIX and LEVELS subcommands. After you generate and
enter the responses to the experiment, you can analyze your design using FFACTORIAL on page 273. You can also
use the stored columns of data to obtain a data collection form. For more information, go to %FORM on page
259.
CENTER K
Adds up to 50 center points to the design. If the design is blocked, the center points are divided equally
between the blocks. If K is not a multiple of the number of blocks, then each of the last few blocks has one
less point than the other blocks.
248
Minitab 18 Statistical Software DOE
REPS K
Specifies up to 50 replicates of each point. REPS does not replicate center points.
The following example generates a Plackett-Burman design that has 2 factors and 8 base runs. Thus, there
are a total of 16 runs in this experiment.
PBDESIGN 2 8;
REPS 2.
RBLOCK
Specifies blocks on replicates. Each set of replicate points are placed in a separate block. No arguments are
taken.
LEVELS
Use LEVELS with XMATRIX to specify values for the levels of each factor. The level values can be text or
numeric.
When Minitab creates the design, the levels are in coded form, -1 for the low level, +1 for the high level, and
0 for a center point. Minitab always displays the design output in this coded form. However, you can use
LEVELS to change the values that are stored by XMATRIX.
LEVELS K K, ..., K K
With LEVELS K K, ..., K K, you list one pair of arguments for each factor. The first K should be the low
level and the second K should be the high level. When you add center points with CPBLOCK, Minitab
calculates the center points as the value that is half way between the low and high levels. The following
example stores 0 for the low level of A, 10 for the high level, and 5 for the center point. 100 for the low
level of B, 102 for the high level, and 101 for the center point; .2 for the low level of C, .3 for the high
level, and 2.5 for the center point.
NAME C1='A' C2='B' C3='C'
PBDESIGN 2 8;
CENTER 2;
LEVELS 0 10 100 102;
XMATRIX 'A' 'B'.
With LEVELS K K, ..., K K, you can set levels to be text data. The arguments that define text data must be
enclosed in double quotation marks. In the following example, factor B is whether a catalyst is present
or absent. Because you use CENTER 2 to add center points with a text factor, Minitab creates pseudo
center points.
NAME C1='A' C2='B' C3='C'
PBDESIGN 2 8;
CPBLOCK 2;
LEVELS 0 10 "absent" "present";
XMATRIX 'A' 'B'.
LEVELS C
With LEVELS C, the level values must be numeric. Put the level values in a column, in the same order as
if they were listed on the subcommand. Then, specify the level column on the LEVELS subcommand.
RANDOMIZE
Randomizes the runs in the design matrix. If you specify blocks, randomization is done separately within each
block and then the blocks are randomized.
K is the base for the random number generator and can take any integer as an argument. To get the same
ordering of the rows, create the same design and randomize the runs with the same base. For more
information, go to BASE on page 87.
249
Minitab 18 Statistical Software DOE
XMATRIX C...C
Stores the factors in the specified columns to form the design matrix. Minitab also stores a blocking column,
even if you did not block your design. If you use RANDOMIZE, then the rows of the design matrix are
randomized in the same way they are randomized on the Session window output.
You can also use the stored columns to create a data collection form. For more information, go to %FORM
on page 259. You can also create a simple form to record your responses by printing the columns stored by
XMATRIX. Use the FORMAT subcommand to print.
You can use the design matrix stored by XMATRIX with Minitab commands such as FFACTORIAL, RSREG,
GLM and REGRESS. Remember to use XMATRIX when you generate your design so that you will not have to
re-enter the factors when you analyze the data.
PTTYPE C
Stores the type code of each point. Type 0 indicates center points. Type 1 indicates a vertex or the corners
of the design. The default is no storage.
CTPT C
Stores the type code of center points. Type 0 indicates center points. Type 1 indicates a vertex or the corners
of the design. The default is no storage.
SORDER C C
Stores the order of your design. Two columns are written to the worksheet—the first column contains the
standard order, the second column contains the randomized (or run) order for the design. When you use
the RANDOMIZE subcommand, Minitab stores the design in run order. When you do not use the RANDOMIZE
subcommand, Minitab stores the design in standard order (also called Yates' order).
After you create these columns, you can use them with the SORT command to order your design within the
worksheet in either standard order or run order.
BRIEF K
Controls the amount of output. You can also use BRIEF as a main command. When you use BRIEF as a main
command, it affects all other commands that use BRIEF to control the amount of output.
The factor columns can be numeric or text, and can contain any values. The levels do not need to be in any special
order. When the factor column is text, Minitab uses the first entry (row 1) for the low level of the factor and the other
entry for the high level. To change this default order, use the LEVEL subcommand. When you include center points in
the model, Minitab tests for curvature.
250
Minitab 18 Statistical Software DOE
You can display effects plots and residual plots. You can store the residuals, fitted values, and many other diagnostics
for further analysis. You can use extra text on the command and subcommand lines only after a #. Quotation marks
around column names that are one word long are optional.
For information about how Minitab handles missing data, go to Missing values in factorial, response surface, and
mixture designs on page 1016.
RESPONSE C
Specifies the column that contains the response variable in C. The column must be numeric or date/time.
BLOCK C (optional)
Specifies the column that contains the blocking information in C. Include the blocking column together with
TERMS to make a model that considers blocks.
COVARIATES C...C
Specifies columns that include covariates in C...C. Include the covariate columns with terms to make a model that
considers the covariates. Covariates are fit first, the blocks second, and then all other terms. You can have up to
50 covariates.
LEVELS K K,..., K K
LEVELS C
Specifies the uncoded factor levels for each factor, with K for the low level and K for the high level, or in C. For
each factor, the list or column must contain two numerical values. Use LEVELS to change the default order of
levels that Minitab uses. You can use a column only when all of the levels are continuous or all of the levels are
categorical.
INUNIT K
Specifies whether the design is in coded form or uncoded form.
TERMS termlist
Specifies the terms to include in the model. Only continuous predictors can repeat in a single term. Nested terms
are not allowed. The model can be nonhierarchical.
Options
WEIGHTS C
Specifies a numeric column (C) that contains weights to use in weighted regression analysis. The same weights
are used for all responses. If different responses require different weights, then SCREEN will need to be run as
many times as there are different weights.
Usually, the weights are the reciprocal of the variances of the responses. The leverages stored by HI are affected
by weights.
251
Minitab 18 Statistical Software DOE
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
ITYPE K
Specifies the type of confidence interval.
BOXCOX [K]
Transforms each variable or group to follow a normal distribution using the lambda value in K. K must be between
–5 and +5. If you do not specify K, then Minitab finds the optimal lambda. By default, Minitab rounds the optimal
value.
To use the exact lambda, change the setting in Tools > Options > Linear Models > Display of Results.
Minitab cannot calculate the optimal lambda for stepwise regression. So you must specify a lambda value for
BOXCOX if you use STEPWISE, FORWARD, or BACKWARD.
NOROUNDING
Specifies no rounding of calculated lambda parameter.
MEANS termlist
Calculates the least squares means for the terms that you specify in the termlist. You can use the following
commands to display and store the least squares means.
TMEANS
Displays the least squares means for the specified terms.
SMEANS
Stores the least squares means for the specified terms.
BSMEANS
If you transformed the data, stores the least squares means for the specified terms.
TOLERANCE K
Specifies the value in K above which Minitab removes highly correlated predictors and nearly constant predictors.
Requires that Minitab retain a factor in the model that is either highly correlated with a different factor or that is
almost constant. Lowering tolerance by giving very small argument values can prevent Minitab from eliminating
problematic predictor columns from the model.
Collinearity 1 – R2, where R2 is the value that results from regressing one predictor on the remaining
predictors. If (1 – R2) is < (K), then the predictor is removed from the equation.
Almost constant If the coefficient of variation of a predictor (the standard deviation / the mean) is <
square root (K), then the predictor is considered essentially constant and is removed
from the equation.
252
Minitab 18 Statistical Software DOE
Stepwise regression
FINFORMATION, STEPWISE, FORWARD, and BACKWARD perform a stepwise regression procedure to fit the model. No
arguments are needed for these subcommands.
FINFORMATION
Specifies a stepwise model selection procedure that uses forward information criteria selection. Use AICCORRECTED
or BICRITERION to specify which information criterion to use to select the final model. If you do not specify a
criterion, Minitab uses AICCORRECTED.
The forward information criteria procedure adds the term with the lowest p-value to the model at each step. If
you do not include subcommands about hierarchy, FINFORMATION adds multiple terms at a step to maintain
model hierarchy, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
With these settings, additional terms can enter the model in 1 step. Minitab calculates the information criteria for
each step.
Once Minitab fits the full model or a model that leaves 1 degree of freedom for error, the procedure stops. Minitab
displays the results of the analysis for the model with the minimum value of the selected information criterion,
either the corrected Akaike's Information Criterion (AICc) or the Bayesian Information Criterion (BIC).
AICCORRECTED
Specifies the use of the corrected Akaike's Information Criterion (AICc) to select the final model.
BICRITERION
Specifies the use of the Bayesian Information Criterion (BIC) to select the final model.
STEPWISE
Specifies a stepwise model selection procedure that uses both forward selection and backward elimination. If you
do not include subcommands about hierarchy, STEPWISE and FORWARD add multiple terms at a step to maintain
model hierarchy, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
FORWARD
Specifies a stepwise model selection procedure that uses forward selection. If you do not include subcommands
about hierarchy, STEPWISE and FORWARD add multiple terms at a step to maintain model hierarchy, the equivalent
of the following:
HIERARCHICAL; ALLTERMS; ALWAYS; MULTIPLE.
BACKWARD
Specifies a stepwise model selection procedure that uses backward elimination. Removes a single term at each
step and maintains a hierarchical model, the equivalent of the following:
HIERARCHICAL; ALLTERMS; ALWAYS.
AENTER K
Specifies the alpha level at which a term is entered into the model. The default is 0.15 for STEPWISE and 0.25
for FORWARD.
AREMOVE K
Specifies the alpha level at which a term is removed from the model. The default is 0.15 for STEPWISE and
0.10 for BACKWARD. For STEPWISE, K must be greater than or equal to K for AENTER.
ENTER termlist
Specifies the terms that are contained in the starting model for STEPWISE. The ENTER termlist must be a
subset of the TERMS termlist or in the default term list in the design.
253
Minitab 18 Statistical Software DOE
FORCE termlist
Specifies the terms to be forced in the model. The FORCE termlist must be a subset of the TERMS termlist
or in the default term list in the design.
NOHIERARCHICAL
Specifies that the model selection procedure does not consider hierarchy.
HIERARCHICAL
Maintains a hierarchical model in stepwise regression. In a hierarchical model, if a higher-order term is
included, all lower-order terms that comprise the higher-order term also appear in the model. For example,
a model that includes the interaction term A*B*C is hierarchical if it includes the following main effects and
lower-order interactions: A, B, C, A*B, A*C, and B*C.
CATONLY
Specifies that only the categorical terms in the model have to be hierarchical.
ALLTERMS
Specifies that both categorical and continuous terms have to be hierarchical.
ATEND
Specifies that the final step of the stepwise procedure adds terms to make the model hierarchical.
ALWAYS
Specifies that the model is hierarchical at every step.
SINGLE
Specifies that only one term can enter the model at each step. So a higher-order term can enter
the model only if the terms that comprise the term are already in the model. For example, the
algorithm does not consider the addition of A*B unless A and B are already in the model.
BACKWARDS does not use SINGLE or MULTIPLE because terms only exit the model.
MULTIPLE
Specifies that multiple terms can enter the model at each step. So a higher order term can enter
the model, and the terms that comprise the term enter the model at the same time. For example,
if A*B is the most statistically significant term, A*B enters the model. At the same time, A and B
enter the model if those terms are not in the model already.
BACKWARDS does not use SINGLE or MULTIPLE because terms only exit the model.
Graphs
GEFFECTS
Displays a normal probability plot of the effects or the standardized effects. Minitab labels the effects on the
probability plot that are considered significant. The alpha level is 1 – the confidence level that follows CONFIDENCE,
unless you use stepwise selection. For forward selection, the alpha level is the level that follows AENTER. For
backward and stepwise selection, the alpha level is the level that follows AREMOVE.
GHALF
Displays a half normal probability plot of the effects or standardized effects. Minitab labels the effects on the half
normal plot that are considered significant. The alpha level is 1 – the confidence level that follows CONFIDENCE,
unless you use stepwise selection. For forward selection, the alpha level is the level that follows AENTER. For
backward and stepwise selection, the alpha level is the level that follows AREMOVE.
254
Minitab 18 Statistical Software DOE
GPARETO
Displays a Pareto chart of the absolute effects. GPARETO draws a vertical reference line on the plot at the margin
of error. This plot lets you to look at both the magnitude and the importance of an effect at the same time. The
alpha level is 1 – the confidence level that follows CONFIDENCE, unless you use stepwise selection. For forward
selection, the alpha level is the level that follows AENTER. For backward and stepwise selection, the alpha level is
the level that follows AREMOVE.
GALLEFFECTS K
Specifies to include the model terms and the terms that are not in the model up to order K on the plots. K can
only be 1 or 2. When K = 2, Minitab includes square terms as well as 2-factor interactions. If you specify a stepwise
method, Minitab ignores K and shows the terms in the candidate list.
GMODEL
Specifies that only the terms that are in the model are on the plots.
RTYPE K
Specifies the type of residual to plot with the graph subcommands.
GHISTOGRAM
Displays a histogram of the residuals.
GNORMAL
Displays a normal probability plot of the residuals.
GFITS
Plots the residuals versus the fitted values.
GORDER [C]
Plots the residuals versus the order of the data, or versus the order specified in C. The row number for each data
point is shown on the x-axis (for example, 1 2 3 4...n).
GFOURPACK [C]
Displays four residual plots—a histogram of the residuals, a normal probability plot of the residuals, the residuals
versus fitted the values, and the residuals versus the order of the data, or versus the order specified in C—in one
graph window.
GVARIABLE C...C
Plots the residuals versus variables. Displays a separate graph for the residuals versus each specified column.
Results
The following subcommands specify what is displayed in the results.
NODEFAULT
Specifies that no default tables or graphs are displayed.
255
Minitab 18 Statistical Software DOE
TEXPAND
Displays the expanded versions of the ANOVA table, the table of coefficients, the model summary table, and the
table of unusual observations.
TSIMPLE
Displays the simple versions of the ANOVA table, the table of coefficients, the model summary table, and the
table of unusual observations.
TMETHOD
Displays the method table.
TMSDETAILS
Displays the type of stepwise procedure and the alpha values to enter and/or remove a predictor from the model.
If you do not specify FULL or NOFULL, then Minitab uses the settings in Tools > Options > Linear Models >
Stepwise.
FULL
Displays the coefficients, the p-values, Mallows' Cp, and the model summary statistics for each step of the
procedure.
NOFULL
Does not display the coefficients, the p-values, Mallows' Cp, and the model summary statistics for each step
of the procedure.
TEQUATION
Displays the regression equation table. If the model is hierarchical, the equation is in uncoded units. If the model
is nonhierarchical, the equation is in coded units.
TCOEFFICIENT
Displays the table of coefficients. If you do not specify FULL or NOFULL, then Minitab uses the settings in Tools >
Options > Linear Models > Display of Results.
FULL
Displays the full set of coefficients for categorical predictors.
NOFULL
Displays only the linearly independent coefficients.
TSUMMARY
2
Displays the summary of model table, which includes the R statistics and S. The expanded version of the table
includes the prediction sum of squares (PRESS), the corrected Akaike's Information Criterion (AICc) and the Bayesian
Information Criterion (BIC).
TANOVA
Displays the ANOVA table. The expanded version of the table includes the sequential sums of squares and the
percent contribution to the total sum of squares.
TDIAGNOSTICS [K]
Displays the table of diagnostics. The expanded version of the table includes the standard error of the fit, the
confidence interval for the fit, the deleted residual, the leverage, Cook's D, and DFITS.
256
Minitab 18 Statistical Software DOE
TALIAS [K]
Displays the alias table up to order K. One line is displayed for each term in the model, with a list of all terms, up
to order K, that are aliased with the model term. If K is omitted, then Minitab uses the default rule of FFDESIGN:
all interactions for 2 to 6 factors, up to three-way interaction for 7 to 10 factors, and two-way interactions for
more than 10.
TMEANS
Displays the table of least squares means for all combinations of the factor levels that you specify in MEANS.
Storage
The following subcommands specify what is stored in the worksheet.
FITS C
Stores the fitted values.
RESIDUALS C
Stores the residuals (response – fit) in C.
SRESIDUALS C
Stores the standardized residuals.
TRESIDUALS C
Stores the deleted Studentized residuals in C.
HI C
Stores the leverage values.
COOK C
Stores Cook's distance values, using one column for each response.
DFITS C
Stores DFITS (also called DFFITS), using one column for each response.
COEFFICIENTS C
Stores the coefficients that are included in the coefficients table in C.
The coefficients are based on coded levels (–1, 0, +1), not on the actual levels in the data set. A coefficient is
always half the value of the corresponding effect.
XMATRIX M
Stores the design matrix. The first column is a column of ones for the constant term. Next, there is one column
for each covariate. Next, if the design was blocked into k blocks, there are (k – 1) columns. Next, there is one
column for each factor, using –1 for the low level, 0 for a center point, and +1 for the high level. Next, there is
one column for each interaction in the model. The column for an interaction is the product of all the columns that
correspond to the factors that are contained in that interaction.
If FFACTORIAL or VFACTORIAL removed some of the interactions that you specified in your model, the interactions
are not included in the stored design matrix. The columns in XMATRIX match the coefficients that are displayed
and stored.
BCRESP C
Stores the Box-Cox transformation of the response.
257
Minitab 18 Statistical Software DOE
BFITS C
Stores the back-transformed fits after the Box-Cox transformation in C.
BSMEANS C
If you use a Box-Cox transformation, BSMEANS stores the means for the back-transformed response in C.
SMEANS C
Stores the least squares means from MEANS in C.
If you use a Box-Cox transformation, SMEANS stores the means for the transformed response in C.
FACPLOT C
Displays factorial plots for the model associated with the response variable in the specified column To create this
graph, you need to specify a model. To produce an interaction plot, you must have two or more variables.
These plots can illustrate how a response variable relates to one or more variables. You can produce two types
of factorial plots.
• Use a main effects plot to compare fitted means or data means across levels of one or more variables.
• Use an interactions plot to assess the effects of one variable at levels of another variable. An interactions plot
displays the fitted means for a level of a variable with the level of a second variable held constant.
Although you can use these plots to display the effects, be sure to evaluate significance by looking at the effects
in the analysis of variance table.
FACTORS C...C
Specifies the variables to display in both the main effect and interaction plots. You must specify 2 or more
variables to generate an interaction plot.
GMAIN
GMAIN displays the main effect plot.
GINT
GINT displays the interactions plot.
FULL
Use FULL to display both interaction plots for each pair of categorical variables, such as Predictor 1 by
Predictor 2 and Predictor 2 by Predictor 1. Sometimes you can identify interactions more easily when
you examine both plots.
LOWER
Use LOWER to display one version of each interaction plot.
GMODEL (default)
GMODEL display plots for only terms that are in the model and listed in FACTORS. For purposes of a main
effect plot, a variable is in the model if the model includes any terms that involve only that variable, e.g. A,
A*A, or A*A*A. For purposes of an interaction plot, the interaction of two variables is in the model if the
model includes any terms that involve both variables, e.g. A*B, A*B*B.
258
Minitab 18 Statistical Software DOE
GALL
GALL displays plots for all terms involving variables on the FACTORS subcommand.
TITLE "title"
Specifies a title for the graph. If you do not specify a title, Minitab uses a default title.
Factorial Designs
%FORM: Session command for creating a data collection form for
a 3-factor design
%FORM C C C
Creates a data collection form for any design that has three factors in C C C, and, optionally, a blocking variable.
This macro file, FORM.MAC, is available in the Macros folder in the main Minitab folder. You don't need to use a
word processor or editor to create it. You can modify this macro file to print a form for other designs.
BLOCK C...C
Specifies that the blocking variable is in C...C.
FDESIGN is similar to FFDESIGN, but FDESIGN has arbitrary levels and no fractional designs.
REPS K
Replicates each point K times. Specifies up to 50 replicates of each point. REPS does not replicate center
points.
The following example generates a full factorial that has 3 factors and 2 observations per cell. Thus, there
are a total of 48 runs in this experiment.
FDESIGN 4 3 2;
REPS 2.
BLOCK C
Specifies a blocking variable column (C). You can specify up to 64 blocks. The blocking variable column can
contain numeric data or text data, and can contain any value. The levels do not need to be in any special
order. When the blocking column is text, the first entry (row 1) is block 1, the next entry that is different is
block 2, and so on. When the blocking column is numeric, the smallest value is block 1, the second smallest
value is block 2, and so on. The blocking column is stored as the first column on XMATRIX. If you use BLOCK
without REPS, Minitab stores a column of 1s.
259
Minitab 18 Statistical Software DOE
RBLOCK
Specifies blocks on replicates. Each set of replicate points are placed in a separate block. No arguments are
taken.
LEVELS K K,..., K K
LEVELS C
Specifies factor levels for each factor.
Use LEVELS with XMATRIX to specify values for the levels of each factor. The level values can be text or
numeric. If you do not use the subcommand, the levels are the integers 1, 2, 3, and so on. Minitab always
displays the design output in this coded form. However, you can use LEVELS to change the values that are
stored by XMATRIX.
With LEVELS K K, ..., K K, you can set levels to be text or numeric data. The arguments that define text data
must be enclosed in double quotation marks. List a pair of arguments for each factor. The first K is the low
level. The second K is the high level.
With LEVELS C, the level values must be numeric. Put the level values in a column, in the same order as if
they were listed on the subcommand. Then, specify the level column on the LEVELS subcommand.
RANDOMIZE [K]
Randomizes the runs in the design matrix. If you specify blocks, randomization is done separately within each
block and then the blocks are randomized.
The optional K is the base for the random number generator and can take any integer as an argument. To
get the same ordering of the rows, create the same design and randomize the runs with the same base. For
more information, go to BASE on page 87.
SORDER C C
Stores the run order in C and the standard order in C.
Use SORDER with the RANDOMIZE subcommand to store the order of your design. Two columns are written
to the worksheet: the first column contains the standard order, the second column contains the randomized
(or run) order for the design. When you use the RANDOMIZE subcommand, Minitab stores the design in run
order. When you do not use the RANDOMIZE subcommand, Minitab stores the design in standard order.
After you create these columns, you can use them in conjunction with the SORT command to order your
design within the worksheet in either standard order or run order.
XMATRIX C...C
Stores the design matrix in C...C.
Stores the factors in the specified columns to form the design matrix. Minitab also stores a blocking column,
even if you did not block your design. If you used RANDOMIZE, then the rows of the design matrix are
randomized are they are in the Session window output.
You can also use the stored columns to create a data collection form. For more information, go to %FORM
on page 259. You can also create a simple form to record your responses on by printing the columns stored
by XMATRIX. Use the FORMAT subcommand to print.
You can use the design matrix stored by XMATRIX with Minitab commands, such as FFACTORIAL, RSREG,
GLM, and REGRESS. Remember to use XMATRIX when you generate your design so that you will not have
to re-enter the factors when you analyze the data.
260
Minitab 18 Statistical Software DOE
PTTYPE C
Stores the type of each point in C. The default is no storage.
BRIEF K
Controls the amount of output. You can also use BRIEF as a main command. When you use BRIEF as a main
command, it affects all other commands that use BRIEF to control the amount of output.
Minitab has a catalog of designs. For a summary of the catalog, go to Designs generated by FFDESIGN on page
984. The two constants (K) on FFDESIGN specify a design from that catalog. The first K is the number of factors,
and the second K is the number of runs. You can then use REPS to replicate points, FOLD the design, and add
center points (CPBLOCK). You may also ADD additional factors, provided the total number is at most 15.
The design generators, resolution, and alias structure are displayed. The design matrix is displayed under BRIEF
3. The defining relation is displayed under BRIEF 4. Factors are denoted by the letters A, B, C, D, E, F, G, H, J, K, L,
M, N, O, P on the output and in the subcommands BLOCKS, ADD, and FOLD.
The alias structure that is displayed by default depends on the number of factors. You can use ALIAS to change
what is displayed.
Quotation marks around column names are required. If you use a subcommand more than one time, FFDESIGN
uses the last instance of the subcommand.
261
Minitab 18 Statistical Software DOE
REPS K
Replicates each point K times. Specifies up to 50 replicates of each point. REPS does not replicate center
points.
The following example generates a full factorial design that has 4 factors and 2 observations per cell. Thus,
there are a total of 32 runs in this experiment.
FFDESIGN 4 16;
REPS 2.
BLOCKS
Specifies the number of blocks in K, or specifies the terms to use as block generators in termlist.
If you use the subcommand ADD, you must also specify your own block generators. You cannot use an
integer with BLOCKS when you specify ADD. Minitab cannot determine good block generators in this case.
No extra text is allowed on the BLOCKS line, except after a #.
Blocking a design can reduce its resolution. Let r1 = the resolution before blocking. Let r2 = the length of the
shortest term that is confounded with blocks. Then the resolution after blocking is the smaller of r1 and ( r2
+ 1).
BLOCKS K
With BLOCKS K, you specify the number of blocks that you want, from 2 to 99. This number must evenly
divide the total number of runs, excluding center points (those given on FFDESIGN times those given
on REPS). Minitab then chooses an appropriate design.
If your design has replicates and you specify an integer on BLOCKS, then Minitab attempts to put
replicates in different blocks. The exact rule is a bit complicated.
BLOCKS termlist
With BLOCKS termlist, you specify terms to use as block generators.
CPBLOCK K
Adds center points to the design.
262
Minitab 18 Statistical Software DOE
• When all factors are numeric, Minitab adds K center points as follows:
◦ If the design is not blocked, then Minitab adds K center points to the design.
◦ If the design is blocked, then Minitab adds K center points to each block.
• When all factors are text, you cannot use CPBLOCK to add center points.
• When factors are both numeric and text, the design does not have a true center. In this case, center points
are called pseudo-center points, and Minitab adds K center points as follows:
◦ If the design is not blocked, then Minitab adds K center points for each combination of the levels of
the text factors.
◦ If the design is blocked, then Minitab adds K center points for each combination of the levels of the
text factors to each block.
For example, consider an unblocked 2**3 design, factors A and C are numeric. Factor B is text that indicates
whether a catalyst is absent or present. The LEVELS subcommand assigns text data for the levels of factor
B.
NAME C1='A' C2='B' C3='C'
FFDESIGN 3 8;
CPBLOCK 3;
LEVELS 0 10 "absent" "present" .2 .3;
XMATRIX 'A' 'B' 'C'.
Factor B has 2 levels: present or absent. With CPBLOCK 3, Minitab adds a total of 2 x 3 = 6 center points,
three points for the low level of factor B and 3 for the high level. The six points are as follows:
5 present .25
5 present .25
5 present .25
5 absent .25
5 absent .25
5 absent .25
Next, consider a blocked 2**5 design where 3 factors are text. There are 2 x 2 x 2 = 8 combinations of text
levels. If you use CPBLOCK 2 and BLOCKS 2, then Minitab adds 8 x 2 = 16 pseudo-center points to each
of the 2 blocks.
LEVELS
Use LEVELS with XMATRIX to specify values for the levels of each factor. The level values can be text or
numeric.
When Minitab creates the design, the levels are in coded form, –1 for the low level, +1 for the high level, and
0 for a center point. Minitab always displays the design output in this coded form. However, you can use
LEVELS to change the values that are stored by XMATRIX.
LEVELS K K, ..., K K
With LEVELS K K, ..., K K, you list one pair of arguments for each factor. The first K should be the low
level, and the second K should be the high level. When you add center points with CPBLOCK, Minitab
calculates the center points as the value that is half way between the low and high levels.
263
Minitab 18 Statistical Software DOE
The following example stores 0 for the low level of A, 10 for the high level, and 5 for the center point;
100 for the low level of B, 102 for the high level, and 101 for the center point; .2 for the low level of C,
.3 for the high level, and 2.5 for the center point.
NAME C1='A' C2='B' C3='C'
FFDESIGN 3 8;
CPBLOCK 2;
LEVELS 0 10 100 102 .2 .3;
XMATRIX 'A' 'B' 'C'.
With LEVELS K K, ..., K K, you can set levels to be text data. The arguments that define text data must be
enclosed in double quotation marks. For example, if factor B is whether a catalyst is present or absent,
you can use the following:
NAME C1='A' C2='B' C3='C'
FFDESIGN 3 8;
CPBLOCK 2;
LEVELS 0 10 "absent" "present" .2 .3;
XMATRIX 'A' 'B' 'C'.
Because you use CPBLOCK 2 to add center points with a text factor, Minitab creates pseudo-center
points. For more information, see the CPBLOCK subcommand.
LEVELS C
With LEVELS C, the level values must be numeric. Put the level values in a column, in the same order as
if they were listed on the subcommand. Then, specify the level column on the LEVELS subcommand.
FOLD [factor...factor]
Folds the design on the specified factors. If you don't include factors, Minitab folds the design on all factors.
The signs on the factors that you specify are switched. The signs on the remaining factors are not switched.
These rows for the non-specified factors are then appended to the end of the design matrix, which doubles
the number of runs.
A B C
– – +
+ – –
– + –
+ + +
+ – +
– – –
+ + –
– + +
Folding is a way to reduce confounding. If you fold on one factor, say A, then A and all its two-factor
interactions are free from other main effects and two-factor interactions. If you fold on all factors, then all
main effects are free from all two-factor interactions.
264
Minitab 18 Statistical Software DOE
When you fold, the defining relation is usually shortened. Specifically, any word in the defining relation that
has an odd number of the letters on which you folded the design is omitted. If you fold a design and the
defining relation is not shortened, then the folding adds replicates, but it does not reduce confounding. In
this case, Minitab displays an error message.
If you fold a design that is blocked, the same block generators are used for the folded design as for the
unfolded design.
FRACTION K
Specifies which fraction of a fractional design to use. The default fraction is called the principal fraction. This
is the fraction where all signs are positive. Consider the following example.
FFDESIGN 5 8;
FRACTION 3.
A full design with 5 factors requires 32 runs. With just 8 runs, a one-fourth fraction is used. You can use any
of the four possible fractions of the design. Minitab numbers them in standard order (also called Yates' order)
using the design generators, as follows.
1 D = –AB E = –AC
2 D = AB E = –AC
3 D = –AB E = AC
4 D = AB E = AC
The default fraction is called the principal fraction. This is the fraction where all signs are positive. FRACTION
3 specifies the third fraction. This is the one with design generators D = –AB, E = AC.
FRACTION applies to all the factors: the ones specified on the command line and any you added with ADD.
If you use both FRACTION and ADD, you cannot use minus signs in the design generators that are listed on
ADD. Actually, in this case, minus signs on ADD are not useful.
Sometimes a design contains points that are impractical to run. Choosing an appropriate fraction can avoid
these points. For example, suppose you could not run the design in the example with all five factors set at
their high level. The principal fraction contains this point, but the third fraction does not.
RANDOMIZE [K]
Randomizes the runs in the design matrix. If you specify blocks, randomization is done separately within each
block, and then the blocks are randomized.
K is the base for the random number generator and can take any positive integer as an argument. To always
get the same ordering of the rows, create the same design and randomize the runs with the same base. For
more information, go to BASE on page 87.
XMATRIX C...C
Stores the factors in the specified columns to form the design matrix. Minitab also stores a blocking column,
even if you did not block your design. If you used RANDOMIZE, then the rows of the design matrix are
randomized as they are on the output in the Session window.
You can also use the stored columns to create a data collection form. For more information, go to %FORM
on page 259. You can also create a simple form on which to record your responses by printing the columns
that are stored by XMATRIX. Use the FORMAT subcommand to PRINT.
You can use the design matrix stored by XMATRIX with Minitab commands, such as FFACTORIAL, RSREG,
GLM, and REGRESS. Remember to use XMATRIX when you generate your design so that you will not have
to reenter the factors when analyzing the data.
265
Minitab 18 Statistical Software DOE
SORDER C C
Use SORDER with the RANDOMIZE subcommand to store the order of your design. Two columns are written
to the worksheet: the first column contains the standard order, the second column contains the randomized
(or run) order for the design. When you use the RANDOMIZE subcommand, Minitab stores the design in run
order. When you do not use the RANDOMIZE subcommand, Minitab stores the design in standard order.
After you create these columns, you can use them with the SORT command to order your design in either
standard order or run order.
TERMS C
Use TERMS with XMATRIX to store information about your design in a column. This information helps you
easily analyze your data with FFACTORIAL on page 273. The column that you specify is the location for the
stored values.
You don't have to look at the column of TERMS, or know what it contains. You only need to specify it in
FFACTORIAL when you do your analysis. But, if you want, you can look at the column of TERMS, edit it, or
even create it manually, without using FFDESIGN. The structure of the column of terms is as follows.
The remaining entries in C are for the interaction terms. There is one entry for each line in the alias table,
encoding the first interaction on the line. The factors are indicated by integers, using A = 1, B = 2, C = 3, ...,
P = 15. To get an interaction term, concatenate the integers for the factors in that term, in numerical order.
For example, CEG is the interaction 3*5*7, or 357, and 41115 is 4*11*15, or DLP. The code 735 is not allowed
because factors must be in numerical order.
When an interaction starts with a two-digit factor, then you make the code negative. For example, the
interaction L*M*P, or 11*13*15, is coded –111315. This method makes reading the codes easier and eliminates
some cases where there is ambiguity.
266
Minitab 18 Statistical Software DOE
3 40 41 42 43 12 13 23
The first number, 3, indicates that there are 3 factors. The second number, 40, indicates that the blocking
variable is in C40. The new three numbers are the storage columns, C41- C43, for the three factors. The
remaining numbers are the interactions in the model: 12 = AB, 13 = AC, 23 = BC.
6 0 1 2 3 4 5 6 12 13 14 15 16 24 26 124 126
factors blocks A B C D E F AB AC AD AE AF BD BF ABD ABF
BRIEF K
Controls the amount of output.
You can also use BRIEF as a main command. When you use BRIEF as a main command, it affects all other
commands that use BRIEF to control the amount of output.
ALIAS K
Specifies the highest-order interaction to print in the alias table. For example, ALIAS 3 displays single factors,
and two- and three-way interactions.
Important A large K with a large number of factors might take a very long time to calculate.
If you use BLOCKS with ADD, you must specify your own block generators. You cannot use an integer with
BLOCKS when you specify ADD. Minitab cannot determine good block generators for a user-specified design.
267
Minitab 18 Statistical Software DOE
You can have 2-7 factors in a split-plot experiment. The number of hard-to-change factors that you can have
depends on the number of factors. For 2 factors, you can have only 1 hard-to-change factor. For 3 factors, you
can have 1 or 2 hard-to-change factors. For 4, 5, 6, or 7 factors, you can have 1, 2, or 3 hard-to-change factors.
PLOTS K K
Specifies K whole plots with K subplots.
WREPLICATES K
Replicates the base design by multiplying the number of whole plots by K.
SREPLICATES K
Replicates the subplots within each whole plot K times.
RBLOCK
Specifies blocks on whole block replicates. Each replicate of the base design is placed in a separate block.
No arguments are taken.
LEVELS
Specifies the values for the levels of each factor. The level values can be text or numeric.
When Minitab creates the design, the levels are in coded form, –1 for the low level and +1 for the high level.
Minitab always displays the design output in this coded form. However, you can use LEVELS to change the
values that are stored by XMATRIX.
LEVELS K K, ..., K K
With LEVELS K K, ..., K K, you can set levels to be text or numeric data. The arguments that define text
data must be enclosed in double quotation marks. List a pair of arguments for each factor. The first K
should be the low level. The second K should be the high level.
268
Minitab 18 Statistical Software DOE
LEVELS C
With LEVELS C, the level values must be all numeric or all text. First, put the level values in a column, in
the same order as if they were listed on the subcommand. Then, specify this column on the LEVELS
subcommand.
FRACTION K
Specifies which fraction of a fractional design to use with K. K must be a positive integer.
A full design that has 5 factors requires 32 runs. With only 8 runs, a ¼-fraction is used. For full factorial, there
are no fractions, so no value of K is legal. The legal values for a ½-fractional design are 1 and 2. The legal
values for a ¼-fraction are 1, 2, 3, and 4.
SPDESIGN 5 1;
PLOT 2 8;
FRACTION 3.
As in FFDESIGN, the fractions are numbered according to the signs that are used in the defining relation.
The default fraction is called the principal fraction. This is the fraction for which all signs are positive in the
defining relation.
Sometimes a design contains points that are impractical to run. Choose an appropriate fraction to avoid
these points.
RANDOMIZE [K]
Randomizes the runs in the design matrix. If you specify blocks, randomization is done separately within each
block and then the blocks are randomized.
K is the base for the random number generator and can take any integer as an argument. To get the same
ordering of the rows, create the same design and randomize the runs with the same base. For more
information, go to BASE on page 87.
XMATRIX C...C
Stores the factors in the specified columns to form the design matrix. Minitab also stores a blocking column,
even if you did not block your design. If you used RANDOMIZE, then the rows of the design matrix are
randomized in the same way they are randomized on the output displayed in the Session window.
You can also use the stored columns to create a data collection form. For more information, go to %FORM
on page 259. You can also create a simple form to record your responses on by printing the columns stored
by XMATRIX. Use the FORMAT subcommand to print.
You can use the design matrix stored by XMATRIX with Minitab commands, such as FFACTORIAL, RSREG,
GLM and REGRESS. Remember to use XMATRIX when you generate your design so that you will not have to
re-enter the factors when you analyze the data.
SORDER C...C
Use SORDER with the RANDOMIZE subcommand to store the order of your design. Two columns are written
to the worksheet—the first column contains the standard order, the second column contains the randomized
269
Minitab 18 Statistical Software DOE
(or run) order for the design. When you use the RANDOMIZE subcommand, Minitab stores the design in run
order. When you do not use the RANDOMIZE subcommand, Minitab stores the design in standard order
(also called Yates' order).
PTTYPE C
Stores point type (all 1's) in column C. Only corner points (denoted by 1) are created in 2-level split-plot
designs.
BRIEF K
Controls the amount of output. BRIEF can also be used as a main command. When you use BRIEF as a main
command, it affects all other commands that use BRIEF to control the amount of output.
ALIAS K
Specifies the highest order interaction to display in the alias table. For example, ALIAS 3 displays single factors,
and 2- and 3-way interactions.
Important A large K along with a large number of factors might take a very long time to calculate.
The two constants on PBDESIGN specify a design. The first K is the number of factors. The second K is the number
of runs. Factor columns can be text or numeric.
To see the designs that Minitab generates, go to Plackett-Burman designs on page 1020. A design is based on the
number of runs, from 8 to 48 and always a multiple of 4. Therefore, the second K on PBDESIGN must be a multiple
of 4. The number of factors must be less than the number of runs. If you don't include the second K, Minitab sets
the number of runs to the smallest possible value for the specified number of factors.
To store your design for additional analysis, use the XMATRIX and LEVELS subcommands. After you generate and
enter the responses to the experiment, you can analyze your design using FFACTORIAL on page 273. You can also
use the stored columns of data to obtain a data collection form. For more information, go to %FORM on page
259.
270
Minitab 18 Statistical Software DOE
CENTER K
Adds up to 50 center points to the design. If the design is blocked, the center points are divided equally
between the blocks. If K is not a multiple of the number of blocks, then each of the last few blocks has one
less point than the other blocks.
REPS K
Specifies up to 50 replicates of each point. REPS does not replicate center points.
The following example generates a Plackett-Burman design that has 2 factors and 8 base runs. Thus, there
are a total of 16 runs in this experiment.
PBDESIGN 2 8;
REPS 2.
RBLOCK
Specifies blocks on replicates. Each set of replicate points are placed in a separate block. No arguments are
taken.
LEVELS
Use LEVELS with XMATRIX to specify values for the levels of each factor. The level values can be text or
numeric.
When Minitab creates the design, the levels are in coded form, -1 for the low level, +1 for the high level, and
0 for a center point. Minitab always displays the design output in this coded form. However, you can use
LEVELS to change the values that are stored by XMATRIX.
LEVELS K K, ..., K K
With LEVELS K K, ..., K K, you list one pair of arguments for each factor. The first K should be the low
level and the second K should be the high level. When you add center points with CPBLOCK, Minitab
calculates the center points as the value that is half way between the low and high levels. The following
example stores 0 for the low level of A, 10 for the high level, and 5 for the center point. 100 for the low
level of B, 102 for the high level, and 101 for the center point; .2 for the low level of C, .3 for the high
level, and 2.5 for the center point.
NAME C1='A' C2='B' C3='C'
PBDESIGN 2 8;
CENTER 2;
LEVELS 0 10 100 102;
XMATRIX 'A' 'B'.
With LEVELS K K, ..., K K, you can set levels to be text data. The arguments that define text data must be
enclosed in double quotation marks. In the following example, factor B is whether a catalyst is present
or absent. Because you use CENTER 2 to add center points with a text factor, Minitab creates pseudo
center points.
NAME C1='A' C2='B' C3='C'
PBDESIGN 2 8;
CPBLOCK 2;
LEVELS 0 10 "absent" "present";
XMATRIX 'A' 'B'.
LEVELS C
With LEVELS C, the level values must be numeric. Put the level values in a column, in the same order as
if they were listed on the subcommand. Then, specify the level column on the LEVELS subcommand.
271
Minitab 18 Statistical Software DOE
RANDOMIZE
Randomizes the runs in the design matrix. If you specify blocks, randomization is done separately within each
block and then the blocks are randomized.
K is the base for the random number generator and can take any integer as an argument. To get the same
ordering of the rows, create the same design and randomize the runs with the same base. For more
information, go to BASE on page 87.
XMATRIX C...C
Stores the factors in the specified columns to form the design matrix. Minitab also stores a blocking column,
even if you did not block your design. If you use RANDOMIZE, then the rows of the design matrix are
randomized in the same way they are randomized on the Session window output.
You can also use the stored columns to create a data collection form. For more information, go to %FORM
on page 259. You can also create a simple form to record your responses by printing the columns stored by
XMATRIX. Use the FORMAT subcommand to print.
You can use the design matrix stored by XMATRIX with Minitab commands such as FFACTORIAL, RSREG,
GLM and REGRESS. Remember to use XMATRIX when you generate your design so that you will not have to
re-enter the factors when you analyze the data.
PTTYPE C
Stores the type code of each point. Type 0 indicates center points. Type 1 indicates a vertex or the corners
of the design. The default is no storage.
CTPT C
Stores the type code of center points. Type 0 indicates center points. Type 1 indicates a vertex or the corners
of the design. The default is no storage.
SORDER C C
Stores the order of your design. Two columns are written to the worksheet—the first column contains the
standard order, the second column contains the randomized (or run) order for the design. When you use
the RANDOMIZE subcommand, Minitab stores the design in run order. When you do not use the RANDOMIZE
subcommand, Minitab stores the design in standard order (also called Yates' order).
After you create these columns, you can use them with the SORT command to order your design within the
worksheet in either standard order or run order.
BRIEF K
Controls the amount of output. You can also use BRIEF as a main command. When you use BRIEF as a main
command, it affects all other commands that use BRIEF to control the amount of output.
272
Minitab 18 Statistical Software DOE
The factor columns can be numeric or text, and can contain any values. The levels do not need to be in any special
order. When the factor column is text, Minitab uses the first entry (row 1) for the low level of the factor and the other
entry for the high level. To change this default order, use the LEVEL subcommand. When you include center points in
the model, Minitab tests for curvature.
You can display effects plots and residual plots. You can store the residuals, fitted values, and many other diagnostics
for further analysis. You can use extra text on the command and subcommand lines only after a #. Quotation marks
around column names that are one word long are optional.
For information about how Minitab calculates the model, go to Calculations for FFACTORIAL on page 979.
For information about how Minitab handles missing data, go to Missing values in factorial, response surface, and
mixture designs on page 1016.
RESPONSE C
Specifies the column that contains the response variable in C. The column must be numeric or date/time.
COVARIATES C...C
Specifies columns that include covariates in C...C. Include the covariate columns with terms to make a model that
considers the covariates. Covariates are fit first, the blocks second, and then all other terms. You can have up to
50 covariates.
BLOCKS C (optional)
Specifies the column that contains the blocking information in C. Include the blocking column together with
TERMS to make a model that considers blocks.
CTPT C
Specifies the column that identifies which design points are center points in C. Include the center point column
together with TERMS to make a model that tests for curvature.
TERMS termlist
Specifies the terms to include in the model. Only continuous predictors can repeat in a single term. Nested terms
are not allowed. The model can be nonhierarchical.
INUNIT K
Specifies whether the design is in coded form or uncoded form.
273
Minitab 18 Statistical Software DOE
LEVELS K K,..., K K
LEVELS C
Specifies the uncoded factor levels for each factor, with K for the low level and K for the high level, or in C. For
each factor, the list or column must contain two numerical values. Use LEVELS to change the default order of
levels that Minitab uses. You can use a column only when all of the levels are continuous or all of the levels are
categorical.
Options
WEIGHTS C
Specifies a numeric column (C) that contains weights to use in weighted regression analysis. The same weights
are used for all responses. If different responses require different weights, then FFACTORIAL will need to be run
as many times as there are different weights.
Typically, the weights are the reciprocal of the variances of the responses. In this case, weights are based on the
fitted variances calculated and stored by VFACTORIAL. You can use other weight variables.
CONFIDENCE K
Specifies a confidence level. For example, for a 90% confidence level, enter CONFIDENCE 90. The default value
of K is 95.
ITYPE K
Specifies the type of confidence interval.
BOXCOX [K]
Transforms each variable or group to follow a normal distribution using the lambda value in K. K must be between
–5 and +5. If you do not specify K, then Minitab finds the optimal lambda. By default, Minitab rounds the optimal
value.
To use the exact lambda, change the setting in Tools > Options > Linear Models > Display of Results.
Minitab cannot calculate the optimal lambda for stepwise regression. So you must specify a lambda value for
BOXCOX if you use STEPWISE, FORWARD, or BACKWARD.
MEANS termlist
Calculates the least squares means for the terms that you specify in the termlist. You can use the following
commands to di