1 /* PSPP - a program for statistical analysis.
2 Copyright (C) 2006, 2009, 2010, 2011, 2013, 2016 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
17 /* Utility commands acceptable anywhere. */
18 DEF_CMD (S_ANY, F_ENHANCED, "CLOSE FILE HANDLE", cmd_close_file_handle)
19 DEF_CMD (S_ANY, 0, "CACHE", cmd_cache)
20 DEF_CMD (S_ANY, 0, "CD", cmd_cd)
21 DEF_CMD (S_ANY, 0, "DEFINE", cmd_define)
22 DEF_CMD (S_ANY, 0, "DO REPEAT", cmd_do_repeat)
23 DEF_CMD (S_ANY, 0, "END REPEAT", cmd_end_repeat)
24 DEF_CMD (S_ANY, 0, "ECHO", cmd_echo)
25 DEF_CMD (S_ANY, 0, "ERASE", cmd_erase)
26 DEF_CMD (S_ANY, 0, "EXIT", cmd_finish)
27 DEF_CMD (S_ANY, 0, "FILE HANDLE", cmd_file_handle)
28 DEF_CMD (S_ANY, 0, "FILE LABEL", cmd_file_label)
29 DEF_CMD (S_ANY, 0, "FINISH", cmd_finish)
30 DEF_CMD (S_ANY, 0, "HOST", cmd_host)
31 DEF_CMD (S_ANY, 0, "INCLUDE", cmd_include)
32 DEF_CMD (S_ANY, 0, "INSERT", cmd_insert)
33 DEF_CMD (S_ANY, 0, "MATRIX", cmd_matrix)
34 DEF_CMD (S_ANY, 0, "MCONVERT", cmd_mconvert)
35 DEF_CMD (S_ANY, 0, "N OF CASES", cmd_n_of_cases)
36 DEF_CMD (S_ANY, F_ABBREV, "N", cmd_n_of_cases)
37 DEF_CMD (S_ANY, 0, "NEW FILE", cmd_new_file)
38 DEF_CMD (S_ANY, 0, "OUTPUT", cmd_output)
39 DEF_CMD (S_ANY, 0, "PERMISSIONS", cmd_permissions)
40 DEF_CMD (S_ANY, 0, "PRESERVE", cmd_preserve)
41 DEF_CMD (S_ANY, F_ABBREV, "Q", cmd_finish)
42 DEF_CMD (S_ANY, 0, "QUIT", cmd_finish)
43 DEF_CMD (S_ANY, 0, "RESTORE", cmd_restore)
44 DEF_CMD (S_ANY, 0, "SET", cmd_set)
45 DEF_CMD (S_ANY, 0, "SHOW", cmd_show)
46 DEF_CMD (S_ANY, 0, "SUBTITLE", cmd_subtitle)
47 DEF_CMD (S_ANY, 0, "SYSFILE INFO", cmd_sysfile_info)
48 DEF_CMD (S_ANY, 0, "TITLE", cmd_title)
50 /* Commands that define (or replace) the active dataset. */
51 DEF_CMD (S_INITIAL | S_DATA, 0, "ADD FILES", cmd_add_files)
52 DEF_CMD (S_ANY, 0, "DATA LIST", cmd_data_list)
53 DEF_CMD (S_INITIAL | S_DATA, 0, "GET", cmd_get)
54 DEF_CMD (S_INITIAL | S_DATA, 0, "GET DATA", cmd_get_data)
55 DEF_CMD (S_INITIAL | S_DATA, 0, "IMPORT", cmd_import)
56 DEF_CMD (S_INITIAL | S_DATA, 0, "INPUT PROGRAM", cmd_input_program)
57 DEF_CMD (S_INITIAL | S_DATA, 0, "MATCH FILES", cmd_match_files)
58 DEF_CMD (S_INITIAL | S_DATA, 0, "MATRIX DATA", cmd_matrix_data)
59 DEF_CMD (S_INITIAL | S_DATA, 0, "UPDATE", cmd_update)
60 DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET ACTIVATE", cmd_dataset_activate)
61 DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET DECLARE", cmd_dataset_declare)
62 DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET CLOSE", cmd_dataset_close)
63 DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET COPY", cmd_dataset_copy)
64 DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET NAME", cmd_dataset_name)
65 DEF_CMD (S_INITIAL | S_DATA, 0, "DATASET DISPLAY", cmd_dataset_display)
67 /* Utilities that may appear after active file definition or within INPUT PROGRAM. */
68 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "ADD VALUE LABELS", cmd_add_value_labels)
69 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "ADD DOCUMENT", cmd_add_documents)
70 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "APPLY DICTIONARY", cmd_apply_dictionary)
71 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "DATAFILE ATTRIBUTE", cmd_datafile_attribute)
72 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "DISPLAY", cmd_display)
73 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "DOCUMENT", cmd_document)
74 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "DROP DOCUMENTS", cmd_drop_documents)
75 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "FORMATS", cmd_formats)
76 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "LEAVE", cmd_leave)
77 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "MISSING VALUES", cmd_missing_values)
78 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "MRSETS", cmd_mrsets)
79 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "PRINT FORMATS", cmd_print_formats)
80 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "SPLIT FILE", cmd_split_file)
81 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "VALUE LABELS", cmd_value_labels)
82 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "VARIABLE ALIGNMENT", cmd_variable_alignment)
83 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "VARIABLE ATTRIBUTE", cmd_variable_attribute)
84 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "VARIABLE LABELS", cmd_variable_labels)
85 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "VARIABLE LEVEL", cmd_variable_level)
86 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "VARIABLE ROLE", cmd_variable_role)
87 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "VARIABLE WIDTH", cmd_variable_width)
88 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "VECTOR", cmd_vector)
89 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "WEIGHT", cmd_weight)
90 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "WRITE FORMATS", cmd_write_formats)
92 /* Transformations. */
93 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "BREAK", cmd_break)
94 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "COMPUTE", cmd_compute)
95 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "DO IF", cmd_do_if)
96 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "IF", cmd_if)
97 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "LOOP", cmd_loop)
98 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "NUMERIC", cmd_numeric)
99 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "PRINT EJECT", cmd_print_eject)
100 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "PRINT SPACE", cmd_print_space)
101 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "PRINT", cmd_print)
102 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "RECODE", cmd_recode)
103 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "STRING", cmd_string)
104 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "WRITE", cmd_write)
105 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, F_ENHANCED, "XEXPORT", cmd_xexport)
106 DEF_CMD (S_DATA | S_INPUT_PROGRAM | S_NESTED_ANY, 0, "XSAVE", cmd_xsave)
108 /* Restricted transformations. */
109 DEF_CMD (S_DATA | S_NESTED_DATA, 0, "SELECT IF", cmd_select_if)
111 /* Commands that may appear after active dataset definition. */
112 DEF_CMD (S_DATA, 0, "AGGREGATE", cmd_aggregate)
113 DEF_CMD (S_DATA, 0, "AUTORECODE", cmd_autorecode)
114 DEF_CMD (S_DATA, 0, "BEGIN DATA", cmd_begin_data)
115 DEF_CMD (S_DATA, 0, "COUNT", cmd_count)
116 DEF_CMD (S_DATA, 0, "CROSSTABS", cmd_crosstabs)
117 DEF_CMD (S_DATA, 0, "CTABLES", cmd_ctables)
118 DEF_CMD (S_DATA, 0, "CORRELATIONS", cmd_correlation)
119 DEF_CMD (S_DATA, 0, "DELETE VARIABLES", cmd_delete_variables)
120 DEF_CMD (S_DATA, 0, "DESCRIPTIVES", cmd_descriptives)
121 DEF_CMD (S_DATA, 0, "EXAMINE", cmd_examine)
122 DEF_CMD (S_DATA, 0, "EXECUTE", cmd_execute)
123 DEF_CMD (S_DATA, 0, "EXPORT", cmd_export)
124 DEF_CMD (S_DATA, 0, "FACTOR", cmd_factor)
125 DEF_CMD (S_DATA, 0, "FILTER", cmd_filter)
126 DEF_CMD (S_DATA, 0, "FLIP", cmd_flip)
127 DEF_CMD (S_DATA, 0, "FREQUENCIES", cmd_frequencies)
128 DEF_CMD (S_DATA, 0, "GLM", cmd_glm)
129 DEF_CMD (S_DATA, 0, "GRAPH", cmd_graph)
130 DEF_CMD (S_DATA, 0, "LIST", cmd_list)
131 DEF_CMD (S_DATA, 0, "LOGISTIC REGRESSION", cmd_logistic)
132 DEF_CMD (S_DATA, 0, "MEANS", cmd_means)
133 DEF_CMD (S_DATA, 0, "MODIFY VARS", cmd_modify_vars)
134 DEF_CMD (S_DATA, 0, "NPAR TESTS", cmd_npar_tests)
135 DEF_CMD (S_DATA, 0, "ONEWAY", cmd_oneway)
136 DEF_CMD (S_DATA, 0, "PEARSON CORRELATIONS", cmd_correlation)
137 DEF_CMD (S_DATA, 0, "QUICK CLUSTER", cmd_quick_cluster)
138 DEF_CMD (S_DATA, 0, "RANK", cmd_rank)
139 DEF_CMD (S_DATA, 0, "REGRESSION", cmd_regression)
140 DEF_CMD (S_DATA, 0, "RELIABILITY", cmd_reliability)
141 DEF_CMD (S_DATA, 0, "RENAME VARIABLES", cmd_rename_variables)
142 DEF_CMD (S_DATA, 0, "ROC", cmd_roc)
143 DEF_CMD (S_DATA, 0, "SAMPLE", cmd_sample)
144 DEF_CMD (S_DATA, 0, "SAVE", cmd_save)
145 DEF_CMD (S_DATA, 0, "SAVE DATA COLLECTION", cmd_save_data_collection)
146 DEF_CMD (S_DATA, 0, "SAVE TRANSLATE", cmd_save_translate)
147 DEF_CMD (S_DATA, 0, "SORT CASES", cmd_sort_cases)
148 DEF_CMD (S_DATA, 0, "SORT VARIABLES", cmd_sort_variables)
149 DEF_CMD (S_DATA, 0, "T-TEST", cmd_t_test)
150 DEF_CMD (S_DATA, 0, "TEMPORARY", cmd_temporary)
151 DEF_CMD (S_DATA, 0, "USE", cmd_use)
153 /* Commands valid only inside INPUT PROGRAM. */
154 DEF_CMD (S_INPUT_PROGRAM | S_NESTED_INPUT_PROGRAM, 0, "END CASE", cmd_end_case)
155 DEF_CMD (S_INPUT_PROGRAM | S_NESTED_INPUT_PROGRAM, 0, "END FILE", cmd_end_file)
156 DEF_CMD (S_INPUT_PROGRAM | S_NESTED_INPUT_PROGRAM, 0, "REREAD", cmd_reread)
158 /* Not really commands, but part of LOOP and DO IF syntax. */
159 DEF_CMD (S_ANY, 0, "ELSE IF", cmd_inside_do_if)
160 DEF_CMD (S_ANY, 0, "ELSE", cmd_inside_do_if)
161 DEF_CMD (S_ANY, 0, "END IF", cmd_inside_do_if)
162 DEF_CMD (S_ANY, 0, "END LOOP", cmd_inside_loop)
164 /* Commands for testing PSPP. */
165 DEF_CMD (S_ANY, F_TESTING, "DEBUG EXPAND", cmd_debug_expand)
166 DEF_CMD (S_ANY, F_TESTING, "DEBUG EVALUATE", cmd_debug_evaluate)
167 DEF_CMD (S_ANY, F_TESTING, "DEBUG FORMAT GUESSER", cmd_debug_format_guesser)
168 DEF_CMD (S_ANY, F_TESTING, "DEBUG MOMENTS", cmd_debug_moments)
169 DEF_CMD (S_ANY, F_TESTING, "DEBUG PAPER SIZE", cmd_debug_paper_size)
170 DEF_CMD (S_ANY, F_TESTING, "DEBUG POOL", cmd_debug_pool)
171 DEF_CMD (S_ANY, F_TESTING, "DEBUG FLOAT FORMAT", cmd_debug_float_format)
172 DEF_CMD (S_ANY, F_TESTING, "DEBUG XFORM FAIL", cmd_debug_xform_fail)
173 DEF_CMD (S_DATA, F_TESTING, "DEBUG MATRIX READ", cmd_debug_matrix_read)
175 /* Unimplemented commands. */
176 UNIMPL_CMD ("2SLS", "Two stage least squares regression")
177 UNIMPL_CMD ("ACF", "Autocorrelation function")
178 UNIMPL_CMD ("ALSCAL", "Multidimensional scaling")
179 UNIMPL_CMD ("ANACOR", "Correspondence analysis")
180 UNIMPL_CMD ("ANOVA", "Factorial analysis of variance")
181 UNIMPL_CMD ("CASEPLOT", "Plot time series")
182 UNIMPL_CMD ("CASESTOVARS", "Restructure complex data")
183 UNIMPL_CMD ("CATPCA", "Categorical principle components analysis")
184 UNIMPL_CMD ("CATREG", "Categorical regression")
185 UNIMPL_CMD ("CCF", "Time series cross correlation")
186 UNIMPL_CMD ("CLEAR TRANSFORMATIONS", "Clears transformations from active dataset")
187 UNIMPL_CMD ("CLUSTER", "Hierarchical clustering")
188 UNIMPL_CMD ("CONJOINT", "Analyse full concept data")
189 UNIMPL_CMD ("CORRESPONDENCE", "Show correspondence")
190 UNIMPL_CMD ("COXREG", "Cox proportional hazards regression")
191 UNIMPL_CMD ("CREATE", "Create time series data")
192 UNIMPL_CMD ("CSDESCRIPTIVES", "Complex samples descriptives")
193 UNIMPL_CMD ("CSGLM", "Complex samples GLM")
194 UNIMPL_CMD ("CSLOGISTIC", "Complex samples logistic regression")
195 UNIMPL_CMD ("CSPLAN", "Complex samples design")
196 UNIMPL_CMD ("CSSELECT", "Select complex samples")
197 UNIMPL_CMD ("CSTABULATE", "Tabulate complex samples")
198 UNIMPL_CMD ("CURVEFIT", "Fit curve to line plot")
199 UNIMPL_CMD ("DATE", "Create time series data")
200 UNIMPL_CMD ("DETECTANOMALY", "Find unusual cases")
201 UNIMPL_CMD ("DISCRIMINANT", "Linear discriminant analysis")
202 UNIMPL_CMD ("EDIT", "obsolete")
203 UNIMPL_CMD ("END FILE TYPE", "Ends complex data input")
204 UNIMPL_CMD ("FILE TYPE", "Complex data input")
205 UNIMPL_CMD ("FIT", "Goodness of Fit")
206 UNIMPL_CMD ("GENLOG", "Categorical model fitting")
207 UNIMPL_CMD ("GET TRANSLATE", "Read other file formats")
208 UNIMPL_CMD ("GGRAPH", "Custom defined graphs")
209 UNIMPL_CMD ("HILOGLINEAR", "Hierarchical loglinear models")
210 UNIMPL_CMD ("HOMALS", "Homogeneity analysis")
211 UNIMPL_CMD ("IGRAPH", "Interactive graphs")
212 UNIMPL_CMD ("INFO", "Local Documentation")
213 UNIMPL_CMD ("KEYED DATA LIST", "Read nonsequential data")
214 UNIMPL_CMD ("KM", "Kaplan-Meier")
215 UNIMPL_CMD ("LOGLINEAR", "General model fitting")
216 UNIMPL_CMD ("MANOVA", "Multivariate analysis of variance")
217 UNIMPL_CMD ("MAPS", "Geographical display")
218 UNIMPL_CMD ("MIXED", "Mixed linear models")
219 UNIMPL_CMD ("MODEL CLOSE", "Close server connection")
220 UNIMPL_CMD ("MODEL HANDLE", "Define server connection")
221 UNIMPL_CMD ("MODEL LIST", "Show existing models")
222 UNIMPL_CMD ("MODEL NAME", "Specify model label")
223 UNIMPL_CMD ("MULTIPLE CORRESPONDENCE", "Multiple correspondence analysis")
224 UNIMPL_CMD ("MULT RESPONSE", "Multiple response analysis")
225 UNIMPL_CMD ("MVA", "Missing value analysis")
226 UNIMPL_CMD ("NAIVEBAYES", "Small sample bayesian prediction")
227 UNIMPL_CMD ("NLR", "Non Linear Regression")
228 UNIMPL_CMD ("NOMREG", "Multinomial logistic regression")
229 UNIMPL_CMD ("NONPAR CORR", "Nonparametric correlation")
230 UNIMPL_CMD ("NUMBERED", "")
231 UNIMPL_CMD ("OLAP CUBES", "On-line analytical processing")
232 UNIMPL_CMD ("OMS", "Output management")
233 UNIMPL_CMD ("ORTHOPLAN", "Orthogonal effects design")
234 UNIMPL_CMD ("OVERALS", "Nonlinear canonical correlation")
235 UNIMPL_CMD ("PACF", "Partial autocorrelation")
236 UNIMPL_CMD ("PARTIAL CORR", "Partial correlation")
237 UNIMPL_CMD ("PLANCARDS", "Conjoint analysis planning")
238 UNIMPL_CMD ("PLUM", "Estimate ordinal regression models")
239 UNIMPL_CMD ("POINT", "Marker in keyed file")
240 UNIMPL_CMD ("PPLOT", "Plot time series variables")
241 UNIMPL_CMD ("PREDICT", "Specify forecast period")
242 UNIMPL_CMD ("PREFSCAL", "Multidimensional unfolding")
243 UNIMPL_CMD ("PRINCALS", "PCA by alternating least squares")
244 UNIMPL_CMD ("PROBIT", "Probit analysis")
245 UNIMPL_CMD ("PROCEDURE OUTPUT", "Specify output file")
246 UNIMPL_CMD ("PROXIMITIES", "Pairwise similarity")
247 UNIMPL_CMD ("PROXSCAL", "Multidimensional scaling of proximity data")
248 UNIMPL_CMD ("RATIO STATISTICS", "Descriptives of ratios")
249 UNIMPL_CMD ("READ MODEL", "Read new model")
250 UNIMPL_CMD ("RECORD TYPE", "Defines a type of record within FILE TYPE")
251 UNIMPL_CMD ("REFORMAT", "Read obsolete files")
252 UNIMPL_CMD ("REPEATING DATA", "Specify multiple cases per input record")
253 UNIMPL_CMD ("REPORT", "Pretty print working file")
254 UNIMPL_CMD ("RMV", "Replace missing values")
255 UNIMPL_CMD ("SCRIPT", "Run script file")
256 UNIMPL_CMD ("SEASON", "Estimate seasonal factors")
257 UNIMPL_CMD ("SELECTPRED", "Select predictor variables")
258 UNIMPL_CMD ("SPCHART", "Plot control charts")
259 UNIMPL_CMD ("SPECTRA", "Plot spectral density")
260 UNIMPL_CMD ("STEMLEAF", "Plot stem-and-leaf display")
261 UNIMPL_CMD ("SUMMARIZE", "Univariate statistics")
262 UNIMPL_CMD ("SURVIVAL", "Survival analysis")
263 UNIMPL_CMD ("TDISPLAY", "Display active models")
264 UNIMPL_CMD ("TREE", "Create classification tree")
265 UNIMPL_CMD ("TSAPPLY", "Apply time series model")
266 UNIMPL_CMD ("TSET", "Set time sequence variables")
267 UNIMPL_CMD ("TSHOW", "Show time sequence variables")
268 UNIMPL_CMD ("TSMODEL", "Estimate time series model")
269 UNIMPL_CMD ("TSPLOT", "Plot time sequence variables")
270 UNIMPL_CMD ("TWOSTEP CLUSTER", "Cluster observations")
271 UNIMPL_CMD ("UNIANOVA", "Univariate analysis")
272 UNIMPL_CMD ("UNNUMBERED", "obsolete")
273 UNIMPL_CMD ("VALIDATEDATA", "Identify suspicious cases")
274 UNIMPL_CMD ("VARCOMP", "Estimate variance")
275 UNIMPL_CMD ("VARSTOCASES", "Restructure complex data")
276 UNIMPL_CMD ("VERIFY", "Report time series")
277 UNIMPL_CMD ("WLS", "Weighted least squares regression")
278 UNIMPL_CMD ("XGRAPH", "High resolution charts")