Statscraft 0.61.0, release v0.61.0
Commands
One page per supported command, generated from the same table that the parser and statscraft help use, so the pages always match the program.
Data files and dictionary
| 命令 | 功能 {#what-it-does} |
|---|---|
| GET | Read a data file and make it the active dataset. |
| GET DATA | Read a text data file, a sheet of a workbook or a dataset of an OpenStatSpec database as the active dataset. |
| GET TRANSLATE | Read a tab-delimited text file, a dBASE file or an old Excel workbook. |
| GET STATA | Read a Stata data file (.dta) and make it the active dataset. |
| IMPORT | Read a portable (.por) file and make it the active dataset. |
| SYSFILE INFO | Show the dictionary of a data file without opening it as the active dataset. |
| SAVE | Write the active dataset to a data file. |
| SAVE TRANSLATE | Write the active dataset to a CSV or tab-delimited text file, an Excel workbook, a Stata file, a SAS transport file or a dBASE file. |
| SAVE CODEPAGE | Write the active dataset to a data file whose text is in a code page. |
| EXPORT | Write the active dataset to a portable (.por) file. |
| XSAVE | Write the cases to a data file as the next data pass reads them. |
| NEW FILE | Start a new, empty active dataset. |
| ADD CASE | A Statscraft extension: one blank case after the last case of the active dataset. |
| ADD FILES | Append the cases of several data files, matching variables by name. |
| MATCH FILES | Combine the variables of several data files case by case or by key. |
| STAR JOIN | Add the fields of lookup files to every case of a data file, by keys, as an SQL left join. |
| UPDATE | Replace values of a primary file with the values of transaction files, by key. |
| COMPARE DATASETS | Compare the values and dictionary of the active dataset with another dataset or .sav file. |
| VARIABLE LABELS | Set the labels of variables. |
| VALUE LABELS | Replace the value labels of variables. |
| MISSING VALUES | Declare user-missing values. |
| VARIABLE LEVEL | Set the measurement level of variables. |
| VARIABLE WIDTH | Set how many characters wide variables show in the data grid. |
| FORMATS | Set the display format of variables. |
| PRINT FORMATS | Set the print format of variables: how procedures and PRINT show them. |
| WRITE FORMATS | Set the write format of variables: how WRITE writes them. |
| RENAME VARIABLES | Change the names of variables. |
| DELETE VARIABLES | Remove variables from the dataset. |
| SORT CASES | Sort the cases by the values of variables. |
| SORT VARIABLES | Put the variables in order by a property of their dictionary entries. |
| SHIFT VALUES | New variables that hold the value of the same variable in an earlier or later case. |
| WEIGHT | Weight the cases by a variable, or turn weighting off. |
| AGGREGATE | Aggregate groups of cases into new variables or a new dataset. |
| VARSTOCASES | Turn groups of variables into cases: one new case per variable of the group. |
| CASESTOVARS | Turn groups of cases into one case each, with a variable per value of an index. |
| FLIP | Transpose the data: variables become cases and cases become variables. |
| ADD VALUE LABELS | Add or change value labels, keeping the other labels of the variables. |
| FILE LABEL | Set the label of the data file. |
| DOCUMENT | Add free text to the documents of the data file. |
| ADD DOCUMENT | Add quoted lines to the documents of the data file. |
| DROP DOCUMENTS | Remove the documents of the data file. |
| VARIABLE ROLE | Set the role of variables for dialogs. |
| VARIABLE ALIGNMENT | Set the alignment of variables in the data grid. |
| VARIABLE ATTRIBUTE | Set or delete custom attributes of variables. |
| DATAFILE ATTRIBUTE | Set or delete custom attributes of the data file. |
| ALTER TYPE | Change the type, string width or format of variables. |
| APPLY DICTIONARY | Copy dictionary information from a data file or dataset to the active dataset. |
| DATA LIST | Define text data, inline or in a file, and read it as the new active dataset. |
| KEYED DATA LIST | Read variables from the record of a text file that a key variable picks, for each case. |
| BEGIN DATA | Inline data for the DATA LIST before it, up to a line that holds END DATA. |
| MATRIX DATA | Read matrix materials (correlations, means, counts) as a matrix data file. |
| MCONVERT | Matrix data between covariances and correlations with standard deviations. |
| INPUT PROGRAM | Start an input program: commands that build the cases of a new active dataset. |
| END INPUT PROGRAM | End an input program and run it. |
| END CASE | In an input program: add the case built so far to the dataset and go on. |
| END FILE | In an input program or FILE TYPE: stop reading; the case being built is dropped. |
| REREAD | In an input program: let the next DATA LIST read the last record again. |
| REPEATING DATA | In an input program or FILE TYPE: one case per repeating group of a record. |
| FILE TYPE | Start the definition of a file with several kinds of records. |
| RECORD TYPE | Inside FILE TYPE: the record types the following DATA LIST reads. |
| END FILE TYPE | End a FILE TYPE definition and read the file. |
| SPLIT FILE | Run each procedure once per run of consecutive cases that share the split values. |
| FILTER | Leave out of procedures the cases whose filter value is 0 or missing. |
| TEMPORARY | Make the changes that follow last only until the next procedure. |
| N OF CASES | Keep only the first n cases from the next data pass on. |
| N | Short for N OF CASES. |
| SAMPLE | Keep a random sample of the cases. |
| BOOTSTRAP | Give the next procedure bootstrap bias, standard errors and confidence intervals. |
Transformations
| 命令 | 功能 {#what-it-does} |
|---|---|
| COMPUTE | Assign the value of an expression to a variable. |
| IF | Assign a value only for the cases where a condition holds. |
| DO IF | Start a block of transformations that run only where a condition holds. |
| ELSE IF | Start the next conditional branch of a DO IF block. |
| ELSE | Start the branch of a DO IF block for the cases no condition matched. |
| END IF | End a DO IF block. |
| RECODE | Map values of variables to new values. |
| COUNT | Count, per case, how many variables hold one of the listed values. |
| SELECT IF | Keep only the cases where a condition holds. |
| STRING | Declare new string variables, filled with empty strings. |
| NUMERIC | Declare new numeric variables, filled with system-missing. |
| LEAVE | Keep the values of new variables from case to case instead of resetting them. |
| EXECUTE | Run the pending transformations. |
| DO REPEAT | Repeat transformations with stand-in names replaced by variables or values. |
| LOOP | Repeat transformations for each case, with an index, a condition or both. |
| END LOOP | End a LOOP, optionally when a condition holds. |
| BREAK | Leave the innermost LOOP, usually inside DO IF. |
| VECTOR | Name a range of variables, or new variables, as a vector for indexed use. |
| AUTORECODE | Recode values into consecutive integers in new variables, labeled with the old values. |
| RANK | Ranks, percentile groups, proportion estimates, normal and Savage scores as new variables. |
| DATE | Add date variables that count the cases of a time series. |
| Show the values of variables for every case, as lines of text. | |
| PRINT EJECT | Like PRINT, starting a new page each time it runs. |
| PRINT SPACE | Add blank lines to the PRINT output, for every case it runs on. |
| WRITE | Write the values of variables for every case to a text file. |
| CLEAR TRANSFORMATIONS | Undo the transformations and dictionary changes since the last data pass. |
Procedures
| 命令 | 功能 {#what-it-does} |
|---|---|
| FREQUENCIES | Frequency tables, summary statistics and percentiles. |
| DESCRIPTIVES | Summary statistics of numeric variables, optionally saved as z-scores. |
| CROSSTABS | Contingency tables with percentages, residuals and chi-square tests. |
| MULT RESPONSE | Frequency tables and crosstabulations of multiple response groups and variables. |
| MEANS | Statistics of dependent variables within groups of control variables. |
| SUMMARIZE | Statistics of dependents within groups of control variables, optionally listing the cases. |
| OLAP CUBES | Statistics of scale variables in nested groups, with differences between groups or variables. |
| CODEBOOK | Dictionary entries and summary statistics of variables and multiple response sets. |
| VALIDATEDATA | Find suspicious variables, incomplete or duplicate IDs, empty cases and rule violations. |
| T-TEST | One-sample, independent-samples and paired-samples t tests with effect sizes. |
| ONEWAY | One-way analysis of variance with contrasts and post hoc comparisons. |
| CORRELATIONS | Pearson correlations with significance and case counts. |
| NONPAR CORR | Spearman’s rho and Kendall’s tau-b rank correlations with significance. |
| PARTIAL CORR | Partial correlations of variables controlling for others, with significance. |
| NPAR TESTS | Nonparametric tests: one-sample, two and k related samples, two and k independent samples. |
| NPTESTS | Nonparametric tests picked by measurement level: one sample, independent samples, related samples. |
| PROPORTIONS | Tests and confidence intervals for a proportion or a difference of two proportions. |
| EXAMINE | Descriptives, percentiles, M-estimators, extreme values and normality tests, by factor cells. |
| REGRESSION | Linear regression with forced entry or removal and stepwise selection, residuals and diagnostics. |
| RELIABILITY | Reliability of a scale: Cronbach’s alpha, split-half and other models, item statistics and ICC. |
| WEIGHTED KAPPA | Cohen’s weighted kappa: how well two raters agree on an ordered scale. |
| FLEISS MULTIRATER KAPPA | Fleiss’ kappa: how well several raters agree when they sort subjects into categories. |
| RATIO STATISTICS | Statistics of the ratio of two positive variables, overall and within groups. |
| BAYES ONESAMPLE | Bayesian inference on one mean, proportion or Poisson rate: Bayes factors and posteriors. |
| BAYES RELATED | Bayesian inference on the mean difference of paired measurements. |
| BAYES INDEPENDENT | Bayesian comparison of the means of two independent groups. |
| BAYES CORRELATION | Bayesian inference on the Pearson correlation of every pair of variables. |
| BAYES ANOVA | Bayesian one-way analysis of variance: a Bayes factor for the groups and posteriors of their means. |
| BAYES REGRESSION | Bayesian linear regression: a Bayes factor for the model, posteriors, predictions and F tests. |
| BAYES REPEATED | Bayesian one-way repeated measures analysis: a Bayes factor and posteriors of the condition means. |
| BAYES LOGLINEAR | Bayesian test of independence in a two-way table, with simulated interaction terms. |
| POWER MEANS ONESAMPLE | Power or sample size of a one-sample t-test of a mean. |
| POWER MEANS INDEPENDENT | Power or group sizes of a t-test comparing the means of two independent groups. |
| POWER MEANS RELATED | Power or number of pairs of a paired t-test. |
| POWER PROPORTIONS ONESAMPLE | Power or sample size of a test of one proportion against a hypothesized value. |
| POWER PROPORTIONS INDEPENDENT | Power or group sizes of a test comparing two independent proportions. |
| POWER PROPORTIONS RELATED | Power or number of pairs of McNemar’s test of two paired proportions. |
| POWER ONEWAY ANOVA | Power or group sizes of a one-way analysis of variance, its contrasts and pairwise comparisons. |
| POWER PEARSON ONESAMPLE | Power or sample size of a test of one Pearson correlation against a hypothesized value. |
| POWER SPEARMAN ONESAMPLE | Power or sample size of a test of one Spearman rank correlation against a hypothesized value. |
| POWER PARTIALCORR | Power or sample size of a test of one partial correlation against a hypothesized value. |
| POWER UNIVARIATE LINEAR | Power or sample size of the F test of a set of predictors in a linear regression. |
| SIMPLAN | A simulation plan: distributions of the inputs, fitted to the data or given, their correlations and the targets of a model. |
| SIMRUN | Runs a simulation plan: draws the inputs, computes the targets and describes their distributions. |
| BEGIN EXPR | Starts a block of expressions that END EXPR saves as a model for SIMPLAN. |
| END EXPR | Ends the BEGIN EXPR block and writes its model file. |
| FACTOR | Factor analysis: principal components and six factoring methods, rotations, factor scores. |
| QUICK CLUSTER | K-means clustering of cases into a given number of clusters. |
| CLUSTER | Hierarchical clustering of cases by one of 37 proximity measures and seven methods. |
| TWOSTEP CLUSTER | Clusters of cases from continuous and categorical variables, the number of clusters chosen by BIC or AIC. |
| DMCLUSTER | Another name for TWOSTEP CLUSTER. |
| DETECTANOMALY | Unusual cases: peer groups by two-step clustering, an anomaly index and the variables behind it. |
| OPTIMAL BINNING | Bins of scale variables: cuts chosen by MDLP against a guide variable, or by equal frequency. |
| KNN | Nearest neighbor analysis: classify or predict a target from the k most similar training cases. |
| NAIVEBAYES | Naive Bayes classification of a categorical target, with forward selection of the predictors. |
| AIM | Attribute importance: how much each variable sets every group (cluster) apart from all cases. |
| SELECTPRED | Screens a long list of predictors and ranks them one by one by how well each relates to a target. |
| RESPONSE RATE | Response rates of a numerator over a denominator in each group, with cumulative rates and limits. |
| ADP | Prepares a target and its inputs for modelling and writes the preparation as syntax. |
| PROXIMITIES | Similarities, dissimilarities or distances between cases or variables by one of 37 measures. |
| PROXSCAL | Multidimensional scaling of one or more proximity matrices by majorization, with optimal transformations. |
| PREFSCAL | Multidimensional unfolding of preferences or proximities between row and column objects, with penalized stress. |
| ALSCAL | Multidimensional scaling of proximity matrices, symmetric, asymmetric or rectangular, by alternating least squares on squared distances. |
| ORTHOPLAN | Generates an orthogonal main-effects plan of profiles for a conjoint study. |
| PLANCARDS | Shows the profiles of a conjoint plan as a list or as one card per profile. |
| CONJOINT | Part-worth utilities and importances from rankings or scores of the profiles of a plan. |
| DISCRIMINANT | Linear discriminant analysis with direct or stepwise entry and classification of cases. |
| CORRESPONDENCE | Correspondence analysis: rows and columns of a two-way table as points in a few dimensions. |
| MULTIPLE CORRESPONDENCE | Multiple correspondence (homogeneity) analysis: cases and categories of several nominal variables as points in a few dimensions. |
| CATPCA | Categorical principal components: quantify each variable by optimal scaling (spline, ordinal, nominal, multiple nominal or numeric) and reduce them to a few components. |
| CATREG | Categorical regression: quantify a response and its predictors by optimal scaling (spline, ordinal, nominal or numeric) so that a linear model fits best, with ridge, lasso and elastic net penalties. |
| HOMALS | Homogeneity analysis in the older syntax: MULTIPLE CORRESPONDENCE with variables read as categories 1 to a stated largest value. |
| PRINCALS | Nonlinear principal components in the older syntax: CATPCA with variables read as categories 1 to a stated largest value. |
| OVERALS | Nonlinear canonical correlation analysis: what two or more sets of variables, each quantified at its own level, have in common. |
| ANACOR | Correspondence analysis in the older syntax: CORRESPONDENCE with its own normalization names and defaults. |
| LOGISTIC REGRESSION | Binary logistic regression with categorical covariates, stepwise selection and case diagnostics. |
| DMLOGISTIC | Another name for LOGISTIC REGRESSION. |
| NOMREG | Multinomial logistic regression: a nominal dependent variable on factors and covariates. |
| MVA | Missing value analysis: where values are missing, how that relates to the other variables, and estimates that allow for it. |
| HILOGLINEAR | Hierarchical loglinear models of a multiway table of counts, with backward elimination. |
| LOGLINEAR | General loglinear and logit models of a table of counts, with contrasts, cell weights and generalized residuals. |
| GENLOG | General loglinear and logit models of a table of counts, with cell weights, covariates and contrasts. |
| PROBIT | Probit and logit models of response counts out of subject counts, with effective levels. |
| CURVEFIT | Fit up to eleven curves of one independent variable, or of time, by least squares. |
| WLS | Weighted least squares: weights from a power of a source variable, or a given weight. |
| MODEL PROGRAM | Name the parameters of a nonlinear model and give their starting values; the transformations after it define the model. |
| DERIVATIVES | Start the derivatives program of the model program. |
| CLEAR MODEL PROGRAMS | Drop the model program and the derivatives program of the last MODEL PROGRAM. |
| NLR | Nonlinear regression by least squares (Levenberg-Marquardt) for the model of the last MODEL PROGRAM. |
| CONSTRAINED FUNCTIONS | Start the program that computes the constrained functions of the next CNLR. |
| CNLR | Constrained nonlinear regression: least squares or a loss function of your own, under bounds, linear constraints and constrained functions. |
| MULTIPLE IMPUTATION | Multiple imputation: several completed copies of the data with plausible values in place of the missing ones. |
| PLUM | Ordinal regression: a cumulative link model of an ordered dependent variable. |
| QUANTILE REGRESSION | Linear regression of a chosen quantile of the dependent variable, fitted by linear programming. |
| PLS | Partial least squares regression of one or more dependent variables on many, possibly collinear, predictors. |
| GENLIN | Generalized linear models: normal, binomial, Poisson, gamma, inverse Gaussian, negative binomial and ordinal responses. |
| UNIANOVA | General linear model of one dependent variable: factorial ANOVA, ANCOVA and regression. |
| GLM | General linear model: one dependent variable as in UNIANOVA, several (multivariate analysis of variance and covariance), or repeated measures with WSFACTOR. |
| MANOVA | Analysis of variance and covariance for one or several dependents, with nested and pooled terms, partitions and chosen error terms. |
| MIXED | Linear mixed model: fixed effects with random effects of subjects and correlated repeated measures. |
| VARCOMP | Variance components: how much each random effect of a linear model adds to the variance of the dependent variable. |
| GENLINMIXED | Generalized linear mixed model: a target with a normal, binomial, multinomial, gamma, inverse Gaussian, Poisson or negative binomial distribution and a link, fixed effects, random effects of subjects and repeated measures. |
| COXREG | Cox proportional hazards regression of survival times, with strata, categorical covariates, stepwise selection and time-dependent covariates. |
| TIME PROGRAM | Start the transformations that define time-dependent covariates for the next COXREG. |
| CLEAR TIME PROGRAM | Drop the time-dependent covariates of the last TIME PROGRAM. |
| ANOVA | Analysis of variance for factorial designs with covariates, the older form with MCA tables. |
| TREE | A decision tree grown by CHAID, exhaustive CHAID, CRT or QUEST, with gain tables, rules and saved predictions. |
| DMTREE | Another name for TREE. |
| MLP | Multilayer perceptron: a neural network with one or two hidden layers that predicts scale dependents and classifies categorical ones. |
| RBF | Radial basis function network: Gaussian hidden units at two-step clusters and least squares output weights. |
| GRAPH | One chart: summaries by category as bars, lines, areas, a pie, points with error bars, a Pareto chart or ranges, a histogram, a scatterplot or a scatterplot matrix. |
| GGRAPH | A chart from a graph dataset and a chart program in BEGIN GPL: bars (clustered, stacked), lines, areas, points, a pie or a histogram. |
| BEGIN GPL | The chart program of the GGRAPH command right before it, up to END GPL. |
| IGRAPH | The older chart command: bars, lines, areas, pies, boxes, error bars, histograms and scatterplots built from variables placed on axes and legends. |
| XGRAPH | Charts from one expression: summaries as bars or lines, clustered, stacked and paneled, population pyramids, binned histograms, dot plots and boxes. |
| PPLOT | Probability plots: Q-Q or P-P plots of variables against a test distribution. |
| NPPLOT | Another name for PPLOT. |
| ROC | ROC curve of test variables against a state, with the area under the curve. |
| DMROC | Another name for ROC. |
| ROC ANALYSIS | ROC curves with paired or two-group comparisons of their areas, precision-recall curves and classifier metrics. |
| SPCHART | Control charts (X-bar with R or s, individuals, p, np, c, u) and the process capability chart. |
| KM | Kaplan-Meier survival estimates by factor level and stratum, with tests that compare the levels. |
| K-M | Another name for KM. |
| SURVIVAL | Actuarial life tables over fixed time intervals, with the Wilcoxon (Gehan) comparison of groups. |
| REPORT | Case listings and summary statistics by break groups, laid out as a report. |
| MATRIX | Run a program in the matrix language, up to END MATRIX. |
Time series
| 命令 | 功能 {#what-it-does} |
|---|---|
| TSET | Settings shared by the time series procedures. |
| TSHOW | List the time series settings. |
| VERIFY | Check the DATE variables and report the USE and PREDICT periods. |
| CREATE | New series from functions of existing series: lags, differences, smoothers, FFT. |
| RMV | Copies of series with the missing values filled in by interpolation, a mean, a median or a trend. |
| ACF | Autocorrelations of time series, with standard errors, Box-Ljung tests and charts. |
| PACF | Partial autocorrelations of time series, with standard errors and charts. |
| CCF | Cross-correlations of pairs of time series, with standard errors and charts. |
| SEASON | Seasonal decomposition by ratios (or differences) to a moving average. |
| PREDICT | Set the forecast period of EXSMOOTH and ARIMA. |
| EXSMOOTH | Exponential smoothing with or without trend and season, with fitted values and forecasts. |
| ARIMA | Seasonal ARIMA models with regressors by exact maximum likelihood, with forecasts. |
| AREG | Regression whose errors follow a first-order autoregressive process. |
| SPECTRA | Periodogram, smoothed spectral density and cross-spectra of series. |
| 2SLS | Two-stage least squares for equations with endogenous predictors. |
| TSMODEL | Exponential smoothing and ARIMA models of series, picked by hand or by the expert modeler, with forecasts. |
| TSAPPLY | Forecasts from time series models that TSMODEL saved, as they are or estimated again. |
| TSPLOT | Chart of time series over the cases, as chart data. |
| CASEPLOT | Chart of time series with the cases down the vertical axis, as chart data. |
| FIT | Goodness-of-fit statistics of residual series from time series models. |
自定义表格
| 命令 | 功能 {#what-it-does} |
|---|---|
| CTABLES | Custom tables: counts, percentages and statistics by categories. |
| DMTABLES | Another name for CTABLES. |
| MRSETS | Define, delete and list multiple response sets. |
Complex samples
| 命令 | 功能 {#what-it-does} |
|---|---|
| CSPLAN | Write or show the plan of a complex sample: how to draw it, or how to analyze it. |
| CSSELECT | Draw a complex sample from the active dataset by a plan written by CSPLAN SAMPLE. |
| CSDESCRIPTIVES | Means, sums and ratios of a complex sample with design-based standard errors and design effects. |
| CSTABULATE | One-way and two-way tables of a complex sample with design-based errors and adjusted tests. |
| CSGLM | Linear regression, ANOVA and ANCOVA on a complex sample, with design-based standard errors and tests. |
| CSLOGISTIC | Binary and multinomial logistic regression on a complex sample, with design-based standard errors and tests. |
| CSORDINAL | Ordinal regression (cumulative link model) on a complex sample, with design-based standard errors and tests. |
| CSCOXREG | Cox proportional hazards regression on a complex sample, with design-based standard errors and tests. |
Macros, files and session
| 命令 | 功能 {#what-it-does} |
|---|---|
| DEFINE | Define a macro: a name that stands for syntax, with arguments. |
| INSERT | Run the commands of another syntax file in place of this command. |
| INCLUDE | Run the commands of another syntax file, read by the batch rules. |
| BEGIN PROGRAM | A block of code in another programming language; it is skipped with a warning. |
| SET | Change settings of the session. |
| SHOW | Show the current settings. |
| PRESERVE | Store the current settings and folder, to bring them back with RESTORE. |
| RESTORE | Bring back the settings and folder the last PRESERVE stored. |
| CACHE | Accepted and has nothing to do: the data are always kept in memory. |
| CD | Change the folder relative file names start from. |
| PROCEDURE OUTPUT | Name the file the next procedures write their results to. |
| FILE HANDLE | Give a file or a folder a short name to use in place of its path. |
| DATASET NAME | Give the active dataset a name, so that it stays open when another one becomes active. |
| DATASET ACTIVATE | Make a named dataset the active one. |
| DATASET COPY | Copy the active dataset, as it is now, into a named dataset. |
| DATASET DECLARE | Reserve a dataset name for a dataset that a later command creates. |
| DATASET CLOSE | Close a named dataset, or take the name off the active one. |
| DATASET DISPLAY | List the open datasets. |
| USE | Set the historical period of the time series procedures, or use all cases. |
| DISPLAY | Show dictionary information of the active dataset. |
| LIST | List the values of cases. |
| TITLE | Put a title in the output, above the output that follows. |
| SUBTITLE | Put a subtitle in the output, above the output that follows. |
| ECHO | Show a text in the output. |
| ERASE | Delete a file. |
| PERMISSIONS | Make a file read-only, or writeable for its owner. |
| HOST | Refused: Statscraft never runs operating system commands from syntax. |
| OUTPUT NEW | Start a new output document, which gets the tables from now on. |
| OUTPUT NAME | Name the output document that gets the tables. |
| OUTPUT ACTIVATE | Send the tables from now on to an open output document. |
| OUTPUT CLOSE | Close an output document, or all of them. |
| OUTPUT DISPLAY | List the open output documents. |
| OUTPUT EXPORT | Write the tables and charts of an output document to a workbook, document, presentation, PDF, web page, text or CSV file. |
| OUTPUT SAVE | Save an output document as a Statscraft output file (.scout). |
| OUTPUT OPEN | Open a Statscraft output file (.scout) as a new output document. |
| OUTPUT MODIFY | Delete, hide, rename, sort, transpose or reformat items of an output document. |
| OMS | Send the tables, charts and warnings of the commands that follow to a file, or keep them out of the results. |
| OMSEND | End OMS requests and the OMS log. |
| OMSINFO | List the OMS requests in force. |
| OMSLOG | Keep a log of when OMS requests start and end and which files they write. |
| BEGIN CHART | A Statscraft extension: a chart given as JSON goes to the output like a procedure’s chart. |
| FINISH | End the job: the commands after it are not read. |
General rules of the language
A command ends at a line whose last character is a period, at a blank line, or at the end of input.
Command names and keywords are case-insensitive and may be shortened to three or more letters.
varlist: variable names, a range written as first TO last, or ALL.
Strings use single or double quotes; double the quote character to include it. A string may
run on over line breaks, which it keeps; 'a' + 'b' joins two strings into one.
Comments: a command starting with * or COMMENT, or /* text */ inside a line.
Expressions: + - * / **, = <> < > <= >= (or EQ NE LT GT LE GE), AND OR NOT (or & | ~),
functions such as MEAN(a, b) or SUM(q1 TO q5); LAG(var [, n]) is the value n cases back.
A function name may be shortened to three or more letters that start no other function.
An expression nests at most 64 levels of parentheses and functions and holds at most 1500 operators (use SUM(x1 TO x2000) for a longer sum).
Scratch variables start with #: they begin at 0 or blank, keep their value from case to case,
are never saved and are gone when the next procedure starts. System variables: $CASENUM
is the case number, $SYSMIS the system-missing value, $JDATE today as a day count (1 is
15 October 1582), $DATE and $DATE11 today as dd-mmm-yy and dd-mmm-yyyy text, $TIME now in
seconds (a date value), $LENGTH and $WIDTH the SET LENGTH and WIDTH.
Functions of expressions (COMPUTE, IF, SELECT IF, DO IF, ELSE IF, LOOP IF, END LOOP IF):
Arithmetic: ABS RND TRUNC MOD SQRT EXP LN LG10 LNGAMMA SIN COS TAN ARSIN ARCOS ARTAN.
Statistical, with .n for the valid values needed (MEAN.2): SUM MEAN MEDIAN MIN MAX SD VARIANCE
CFVAR. Missing values: MISSING SYSMIS VALUE NMISS NVALID. Logical: ANY RANGE. Also LAG and
VALUELABEL.
Strings: CONCAT LENGTH CHAR.LENGTH UPCASE LOWER LTRIM RTRIM NTRIM SUBSTR CHAR.SUBSTR INDEX
CHAR.INDEX RINDEX CHAR.RINDEX LPAD CHAR.LPAD RPAD CHAR.RPAD REPLACE STRUNC CHAR.MBLEN
MBLEN.BYTE NORMALIZE NUMBER STRING.
Dates and times: DATE.DMY DATE.MDY DATE.MOYR DATE.QYR DATE.WKYR DATE.YRDAY YRMODA TIME.DAYS
TIME.HMS CTIME.DAYS CTIME.HOURS CTIME.MINUTES CTIME.SECONDS XDATE.DATE XDATE.HOUR XDATE.JDAY
XDATE.MDAY XDATE.MINUTE XDATE.MONTH XDATE.QUARTER XDATE.SECOND XDATE.TDAY XDATE.TIME
XDATE.WEEK XDATE.WKDAY XDATE.YEAR DATEDIFF DATESUM (units years quarters months weeks days
hours minutes seconds; DATESUM methods 'closest', the default, and 'rollover').
Distributions: CDFNORM PROBIT, and CDF.d IDF.d PDF.d NCDF.d NPDF.d SIG.d RV.d where the
distribution d has them: BERNOULLI BETA BINOM BVNOR CAUCHY CHISQ EXP F GAMMA GEOM HALFNRM HYPER
IGAUSS LAPLACE LNORMAL LOGISTIC NEGBIN NORMAL PARETO POISSON SMOD SRANGE T UNIFORM WEIBULL
(NCDF and NPDF: BETA CHISQ F T; SIG: CHISQ F). UNIFORM(max), NORMAL(sd) and the RV functions
draw random numbers. An argument out of range gives system-missing.