Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Statscraft 0.7.0, release v0.7.0

Statscraft

A statistics workbench written in Rust: a command-line engine first, a desktop application after. It reads .sav files, runs the established statistics command syntax, and is built to be driven by people and AI agents alike: sessions that keep the data between partial runs, JSON output, errors with line and column, and help generated from the parser.

Statscraft is an independent project. It is not affiliated with the GNU PSPP project or the ArtCraft suite.

Status: early development. Licensed under MIT.

statscraft describe tests/fixtures/survey_basic.sav --json    dictionary and counts of a file
statscraft run job.sps                                        run a syntax file
statscraft run -s work --lines 1-6 job.sps                    run some lines in a session that keeps the data
statscraft check -s work job.sps                              validate without saving anything
statscraft run job.sps --xlsx tables.xlsx                     also write every table to an Excel workbook
statscraft help CTABLES                                       syntax of one command
statscraft-gui tests/fixtures/survey_basic.sav job.sps        the desktop window

(job.sps is the example from Getting started.)

What runs today: reading and writing data files, labels and missing values, transformations (COMPUTE, IF, DO IF, RECODE, COUNT, SELECT IF, AGGREGATE, SORT CASES, merging files), FREQUENCIES, DESCRIPTIVES, CROSSTABS, MEANS, T-TEST, ONEWAY, CORRELATIONS, NONPAR CORR, PARTIAL CORR, NPAR TESTS, EXAMINE, linear regression (REGRESSION, with stepwise selection, residuals and diagnostics), scale reliability (RELIABILITY: alpha, split-half and other models, intraclass correlations), logistic regression (LOGISTIC REGRESSION, with categorical covariates, stepwise selection and case diagnostics), the general linear model (UNIANOVA and GLM: factorial ANOVA and ANCOVA with Type I to IV sums of squares, estimated marginal means, post hoc tests, contrasts and repeated measures, and the older ANOVA with MCA tables), discriminant analysis (DISCRIMINANT, direct and stepwise, with classification), hierarchical clustering (CLUSTER, 37 proximity measures and seven methods), classification trees (TREE by CHAID and exhaustive CHAID), and custom tables (CTABLES) with multiple response sets and significance tests. The command pages list every command.

DATA LIST reads text data in fixed columns, freefield (FREE) or one case per line (LIST), inline between BEGIN DATA and END DATA or from a file, and warns with the line number of every value it cannot read.

SPLIT FILE runs every procedure per group of adjacent cases, LAYERED in one table or SEPARATE, FILTER leaves cases out of procedures without deleting them, TEMPORARY makes the changes after it last until the next procedure, N OF CASES keeps the first cases and SAMPLE a random sample; split and filter stay with the session’s dataset.

Scratch variables (#name) start at 0 or blank, keep their value from case to case and are gone at the next procedure; LAG gives a variable’s value in an earlier case as that case ended the data pass, and a pass that needs earlier cases runs case by case.

DO REPEAT repeats transformations with stand-ins replaced by variables or values (END REPEAT PRINT lists the generated commands), LOOP repeats them per case with an index, IF conditions and BREAK, and VECTOR names a range of existing or new variables for indexed use such as v(#i).

RANK saves ranks, fractional ranks, percentile groups, proportion estimates, normal and Savage scores as new variables, within groups of BY variables, with the four ways of treating ties.

AUTORECODE turns the values of variables into consecutive codes in new variables, labelled with the old values or their labels, in ascending or descending order, with user-missing values last and one scheme for several variables with /GROUP.

TREE grows a classification tree for a nominal or ordinal dependent by CHAID or exhaustive CHAID: predictor categories merged by significance, Bonferroni-adjusted splits, scale predictors cut into groups of equal size, missing values as a floating category, and the usual growth limits. It shows the tree as a table, the model summary, risk, classification and gain tables, and saves the node, the predicted category and the predicted probabilities. CRT and QUEST are not supported yet.