WWW | Community | Store | Account | Contact Us
SHAZAM Homepage

STAT

The STAT command computes descriptive statistics including means, standard deviations, variances, minimums, and maximums for the variables listed or for all variables.

In general, the format is:

STAT var / options

The available options are:

OPTION DESCRIPTION
all Statistics are computed for ALL the variables in the data. Therefore, no variable names need be specified.
anova Prints an ANalysis Of VAriance table and an F-value that tests the null hypothesis that the means of all the variables listed on the given STAT command are the same. For equal sample sizes a two-way analysis of variance is constructed. When two variables are specified, additional test statistics for equal means and variances are reported.
bartlett Computes BARTLETT's homogeneity of variance test statistic to test the hypothesis that the variances of all the variables listed are equal.
beg= Specifies the BEGinning observation to be used in the STAT command.
cor= Stores the CORrelation matrix in the variable specified.
cov= Stores the COVariance matrix in the variable specified.
cp= Stores the CrossProduct matrix in the variable specified.
cpdev= Stores the CrossProduct matrix in DEViations from the mean in the variable specified.
dn Uses N (number of observations) as a divisor rather than N-1 when computing variances and covariances.
end= Specifies the END observations to be used in the STAT command.
matrix Any MATRIX or matrices contained in the list vars will be treated as a single variable if this option is used. If this option is not specified SHAZAM will treat each column of the matrix as a separate variable.
max Prints all the output of the PCOR, PCOV, PCP, PCPDEV and PRANKCOR options.
maxim= Stores the MAXIMums as a vector in the variable specified.
mean= Stores the MEANs as a vector in the variable specified.
medians= Stores the MEDIANS as a vector in the variable specified.
minim= Stores the MINIMums as a vector in the variable specified.
modes= Stores the MODES as a vector in the variable specified. If there are multiple modes then the largest mode is saved. If there are no repeat values then the value saved is the maximum value.
npop= Specifies the population size to use with the SAMPSIZE option.
pcor Prints a CORrelation matrix of the variables listed.
pcov Prints a COVariance matrix of the variables listed.
pcp Prints a CrossProduct matrix of the variables listed.
pcpdev Prints a CrossProduct matrix of the variables listed in DEViations from the means.
pfreq Prints a table of FREQuencies of occurrence for each observed value in the data. Also prints the median, the mode and quartiles. This option is not recommended for large sample sizes with many different possible values since pages and pages of output would result.
pmedian Prints the MEDIAN, mode and quartiles for each variable. This option could be time-consuming when the sample size is large.
prankcor Prints a matrix of Spearman's RANK CORrelation coefficients.
rankcor= Stores the Spearman's RANK CORrelation matrix in the variable specified (see the PRANKCOR option above).
replicate Used with WEIGHT= when the weights indicate a sample replication factor. The REPLICATE option is not available with PFREQ, PMEDIAN, MEDIANS= or MODES=.
sameobs Restrict the sample to ensure that all observations for all variables are non-missing. This option reports descriptive statistics for the sample used in an OLS or other estimation command. The SET SKIPMISS command must be in effect.
sampsize Calculates the sample size required to obtain a 95% confidence interval with width 2e where e is a margin of error with values ranging from 0.01 to 0.10. The population size can be specified with the NPOP= option.
stdev= Stores the STandard DEViations as a vector in the variable specified.
stemplot= Specifies the number of digits in the stem (usually 1 or 2) for a stem-and-leaf display of the data.
sums= Stores the sum of each variable as a vector in the variable specified.
var= Stores the VARiances as a vector in the variable specified. Note that when the DN option is used the divisor is N instead of N-1.
weight= Specifies a variable to be used as a WEIGHT if weighted descriptive statistics are desired.
wide Requires 120 columns of output. When this option is used the coefficient of variation and the constant digits statistic will be printed in addition to the regular descriptive statistics.