|
|
|
1 | (14) |
|
|
|
3 | (4) |
|
|
|
4 | (1) |
|
|
|
5 | (1) |
|
|
|
5 | (1) |
|
|
|
6 | (1) |
|
|
|
7 | (3) |
|
|
|
7 | (1) |
|
|
|
8 | (1) |
|
|
|
9 | (1) |
|
|
|
9 | (1) |
|
|
|
10 | (2) |
|
|
|
12 | (3) |
|
|
|
12 | (3) |
|
2 A Quick Data Analysis Tour |
|
|
15 | (40) |
|
|
|
17 | (1) |
|
|
|
18 | (4) |
|
|
|
20 | (1) |
|
|
|
21 | (1) |
|
Reading an ASCII Text File |
|
|
22 | (6) |
|
Sorting and Listing the Cases |
|
|
28 | (2) |
|
|
|
30 | (6) |
|
Frequency counts and percentages |
|
|
30 | (3) |
|
|
|
33 | (3) |
|
|
|
34 | (2) |
|
A First Look at Relations among Variables |
|
|
36 | (19) |
|
|
|
38 | (5) |
|
|
|
41 | (2) |
|
|
|
43 | (2) |
|
|
|
45 | (5) |
|
Tukey pairwise mean comparisons |
|
|
49 | (1) |
|
A two-way ANOVA with interaction |
|
|
50 | (4) |
|
|
|
54 | (1) |
|
|
|
55 | (20) |
|
Opening and Saving Data Files |
|
|
57 | (9) |
|
|
|
57 | (1) |
|
|
|
58 | (5) |
|
|
|
59 | (1) |
|
Importing ASCII text files |
|
|
60 | (1) |
|
|
|
61 | (1) |
|
|
|
62 | (1) |
|
Importing spreadsheet files (Excel and Lotus) |
|
|
62 | (1) |
|
Data Interchange Format (DIF) files |
|
|
62 | (1) |
|
|
|
63 | (3) |
|
|
|
64 | (1) |
|
|
|
64 | (1) |
|
Single or double precision |
|
|
65 | (1) |
|
|
|
65 | (1) |
|
Merging, Appending, and Transposing Data Files |
|
|
66 | (9) |
|
Merging files side by side (adding variables) |
|
|
67 | (5) |
|
Selecting a subset of the variables |
|
|
68 | (1) |
|
|
|
68 | (1) |
|
Generating replicates of a record |
|
|
69 | (3) |
|
3.1 A simple side-by-side merge |
|
|
69 | (1) |
|
3.2 Merging with a key variable |
|
|
70 | (2) |
|
Merging files end to end (adding cases) |
|
|
72 | (1) |
|
3.3 A simple end-to-end merge |
|
|
73 | (1) |
|
|
|
73 | (2) |
|
4 Saving and Printing Output and Graphics |
|
|
75 | (10) |
|
|
|
77 | (4) |
|
Saving output in the Main window |
|
|
77 | (1) |
|
Directing output to a file or printer |
|
|
78 | (1) |
|
Saving output and data in BASIC |
|
|
79 | (1) |
|
Saving results from statistical analyses |
|
|
79 | (1) |
|
|
|
79 | (2) |
|
Printing Data, Output, and Charts |
|
|
81 | (4) |
|
Sending output to the printer automatically |
|
|
81 | (1) |
|
|
|
82 | (1) |
|
Exporting results to other appliactions |
|
|
82 | (3) |
|
Exporting results using the clipboard |
|
|
83 | (2) |
|
5 Entering and Editing Data |
|
|
85 | (18) |
|
|
|
87 | (5) |
|
|
|
88 | (4) |
|
|
|
88 | (1) |
|
Numeric versus string variables |
|
|
89 | (1) |
|
|
|
89 | (1) |
|
|
|
90 | (1) |
|
|
|
90 | (1) |
|
|
|
91 | (1) |
|
|
|
92 | (2) |
|
Entering non-numeric data |
|
|
93 | (1) |
|
Entering data by case or by variable |
|
|
93 | (1) |
|
|
|
93 | (1) |
|
|
|
94 | (7) |
|
Moving around in the Data window |
|
|
94 | (1) |
|
|
|
95 | (1) |
|
Correcting data and changing variable names |
|
|
95 | (1) |
|
Adding variables or cases |
|
|
95 | (1) |
|
|
|
96 | (1) |
|
|
|
96 | (1) |
|
Cutting and pasting variables or cases |
|
|
97 | (1) |
|
|
|
97 | (1) |
|
|
|
98 | (1) |
|
Finding cases that satisfy conditions |
|
|
98 | (1) |
|
|
|
99 | (1) |
|
|
|
99 | (1) |
|
|
|
100 | (1) |
|
|
|
100 | (1) |
|
|
|
101 | (2) |
|
|
|
101 | (1) |
|
|
|
102 | (1) |
|
6 Re-expressing and Transforming Data |
|
|
103 | (48) |
|
|
|
105 | (3) |
|
Transformation Statements |
|
|
108 | (7) |
|
|
|
109 | (3) |
|
|
|
111 | (1) |
|
|
|
112 | (1) |
|
|
|
112 | (1) |
|
|
|
112 | (2) |
|
Specifying contiguous variables |
|
|
113 | (1) |
|
Multiple transformations: The @ sign |
|
|
113 | (1) |
|
|
|
114 | (1) |
|
|
|
115 | (31) |
|
|
|
115 | (1) |
|
|
|
115 | (1) |
|
|
|
116 | (2) |
|
Order of expression evaluation |
|
|
118 | (1) |
|
|
|
119 | (1) |
|
6.1 Creating lagged variables |
|
|
120 | (1) |
|
|
|
120 | (5) |
|
6.2 Finding the number of missing values |
|
|
121 | (1) |
|
|
|
122 | (1) |
|
6.4 Slope of the line-of-best-fit |
|
|
122 | (1) |
|
6.5 Computing the area under a curve |
|
|
123 | (1) |
|
6.6 Matching specific values |
|
|
124 | (1) |
|
Group and interval functions |
|
|
125 | (3) |
|
6.7 Recoding grouping variables: COD |
|
|
126 | (1) |
|
|
|
126 | (1) |
|
6.9 Defining intervals on a continuous variable: CUT |
|
|
127 | (1) |
|
6.10 Defining cutpoints alphabetically: CUT |
|
|
128 | (1) |
|
|
|
128 | (4) |
|
Current time and date: NOW$ |
|
|
129 | (1) |
|
Converting times and dates to numbers: VAL |
|
|
130 | (1) |
|
Converting times or dates to characters: STR$ |
|
|
130 | (1) |
|
|
|
131 | (1) |
|
|
|
131 | (1) |
|
|
|
132 | (11) |
|
|
|
133 | (1) |
|
6.12 Justifying character values |
|
|
134 | (1) |
|
6.13 Deleting blanks or other characters |
|
|
135 | (3) |
|
Locating a character in a string |
|
|
136 | (1) |
|
Converting numbers to characters and vice versa |
|
|
136 | (1) |
|
Extracting and inserting characters |
|
|
137 | (1) |
|
6.14 Converting numbers from European to American notation |
|
|
138 | (1) |
|
6.15 Extracting first names |
|
|
139 | (1) |
|
6.16 Concatenating character strings |
|
|
140 | (1) |
|
|
|
141 | (1) |
|
6.18 Using Soundex to code names |
|
|
141 | (2) |
|
|
|
143 | (3) |
|
|
|
145 | (1) |
|
6.19 Generating a new file of random data |
|
|
145 | (1) |
|
Ranking and Standardizing Variables |
|
|
146 | (3) |
|
|
|
146 | (1) |
|
|
|
147 | (2) |
|
|
|
148 | (1) |
|
|
|
149 | (2) |
|
|
|
149 | (1) |
|
|
|
149 | (1) |
|
|
|
150 | (1) |
|
|
|
151 | (16) |
|
|
|
153 | (1) |
|
|
|
154 | (8) |
|
7.1 Listing all variables and cases |
|
|
155 | (1) |
|
7.2 Listing 10 cases for selected variables |
|
|
155 | (1) |
|
7.3 Specifying an ID Variables |
|
|
156 | (1) |
|
7.4 Incorporating group labels |
|
|
156 | (1) |
|
|
|
157 | (3) |
|
7.5 Picture format example |
|
|
157 | (1) |
|
7.6 Displaying many variables in one panel |
|
|
158 | (2) |
|
Displaying dates and times |
|
|
160 | (1) |
|
Additional features for LIST |
|
|
161 | (1) |
|
|
|
162 | (3) |
|
|
|
162 | (1) |
|
|
|
163 | (1) |
|
|
|
164 | (1) |
|
7.9 Sorting in ascending or descending order |
|
|
164 | (1) |
|
Selecting a Subset of Cases |
|
|
165 | (2) |
|
|
|
165 | (1) |
|
|
|
166 | (1) |
|
8 Grouping Variables and By Groups |
|
|
167 | (18) |
|
|
|
169 | (1) |
|
|
|
170 | (8) |
|
|
|
170 | (4) |
|
|
|
172 | (1) |
|
8.1 Recording and labeling categories and intervals |
|
|
172 | (2) |
|
Including a category for missing codes |
|
|
174 | (2) |
|
Groping information for multiple variables |
|
|
175 | (1) |
|
|
|
175 | (1) |
|
|
|
176 | (2) |
|
|
|
178 | (4) |
|
8.2 Recording numeric and string variables: COD |
|
|
178 | (2) |
|
8.3 Is it or isn't it a match? INC |
|
|
180 | (1) |
|
8.4 Defining intervals: CUT |
|
|
180 | (2) |
|
|
|
180 | (1) |
|
Defining intervals alphabetically |
|
|
181 | (1) |
|
Stratifying the Analysis: By Groups |
|
|
182 | (3) |
|
By Groups and the plot Group option |
|
|
183 | (1) |
|
|
|
183 | (2) |
|
|
|
185 | (6) |
|
|
|
187 | (3) |
|
|
|
187 | (1) |
|
|
|
187 | (1) |
|
|
|
188 | (1) |
|
|
|
188 | (1) |
|
|
|
189 | (1) |
|
|
|
189 | (1) |
|
|
|
190 | (1) |
|
|
|
191 | (10) |
|
|
|
193 | (8) |
|
What do commands look like? |
|
|
193 | (1) |
|
|
|
194 | (3) |
|
|
|
194 | (1) |
|
|
|
195 | (1) |
|
|
|
195 | (1) |
|
Rules for entering commands |
|
|
195 | (2) |
|
|
|
197 | (1) |
|
|
|
197 | (3) |
|
|
|
197 | (1) |
|
|
|
198 | (1) |
|
Comments in commands files |
|
|
198 | (1) |
|
Saving commands along with output |
|
|
199 | (1) |
|
Commands to control output |
|
|
199 | (1) |
|
|
|
200 | (1) |
|
|
|
201 | (42) |
|
Reading and Entering Data |
|
|
203 | (15) |
|
|
|
204 | (7) |
|
11.1 Input data at the command prompt |
|
|
205 | (1) |
|
11.2 Reading an ASCII text file: GET |
|
|
205 | (1) |
|
11.3 Reading multiple lines per case |
|
|
206 | (1) |
|
11.4 Unequal length records |
|
|
207 | (1) |
|
11.5 Coding missing values |
|
|
208 | (1) |
|
11.6 Multiple cases per record: Backslash |
|
|
209 | (1) |
|
11.7 Incomplete records: Backslash |
|
|
210 | (1) |
|
|
|
211 | (2) |
|
|
|
211 | (2) |
|
11.8 Simple fixed-format example |
|
|
212 | (1) |
|
Entering triangular matrices |
|
|
213 | (2) |
|
Specifying file type: TYPE |
|
|
213 | (2) |
|
|
|
214 | (1) |
|
11.10 A matrix with a missing diagonal: DIAGONAL |
|
|
214 | (1) |
|
Troubleshooting ASCII files |
|
|
215 | (1) |
|
Errors and error messages |
|
|
215 | (1) |
|
|
|
216 | (2) |
|
Exporting Data to an ASCII Text File |
|
|
218 | (2) |
|
11.11 Converting a data file to a text file |
|
|
218 | (1) |
|
11.12 Saving data as text without quotes: PRINT |
|
|
219 | (1) |
|
Selecting, Listing, and Saving Cases |
|
|
220 | (3) |
|
11.13 Deleting selected cases |
|
|
220 | (1) |
|
11.14 Saving selected cases to a new file |
|
|
220 | (1) |
|
11.15 Omitting variable names and case number |
|
|
221 | (1) |
|
11.16 Using PRINT to save selected cases |
|
|
222 | (1) |
|
11.17 Printing the first three cases |
|
|
222 | (1) |
|
|
|
223 | (20) |
|
11.18 Example: A calender for the year 2000 |
|
|
223 | (2) |
|
|
|
225 | (1) |
|
|
|
225 | (1) |
|
Statements and expressions |
|
|
225 | (1) |
|
|
|
226 | (1) |
|
|
|
227 | (2) |
|
11.19 Using IF...THEN...ELSE |
|
|
228 | (1) |
|
|
|
229 | (3) |
|
11.20 Conditional FOR...NEXT |
|
|
230 | (1) |
|
11.21 FOX...NEXT with ELSE |
|
|
231 | (1) |
|
FOR...NEXT loops with subscripted variables |
|
|
232 | (2) |
|
Temporary subscripts using the ARRAY statement |
|
|
232 | (1) |
|
11.22 Logging 10 variables |
|
|
233 | (1) |
|
Dimensioning space for new variables |
|
|
234 | (1) |
|
|
|
234 | (5) |
|
11.23 Computing means of subscripted variables |
|
|
234 | (1) |
|
11.24 Computing means of unsubscripted variables: ARRAY |
|
|
235 | (2) |
|
Subgroup processing: BOG, EOG, BOF, EOF |
|
|
236 | (1) |
|
11.25 Printing the last case in a file |
|
|
237 | (1) |
|
11.26 Computing totals within groups |
|
|
237 | (1) |
|
11.27 Computing subgroup means |
|
|
238 | (1) |
|
|
|
239 | (1) |
|
|
|
239 | (1) |
|
|
|
239 | (1) |
|
|
|
240 | (1) |
|
REPEAT, for using the first n cases |
|
|
240 | (1) |
|
|
|
240 | (1) |
|
Selecting random subsamples |
|
|
241 | (2) |
|
11.30 Selecting a percentage of cases |
|
|
241 | (2) |
|
|
|
243 | (54) |
|
|
|
245 | (7) |
|
12.1 A multiple regression example |
|
|
246 | (3) |
|
Entering data and defining matrices |
|
|
246 | (1) |
|
Estimating the coefficients |
|
|
247 | (1) |
|
|
|
248 | (1) |
|
Eigenvalues and the condition number |
|
|
248 | (1) |
|
Transformations and statistical functions |
|
|
249 | (1) |
|
|
|
250 | (1) |
|
|
|
250 | (1) |
|
Identity and rectangular matrices |
|
|
251 | (1) |
|
|
|
251 | (1) |
|
Entering Data and Defining Matrices |
|
|
252 | (19) |
|
|
|
252 | (6) |
|
|
|
252 | (1) |
|
|
|
253 | (1) |
|
|
|
254 | (1) |
|
|
|
255 | (1) |
|
|
|
255 | (1) |
|
Requesting a directory of matrices |
|
|
255 | (1) |
|
Clearing matrices from memory |
|
|
256 | (1) |
|
|
|
256 | (1) |
|
Filling in missing values |
|
|
257 | (1) |
|
Increasing workspace size |
|
|
258 | (1) |
|
|
|
258 | (3) |
|
|
|
258 | (1) |
|
Extracting the diagonal or tri-diagonal |
|
|
259 | (1) |
|
Deleting rows and columns: DELETE and DROP |
|
|
260 | (1) |
|
Conditionally deleting rows: SELECT |
|
|
260 | (1) |
|
Deleting non-numeric columns: NUMERIC |
|
|
260 | (1) |
|
Deleting rows with missing values: COMPLETE |
|
|
261 | (1) |
|
|
|
261 | (10) |
|
|
|
261 | (1) |
|
|
|
262 | (1) |
|
Reordering rows and columns |
|
|
263 | (1) |
|
|
|
264 | (1) |
|
|
|
265 | (2) |
|
12.2 Packing two records into one |
|
|
266 | (1) |
|
Determining the dimensions of a matrix |
|
|
267 | (1) |
|
Changing a matrix to a vector and vice versa |
|
|
267 | (4) |
|
12.3 Writing a correlation matrix as a vector |
|
|
267 | (4) |
|
Transformations and Statistical Functions |
|
|
271 | (13) |
|
Element-by-element operators and function |
|
|
271 | (8) |
|
|
|
272 | (1) |
|
Element-by-element multiplication and division |
|
|
273 | (1) |
|
Raising each element to a power |
|
|
274 | (1) |
|
|
|
275 | (1) |
|
|
|
276 | (1) |
|
|
|
277 | (1) |
|
Determining whether two matrices are equal |
|
|
278 | (1) |
|
|
|
279 | (3) |
|
12.4 Results across rows and columns |
|
|
279 | (2) |
|
Correlation, covariance, and SSCP matrices |
|
|
281 | (1) |
|
12.5 Correlations for sets of variables |
|
|
281 | (1) |
|
|
|
282 | (1) |
|
Generating design variables |
|
|
283 | (1) |
|
|
|
284 | (13) |
|
|
|
284 | (2) |
|
Raising a matrix to a power |
|
|
285 | (1) |
|
|
|
285 | (1) |
|
the inverse, determinant, and trace |
|
|
286 | (2) |
|
|
|
286 | (1) |
|
|
|
287 | (1) |
|
|
|
287 | (1) |
|
|
|
288 | (1) |
|
The EIGVAL function of MAT |
|
|
288 | (1) |
|
The EIGEN function of CALL |
|
|
288 | (1) |
|
Cholesky, QR, and SVD decomposition |
|
|
289 | (2) |
|
|
|
289 | (1) |
|
|
|
290 | (1) |
|
|
|
291 | (1) |
|
Solving a system of linear equations |
|
|
291 | (6) |
|
|
|
293 | (4) |
|
|
|
294 | (3) |
| Appendix: Data Files |
|
297 | (12) |
| Index |
|
309 | |