SOME MTB COMMANDS BY ROBERTS
For additional help, send me an email note to .... Dennis Roberts
The list below assumes you have access to at least Minitab Release 10. For help on any of these, pull down the HELP
menu ... click on Contents ... and click on Session Commands. Then, scroll down the list until you reach the
command/subcommand of interest ... click on it and get additional help. Here are two examples of what you would see
if you did that ... with DESCRIBE and REGRESSION.
NOTE: The standard form for help is to show you what the command would have to be at the session window after the
MTB> prompt ... with any subcommand possibilities, followed usually with more information about the output and
possibly an example. Also, the help indicates how you would access the feature using the pull down menus and/or
dialog boxes. I am assuming with this handout that you are using the Session window and are at the MTB> prompt. I
have found this to be the most efficient way to use Minitab AFTER you get familiar with the commands.
1. DESCRIBE
Command Syntax
DESCRIBE C...C <---- Command line ... which columns to use?
BY C <---- Subcommand line ... describe by subgroups
[EXTRA! There is an undocumented subcommand DECI that will let you get varying decimal place output from
describe ... ie, DECI 4. will yield 4 places] Displays descriptive statistics for each column. The number of nonmissing
values (N), the number of missing values (N*), the mean, median, trimmed mean (TRMEAN) standard deviation,
standard error of the mean (SEMEAN), minimum, maximum, first quartile (Q1) and third quartile (Q3) are calculated.
See also:
Stat > Basic Statistics > Descriptive Statistics <---- Pull down menu way
STATS
%DESCRIBE
2. REGRESS
Command Syntax
REGRESS C on K predictors C...C <---- Y and #predictors and predictors
regr c3 2 c1 c4 ... for example
NOTE: There are MANY subcommands for regress ... RESI will store the errors or residuals, FITS will store predicted
values, and PRED will make Minitab subsitute some X value(s) into the equation and solve for Y' ... these are just a
couple.
Performs simple, polynomial, and multiple
regression using the least squares method. You
can predict future observations, and store the
residuals, fitted values, and many other
diagnostics for further analysis (see Residual
Analysis and Regression Diagnostics).
To plot a fitted regression line with simple
regression see %FITLINE.
To fit a model without a constant (intercept) see
NOCONSTANT.
The command BRIEF can be used to control the
amount of output.
See also:
Stat > Regression > Regression <---- Menu approach
COMMAND/SUBCOMMAND LIST
This list is alphabetical. In general, but not always, I will say what the command does ... and give a simple version of
the command. Again ... PLEASE SEE THE HELP SCREENS FROM THE HELP MENU ... TO GET MORE
INFORMATION AND OPTIONS WITH THE COMMANDS/SUBCOMMANDS. This is particularly true for
graphics ... and relevant subcommands ... they can be a BIT tricky!
C = Command; S = Subcommand; SG = Subcommand for graphics; M = Macro
ANOVA [C] Does multifactor analysis of variance.
MTB> anova c3=c1 c2 c1*c2
AOVO [C] Does one way analysis of variance when data are in separate columns
MTB> aovo c1-c3
AREA [SG] Shades in areas under points on graphs
BOXP [C] Makes a boxplot of the data.
MTB> boxp c4
CDF [C] Cumulative distribution function ... you input baseline score and MTB gives
you area UP TO that score. Subcommand specifies distribution.
MTB> cdf 110;
SUBC> normal 100 15.
CENTER [C] Converts column of data into z scores
MTB> cent c3, c10 <---- Makes z scores of c3 and puts in c10
CHIS [C] Does chisquare contingency analysis on 2 dimensional frequency table
MTB> chis c3 c4
CODE [C] Recodes from 1 value to another
MTB> code (3)2 c3 c4 <---- Takes all 3s in c3, makes them into
2s ... and puts new data set in c4
CONNECT [SG] Connects points to make a line
COPY [C] Copies data from one place to another
MTB> copy k1-k5 c10 <---- Takes constants k1-k5 and puts
them into column c10
CORR [C] Does Pearson correlations on columns
MTB> corr c3-c6 <---- Does all pairs of rs ... c3c4, c4c6, etc.
COVA [C] Does covariances
MTB> cova c3-c6
DATA Line for entering data for commands READ and SET
DESC [C] Prints out many descriptive stats on columns specified
MTB> desc c4-c6
%DESCRIBE [M] Does more extensive desc but, on only 1 column
DOTP [C] Makes a dotplot of columns
MTB> dotp c2 c3;
SUBC> same. <---- Puts c2 and c3 on same X axis
END For commands READ and SET ... tells MTB you have finished data
ERASE [C] Erases columns ... BE CAREFUL!!!!!!!!!
MTB> eras c3 c4 <---- c3 and c4 are HISTORY!
EXEC [C] Runs a macro file
MTB> exec fast' <---- Runs fast' macro
%FITLINE [M] Plots regression line
MTB> %fitline c2 c1 <---- Y in c2 and X in c1
FOOTNOTE [SG] Puts footnote on graph
SUBC> footnote Graph based on 1995 data'.
GPRO [C] Switches to professional graphics (this is default setting)
GRID [SG] Makes grid lines on graphs
SUBC> grid 1.
GSAVE [SG] Saves a graph
SUBC> gsave a:pict'. <---- Saves graph as pict' on drive a:
GSTD [C] Goes into standard (old) graphics mode
MTB> gstd
HELP [C] Gets help on requested item
MTB> help describe
HIST [C] Makes histogram
MTB> hist c5
INFO [C] Gets information on the worksheet
MTB> info
%INTERACT [M] Makes an interaction plot in analysis of variance
MTB> %interact c2 c3; <---- Cols for ind var codes
SUBC> responses c4. <---- Dep var data
%INTPLOT [C] Makes confidence interval plot for groups in 1 way anova
MTB> %intplot c3 c4 <---- 1st c is dep var, 2nd c is groups
INVCDF [C] Converts specified percentile rank to baseline X value
MTB> invcdf .7; <---- Input PR as a decimal!
SUBC> norm 100 15. <---- Tells MTB what distribution
LET [C] Does various arithmetic operations
MTB> let c5 = c1 + c2 + c3 <---- Adds c1-c3, puts in c5
LINE [SG] Connects points on line
SUBC> line c2 c3. <---- X comes first, then Y
%MAIN [M] Plots group means in 1 way analysis of variance
MTB> %main c5; <---- Group codes column
SUBC> responses c6. <---- Dep var data in this column
%MARGPLOT [M] Makes scatterplot with freq distributions for X and Y
MTB> %margplot c3 c4
MATRIXPLOT [C] Makes multiple scatterplots on same graph
MTB> matrixplot c3-c5
MEAN [C] Finds mean for ONE column
MTB> mean c3
MEDIAN [C] Finds median for ONE column
MTB> median c3
NAME [C] Gives names to columns
MTB> name c3='Data'
ONEWAY [C] Does one way analysis of variance
MTB> onew c3 c4; <---- Dep var data in c3, group codes in c4
SUBC> tukey. <---- Does Tukey followup test
PDF [C] Probability density function ... finds relative height at X point
MTB> pdf 89; <---- Finds rel height at X point of 89
SUBC> norm 100 15. <---- Specify what dist you are using
PLOT [C] Makes scatterplot
MTB> plot c3*c4
PRINT [C] Makes on screen list of data
MTB> print c3-c5
PROJECT [SG] Makes projection lines from plotted points on graph
RANDOM [C] Generates random data from distributions
MTB> rand 100 c3; <---- How many and put where
SUBC> inte 10:20. <---- Take from integer dist from 10 to 20
RANGE [C] Finds range for ONE column
MTB> range c10
RANK [C] Ranks data in column ... but does it backwards
MTB> rank c4, c5 <---- Uses data in c4, ranks, and puts in c5
READ [C] Allows data entry for multiple columns
MTB> read c3-c5 <---- Enter 3 values on each DATA> line
REGRESS [C] Does simple and multiple regression
MTB> regr c2 1 c1 <---- Y is c2 ... 1 predictor ... X is c1
%RESPLOTS [M] Plots residuals and regression line AFTER using regr
MTB> %resplots c4, c3 <---- Res in c4 ... fits in c3
RETRIEVE [C] Calls up saved worksheet
MTB> retr pulse'
RMEAN [C] Finds means of rows and stores in new column
MTB> rmean c1-c5, c6 <---- Finds means over c1-c5, puts in c6
RMEDIAN [C] Same as above ... but for medians
MTB> rmedian c1-c5, c6
ROUND [C] Rounds values
MTB> round c1, c2 <---- Rounds values in c1, puts in c2
RSTDEV [C] Same as rmean ... but for standard deviations
MTB> rstdev c1-c5, c6
RSUM [C] Same as rmean ... but calculates sum
MTB> rsum c1-c5, c6
SAMPLE [C] Take random sample FROM an existing column
MTB> rand 20 c1, c2 <---- Takes 20 at rand from c1, puts in c2
SAVE [C] Saves worksheet AT POINT IN TIME THAT SAVE IS USED
MTB> save a:data' <---- Saves worksheet data' to a:
SET [C] Lets you enter data into ONE column
MTB> set c4
SORT [C] Sorts data from a column
MTB> sort c10, c11 <---- Sorts c10 and puts in c11
STACK [C] Stacks several columns on top of one another
MTB> stack c1-c3, c4 <---- Piles c1 c2 c3 in c4
STDEV [C] Finds standard deviation for ONE column
MTB> stdev c10
STEM [C] Makes stem and leaf diagram
MTB> stem c20
STOP [C] Ends your MTB session ... BE CAREFUL!!!!
SUM [C] Sums values in a column
MTB> sum c12
SYMBOL [SG] Controls type of symbol used for plots
SUBC> symb;
SUBC> type 12. <---- Makes solid square symbols
TABLE [C] Makes table of data in columns
MTB> table c2 c3; <---- Column subdivisions here
SUBC> mean c4. <---- Puts mean from c4 in cells of table
TALLY [C] Makes basic frequency distribution ... no decimals allowed!
MTB> tally c3 c5 [Note: New REL 11 allows decimals]
TICK [SG] Controls tick marks on X and/or Y axis
SUBC> tick 1 10:30/2. <---- Puts ticks of 10,12, etc. on X axis
TINTERVAL [C] Makes t confidence interval for mean
MTB> tint c5 <---- Default value is 95%
TRANSPOSE [SG] Reverses X and Y axes in graphs
TTEST [C] Does simple t test for population mean
MTB> ttest 50 c4 <---- Assumes H(0) = 50
TUKEY [S] Does Tukey followup test for onew anova command
SUBC> tukey. <---- See onew command
TWOSAMPLE [C] Does t test for difference in means, data in diff columns
MTB> twos c3 c4
TWOT [C] Does same as above ... but data laid out differently
MTB> twot c4, c5 <---- Dep var in c4, group codes in c5
UNSTACK [C] Opposite of STACK ... disentangles data in column
MTB> unstack c1, c10 c11; <---- Take c1 ... put in c10 c11
SUBC> subs c2. <--- using two codes values that are in c22
Return to top of page ... Top of Page ... Return to MTB Resources Page ... MTB Resources Page