The following output
is produced:
var ACTUALSTATS= new Array(
"analysis"
,"NMISS"
,"N"
,"SUM"
,"MIN"
,"MAX"
,"USS"
,"RANGE"
,"AVG"
,"CSS"
,"VAR"
,"STD"
,"STDERR"
,"CV"
,"T"
,"PRT"
,"LCLM"
,"UCLM"
,"PCTSUM"
,"PCTN"
);
var DIFFSTATS= new Array(
"computed"
,"MAX"
,"MIN"
,"PCTN"
,"PCTSUM"
,"SUM"
,"N"
);
var PREDICTSTATS= new Array(
"analysis"
,"NMISS"
,"N"
,"SUM"
,"MIN"
,"MAX"
,"USS"
,"RANGE"
,"AVG"
,"CSS"
,"VAR"
,"STD"
,"STDERR"
,"CV"
,"T"
,"PRT"
,"LCLM"
,"UCLM"
,"PCTSUM"
,"PCTN"
);
var SALESRATSTATS= new Array(
"computed"
,"MAX"
,"MIN"
,"PCTN"
,"PCTSUM"
,"SUM"
,"N"
);
var statslabellist = new Array();
statslabellist["SUM"]="Sum";
statslabellist["PCTSUM"]="Percent of Sum";
statslabellist["AVG"]="Average";
statslabellist["N"]="Total Number of Nonmissing Values";
statslabellist["PCTN"]="Percent of Total Number";
statslabellist["MIN"]="Minimum";
statslabellist["MAX"]="Maximum";
statslabellist["RANGE"]="Range";
statslabellist["NMISS"]="Total Number of Missing Values";
statslabellist["STD"]="Standard Deviation";
statslabellist["STDERR"]="Standard Error of Mean";
statslabellist["LCLM"]="Lower Confidence Limit";
statslabellist["UCLM"]="Upper Confidence Limit";
statslabellist["USS"]="Uncorrected Sum of Squares";
statslabellist["CSS"]="Corrected Sum of Squares";
statslabellist["VAR"]="Variance";
statslabellist["CV"]="Coefficient of Variation";
statslabellist["T"]="T Value";
statslabellist["PRT"]="Probability of Greater Absolute Value";
statslabellist["SUMWGT"]="Sum of Weights";
statslabellist["UWSUM"]="Unweighted Sum";
statslabellist["NUNIQUE"]="Nunique";
statslabellist["MIXED"]="*MIXED SELECTIONS";
analysisdesclist = new Array(
"SUM"
,"PCTSUM"
,"AVG"
,"N"
,"PCTN"
,"MIN"
,"MAX"
,"RANGE"
,"NMISS"
,"STD"
,"STDERR"
,"LCLM"
,"UCLM"
,"USS"
,"CSS"
,"VAR"
,"CV"
,"T"
,"PRT"
,"SUMWGT"
,"UWSUM"
);
computeddesclist = new Array(
"MAX"
,"MIN"
,"PCTN"
,"PCTSUM"
,"SUM"
,"N"
);
cnuniquedesclist = new Array(
"SUM"
);
nuniquedesclist = new Array(
"NUNIQUE"
);
var vararrayname = new Array();
num = 0;
//STATS
function stats(select,statbox) {
var vararrayname="";
var varstatsstring="";
var allstatsstring="";
for (i=0; i < select.options.length; i++) {
if (select.options[i].selected) {
vararrayname=select.options[i].value+"STATS";
varstatsstring=eval(vararrayname).toString();
if (num==1) {
varstatsstring=eval(vararrayname)[0];
for (j=0; j < statbox.length; j++) {
if (statbox.options[j].text!="")
varstatsstring+= "," +statbox.options[j].value;
}
}
else {
if (num>1) {
allstatsarray=eval(vararrayname[0]+"desclist");
allstatsstring=allstatsarray.toString();
if (""!=statbox.options[j].text!="" && "*MIXED SELECTIONS"!=
statbox.options[j].text &&
-1==varstatsstring.indexOf(statbox.options[j].value) ){
varstatsstring+= "," +statbox.options[j].value ;
}
}
}
temparray=varstatsstring.split(",");
if ("ACTUALSTATS"==vararrayname) {
ACTUALSTATS.length=temparray.length;
for (k=0; k < temparray.length; k++)
ACTUALSTATS[k]=temparray[k];
}
else if ("DIFFSTATS"==vararrayname) {
DIFFSTATS.length=temparray.length;
for (k=0; k < temparray.length; k++)
DIFFSTATS[k]=temparray[k];
}
else if ("PREDICTSTATS"==vararrayname) {
PREDICTSTATS.length=temparray.length;
for (k=0; k < temparray.length; k++)
PREDICTSTATS[k]=temparray[k];
}
else if ("SALESRATSTATS"==vararrayname) {
SALESRATSTATS.length=temparray.length;
for (k=0; k < temparray.length; k++)
SALESRATSTATS[k]=temparray[k];
}
}
}
}//STATS