We invite you to contribute and would appreciate your input. To submit your own programs for inclusion here, e-mail: info@statsoft.com. We ask that you please follow the guidelines below to ensure that other users will best take advantage of your efforts:
Provide a description of the task the program will perform.
Provide a list of requirements for running the program (such as the type of Scrollsheet which must be active before running the program or the necessary data file needed to run the program properly).
Note any adjustments that must be made to the code before running the program (such as data file path or variable names).
Include comments throughout the code that will assist others in understanding each section's purpose. The better the documentation, the easier it will be for someone to use your program. Also, please include the description in (1) at the beginning of your program.
Disclaimer: StatSoft offers the User-exchange Forum in order to promote the sharing of STATISTICA BASIC, STATISTICA Command Language, STATISTICA Development Environment, and Visual Basic interface programs between STATISTICA users. We will attempt to post accurate and functional programs, no guarantee regarding these programs is provided by StatSoft, Inc.
A zipped file containing all of these programs is available for downloading. See the Download Area for more information.
2stls.stb: This program illustrates many of the available matrix functions in an example of a two-stage least squares regression analysis.
Acf.stb: This program computes Lienert's and Krauth's analysis of configuration frequencies (ACF), in German "Konfigurationsfrequenzanalyse (KFA)".
BasicStatsByGroup.stb: This program produces multiple statistics for a measurement variable by a grouping variable. The statistics produced combine those available in the Descriptive Statistics option of Basic Statistics and Tables with statistics from the Ordinal Descriptive Statistics option of Nonparametric Statistics. The benefit of this program is its ability to produce a single Scrollsheet of output which gives statistics by the levels of the grouping variable.
BestSubs.stb: This program will perform all possible subsets of regressions of a selected dependent variable on a selected set of predictor variables.
Bias.stb: This program will report the following statistics related to Gage R&R analyses: 1) Bias, 2) %Bias relative to process variation, 3) %Bias relative to tolerance width.
BoxCox.stb: This program will compute the best parameter for a Box-Cox transformation of the dependent variable in a multiple regression analysis; the user can choose between an automatic search algorithm and a graphical procedure for determining the best parameter.
BoxTid.stb: This program will compute the parameters for a Box-Tidwell transformation of the independent variable values in a multiple regression analysis.
CA.stb: This program was written when STATISTICA did not have a Correspondence Analysis module. Its plots may still be useful.
CfdDiff.stb: This program will compute confidence intervals for the differences of group means on one or more dependent variables from two independent samples (Milliken & Johnson, 1984). This program uses the data from the Grouping Scrollsheet in the Basic Statistics and Tables module.
CorrCI(Casewise).stb: This STATISTICA BASIC program will provide the approximate confidence interval for the correlation coefficients of a list of variables. This is done using a normal approximation. To demonstrate the manner in which the confidence intervals are produced, a graph can be drawn. This will show the full range of possible correlation coefficients and the confidence intervals for those values at the given percentage and number of observations. Missing data can be handled by casewise deletion in this program. For pairwise deletion, see CorrCI(Pairwise).stb.
CorrCI(Pairwise).stb: This STATISTICA BASIC program will provide the approximate confidence interval for the correlation coefficients of a list of variables. This is done using a normal approximation. To demonstrate the manner in which the confidence intervals are produced, a graph can be drawn. This will show the full range of possible correlation coefficients and the confidence intervals for those values at the given percentage and number of observations. Missing data can be handled by pairwise deletion in this program. For casewise deletion, see CorrCI(Casewise).stb. Note that if the data does not have missing data the casewise deletion program will be much more efficient.
Eta-Tran.stb: This program will compute the standard (Taguchi) Signal-to-Noise ratios for a user-specified list of variables. These indices can be used (as the dependent or Y-variables) together with all types of designs available in the Experimental Design module of STATISTICA, or in any other type of analysis. For more information about Taguchi methods, see Experimental Design.
FactorAn.stb: This program allows you to perform a principal components analysis, based on correlations, covariances, or the moment matrix (also, very large problems can be analyzed, e.g., >300 variables). The program will also perform a varimax rotation of the factor space, and compute the factor scores.
GGAdjust.stb: This program will compute Greenhouse-Geisser's epsilon and adjusted test of significance for within subject effects in ANOVA (Greenhouse & Geisser, 1959). Epsilon is computed from the SSCP: Error matrix for a within subject effect with three or more levels.
Grubbs.stb: This program will perform Grubbs test for outlying observations. The procedure for this test is taken from Quality Assurance of Chemical Measurements found on page 36. It outputs a calculated t and Grubbs t. If the calculated t is greater than Grubbs t then you can reject the null hypothesis and conclude that the data point being tested is an outlier.
Icc.stb: This program will calculate intraclass correlation coefficients for estimating interrater reliability, following methods outlined in the following article: Shrout, P.E. & Fleiss, J.L. (1979). Intraclass correlations: Uses in assessing rater reliability. Psychological Bulletin, 86,420-428.
Interval.stb: This program computes one-sided and two-sided confidence, prediction, and tolerance intervals for various statistics including mean, standard deviation, proportions, and number of occurances. The user is required to input points estimates, sample sizes, and the desired confidence.
Levene.stb: This program performs the Brown-Forsythe & Levene Tests for homogeneity of variances for the two group case.
Lillief.stb: This program will compute critical values for the Kolmogorov-Smirnov D statistic, based on a user-defined sample size and number of replications, for normal samples with means and standard deviations unknown. These critical values are also called Lilliefors critical values.
Linearity.stb: This program computes various statistics related to gage linearity and accuracy.
MANOVA.stb: This program will perform a multivariate analysis of variance and compute various results, statistics and graphs.
MantHaen.stb: This program will compute the Mantel-Haenszel test for a user-defined three-way table.
One-SampleTest(Agg).stb: This program will perform significance tests and calculate confidence limits for the following statistics taken from one single sample: Mean (with known or unknown standard deviation), Variance, Proportion, and Pearson's Product Moment Correlation Coefficient. It requires aggregated data (e.g. sample mean, sample size etc.) instead of raw data. If you have raw data from which the sample parameters have to be calculated use the STATISTICA BASIC program One-SampleTest(Raw).stb.
One-SampleTest(Raw).stb: This program will perform significance tests and calculate confidence limits for the following statistics taken from one single sample: Mean (with known or unknown standard deviation), Variance, Proportion, and Pearson's Product Moment Correlation Coefficient. This program requires raw data (i.e., a data file) instead of aggregated sample data. For aggregated sample data use the STATISTICA BASIC program One-SampleTest(Agg).stb.
Outliers.stb: This program allows the user to pick a number of variables and define outliers in terms of the number of standard deviations from the mean. The program will then search the variables' values for outliers and report the case numbers containing outliers.
Outlyind.stb: This program checks for multivariate outliers. The variables to be included can be freely selected. In addition, a variable can be specified to store an indicator when an outlier is detected, i.e. p<0.05.
Post-HocsForFriedman.stb: This program performs nonparametric multiple comparisons. It uses the output from Friedman ANOVA by Ranks, either testing the Average Rank (in Column 1) or the Sum of Ranks (in Column 2). The test compares the absolute value of the differences for all pairs with a critical value which is determined using a normal approximation with suitable adjustment of alpha to take the multiple comparisons into account.
Post-HocsForKruskal.stb: This program performs nonparametric multiple comparisons. It uses the output from the Scrollsheet headed "Kruskal-Wallis ANOVA by Ranks" in the Kruskal-Wallis ANOVA and Median Test analysis. The test compares the absolute value of the differences in mean ranks for all pairs with a critical value which is determined using a normal approximation with suitable adjustment of alpha to take the multiple comparisons into account.
QCViolat.stb: This is a very simple program which can be used when a violation occurs in IQC (Alarm Notification) to save the chart in its current state.
Randomsample.stb: This program generates codes for a sample identifier variable which will uniquely identify random subsamples of a user-specified size from the total number of valid cases in the data file. This is useful generating randomly selected subsets of cases to use for cross-validation purposes.
Regressn.stb: This program will perform a complete multiple regression analysis for selected variables, and produce various diagnostic plots of the residuals.
Ridge.stb: This program will compute the Ridge Regression estimates with Trace Statistics. For Computation details, see Classical and Modern Regression with Applications (Chapter 8) 2nd. Edition (Myers, 1990).
Schaha.stb: This program computes Schaich's and Hamerle's multiple comparison of rank sums.
StatsAcrossColumns.stb: This program will calculate the user-specified statistic across the user-specified variables and place the result in a user-specified result variable. Missing values are excluded from the calculations similar to Block Stats for Rows, but the variables do not need to be consecutive. This program was intended to fill the need for sum, average, etc. functions that are not currently available as spreadsheet formulas.
Value Stats.stb: This program was written to provide the unique values in a variable, any associated text values, and some basic descriptive statistics for that variable. It is similar to the Values/Stats option available from the Quick Stats Graphs flying menu, accessible by right-clicking in a data file.
Wls.stb: This program will compute the parameters for a multiple regression equation via weighted least squares.
ZTable.stb: This program will determine the area between 0 and Z for the Standard Normal Distribution (Z = 0.00, 0.01, 0.02, ..., 3.09) and read those values into a Scrollsheet which will resemble the standard Z table printed in most elementary statistics textbooks.
Blaise.scl: This program will convert the fixed format ASCII file, simple.asc, to the STATISTICA data file format. It then calls a STATISTICA BASIC (Blaise.stb) program which will add variable names, casenames, text values, file header information, etc.
Blaise.stb: This program, which is called from Blaise.scl will add variable names, casenames, text values, file header information, etc. to the simple.sta dataset created with blaise.scl.
FilComp.stb: This program will compare the values for selected variables in two data files, and produce a summary report of the "mismatches."
FillSpecial.stb: The purpose of this program is to fill a variable in a datafile with a series such as 1,2,3,4,1,2,3,4,1,2,3,4... or 1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3... This procedure might often be useful when filling in codes for an analysis of variance, for example.
JulianDates.stb: This program will allow a user to enter any date (after 1900) and will return the Julian value for that date. The month may be entered as text or number, the first character will determine which type has been used. The Julian value is the numeric representation of a calendar date which is used internally by STATISTICA and other spreadsheet style programs.
ModifyScrollNames.stb: This program illustrates how to automatically reformat the names of columns and rows of a Scrollsheet by operating on the active Scrollsheet on screen.
RepMeas.stb: This program will restructure a data file, so that the values for selected variables become consecutive "groups" in a new data file; that data file will also include a grouping variable with text values that are identical to the original variable names. This program is useful if you need to restructure a data file that contains the data for several independent samples in different columns of data (one for each sample); in order to analyze such data via the numerous statistical and graphical tools available in STATISTICA, you first need to restructure your data file (as can be accomplished via this program) to the standard form (i.e., so that each row in the data file represents one "case" or observations, and each column represents one measurement for that case).
Sort.stb: This program will sort the rows of the current Scrollsheet by the user-specified column.
StaDevTest.stb: This program will convert the comma delimited text file, test.txt, to the STATISTICA data file format and add variable names, casenames, text values, file header information, etc.
4plot.stb: This program generates two XY-scatterplots. Corresponding points are marked with identical numbers in both plots.
6plot.stb: This program generates two XYZ-scatterplots. Corresponding points are marked with identical numbers in both plots.
Arrows.stb: This program generates colorful arrows on the top of the existing graph, c:\stat\arrows.stg.
BoxCoxP.stb: This program will generate plots of the means versus the standard deviations, and the log(means) versus log(standard deviations) from the Display Scrollsheet in Experimental Design. These plots are useful for determining an appropriate Box-Cox transformation for the dependent variable values in an experiment.
CA.stb: This program was written when STATISTICA did not have a Correspondence Analysis module. Its plots may still be useful.
Caseplot.stb: This program will produce a multiple line plot for selected cases, and for selected variables. Each line will represent the values for one case, across the selected variables.
Dotplot.stb: This program will produce dot-plots for selected variables. Dot-plots show the distribution of the values over the range of values for the respective variables.
GraphTemp.stb: This program gives the template graph for the factors. The factors here are entered by hand and not calculated. This program should be used in conjunction with SurveyFactors.stb.
Henon.stb: This program will compute the successive values for the Henon strange attractor, and plot them in 2D and 3D scatterplots.
Histres.stb: This program will produce a histogram for a selected variable, and fit to it the normal distribution. The results are presented in a compound graph document, which shows the histogram and a line plot indicating the deviations of the normal expected frequencies from the observed frequencies.
HgwBreak.stb: This program is useful in creating a histogram of data which has several "bins" with high frequencies as well as some "bins" with low frequencies.
LoadingsCircle.stb: This program will generate a 2D-scatterplot of the factor loadings in a Principal Components Analysis or in a Principal Factor Analysis. This graph differs from the regular plot of loadings given by the analysis on 3 points: the x- and y- axes are set from 1 to +1, with a step of 0.2, the graph is square, a circle is drawn centered on (0,0) and with a unit radius.
Log.stb: This program functions by finding the log of a variable and then computes its mean and stdev (of logged variable). It then converts this into a Normal dsn where the probability scales are calculated from this. The fitted line is the equation y=exp(mean+stdev*inverse Normal Dsn).
ManyGrps.stb: This program will produce and print a line plot, scatterplot, or step plot for each case in a data file, for a selected set of variables.
MetaHist.stb: This program will produce a histogram "built from" user-defined clipart, and based on a frequency table, as produced via the Basic Statistics module or the Quick Basic Stats options. The bars in the histogram will be made up from a specified metafile, and it is assumed that the Scrollsheet with frequencies is the top-most Scrollsheet.
QCViolat.stb: This is a very simple program which can be used when a violation occurs in IQC (Alarm Notification) to save the chart in its current state.
Resplots.stb: This program will retrieve the data from the Predicted & Residual Values Scrollsheet in Multiple Regression (accessible via the Residual Analysis dialog), and produce: 1. a 2D scatterplot plot of the case numbers versus the standardized residual values; in this plot all standardized residuals with absolute values greater than 2 will be highlighted and labeled; 2. a 3D scatterplot of the case numbers (x) by observed values (y) by standardized residuals (z).
Scales.stb: This program generates a simple custom scale to the right of an existing graph. You can modify this program to place custom scales in any place on a graph.
Scatpie.stb: This program will produce a Scatterplot of the X (TSAR Ranking) and Y (Customer Satisfaction) variable in Scatpie.sta. Each point's size is determined by another factor (Total Sales) and each point is a Pie Chart representing the proportion of Parts and Labor sales.
SurveyFactors.stb: This Program is mainly used for survey analysis. Its purpose is to give a graphical representation of how a company performs for the specified factors in relation to a template graph. That is a template graph is created with the specified factors from the questionnaire and then this program calls the template graph and then overlays the respective company information retrieved from the questionnaire. This program should be used with the STATISTICA BASIC program, GraphTemp.stb, and the sample data file, surveyfactors.sta.
TwoDataFiles.stb: This program illustrates how to do a multiple scatterplot from data in two STATISTICA data files.
FilComp.stb: This program will compare the values for selected variables in two data files, and produce a summary report of the "mismatches."
Outliers.stb: This program allows the user to pick a number of variables and define outliers in terms of the number of standard deviations from the mean. The program will then search the variables' values for outliers and report the case numbers containing outliers.
SclStb.scl: This program illustrates how to use STATISTICA BASIC programs from within SCL (STATISTICA Command Language) programs to provide elements of the run-time user interface (in this case, selecting variables for the analysis). The program will first append a variable (new variable 26) to the example data file adstudy.sta; then the STATISTICA BASIC program SclHelp.stb is executed; that program will prompt the user to select a variable that is to be used as the dependent variable in a multiple regression analysis. The BASIC program will copy the selected variable to the new variable 26; then this SCL program will continue by running the multiple regression procedure with variable 26 as the dependent variable.
SclHelp.stb: This program is called from the SCL (STATISTICA Command Language) program SclStb.scl.
CallExe.stb: This program illustrates how to use Windows API calls in STATISTICA BASIC. This simple example program shows how to call another application from within STATISTICA BASIC using Windows API calls, but the same logic also applies to more complex tasks.
WinApi.stb: This program illustrates how to use Windows API calls in STATISTICA BASIC. This simple example program shows how to maximize a selected graph window using Windows API calls, but the same logic also applies to more complex tasks.