Please excuse me if there's a really obvious answer to this question. I work in local government, and somehow the job of finding a statistics package has fallen on my desk.
That being said, alhough I like how easy it is to use, i've been using the trial version of Minitab for about 3 days.
I'm in the process of writing a macro to compare box and whisker plots for water quality data for the last N samples against the total population of all samples collected to date, and referencing these box and whisker plots, which include custom quantiles, and 2SE Confidence intervals.
What i'm aiming for is a macro that my co-workers who have no little experience of statistics can use, so they can simply type in:
%COMPARE 'ANALYTE' N
And Minitab will do the rest of the work for them (as long as the first row of their spreadsheet is column names).
Here's what i've managed to figure out so far.
COMPARE ANALYTE1 J DATA1 DATA2 DATA3 DATA4
MCOLUMN ANALYTE1 ANALYTE2 DATA1 DATA2 DATA3 DATA4
Mconstant K1 K2 K3 K4 K5 K6 K7 K8 K9 K10 K11 K12 TEMP1 I J H
LET K7=CONCATENATE("Consent Limit - ",DATA2," (",DATA3," ",DATA4,")")
LET K8=CONCATENATE("Consent Limit - ",DATA2," (",DATA3," ",DATA4,")")
Boxplot ANALYTE1 ANALYTE2;
Reference 2 K9;
Reference 2 K10;
Marker 2 K6;
Marker 2 K5;
Marker 1 K4;
Marker 1 K3;
Marker 2 K2;
Marker 1 K1;
Marker 1 K11;
Marker 2 K12;
I've figured this much out by manually adding (for example) the points, and seeing what changes it made to the command code (Not to mention much perusing of help files).
What I need the help with is the most straight forward thing (I think) I can do is to say to people "Include the information relating to the permit limits under columns with these names", so that I can replace DATA1, DATA 2, DATA3, and DATA4 with those colum names, but so far everything i've tried has failed with a variety of error messages.
My question is this - How do I get a Macro to look up a column name, rather than a column number, without specifiying it in the commandline when I initiate the macro?
In other words, if I was executing it as an exec, or on the command line I would just type in:
But if I include that line in the macro it gives me the error message:
* ERROR * Cannot use quoted string to refer to macro variables
* ERROR * Completion of computation impossible.