|
SPSS at Ole Miss: Part II
This is the second part of our article on SPSS. In
part one data and variables were stored in the SPSS save file. In this
part the data and the variables stored will be recalled to perform some
statistical analysis.
Data and programs saved in binary format can be easily retrieved and analyzed,
also data saved in binary format runs faster. The drawback and the shortfall
of binary files are that when software makers change versions sometimes these
files are not compatible with the new version of the software, and files or
data can't be interchanged between various packages. For example data saved in
SAS save file can't directly be used in SPSS.
The file created in
part one was named "tdisk.sav".
To activate SPSS on willow, user enters:
spss –m part2.spss > my.out
In this example part2.spss is the user input to the SPSS
software. In this case part2.spss is the name of the following
program, which can be found at /users/local/appl/examples/part2.spss.
Furthermore, my.out is where SPSS saves the output.
Set width 80
get file 'tdisk.sav'
/* user is requesting to activate a SPSS save file called "tdisk.sav" */
/* */
/* Below, user asking SPSS to run frequencies on his data */
/* crosstabs tables = ind by dep */
/* /statistics = chisq */
/* the above two lines are commented out, if activated will produce Chisq table. */
frequencies variables=ind
/barchart.freq.
/* user asking SPSS to run frequencies on variable “ind” and draw a bar chart using this data*/
The above program activates the SPSS save file called tdisk.sav. The program
is self explanatory and creates the following output:
1 0 /* Works as of 2/3/003 */
2 0 SET WIDTH 80
3 get file '/users/ccsam/spss/tdisk.sav'.
4 /* user is requesting to activate a SPSS save file called "tdisk.sav" */
5 /* */
6 /* Below, user asking SPSS to run frequencies on his data */
7 /* crosstabs tables = ind by dep */
8 /* /statistics = chisq */
9 /* the above two lines are commented out, if activated will produce Chisq table.
10 frequencies variables=ind
11 /barchart.freq.
12 /* user asking SPSS to run frequencies on var. ind and draw a bar chart */
IND
Valid Cum
Value Label Value Frequency Percent Percent Percent
1 7 53.8 53.8 53.8
2 6 46.2 46.2 100.0
------- ------- -------
Total 13 100.0 100.0
|
1 |*********************************** 7
|
2 |****************************** 6
|
+---------+---------+---------+---------+---------+
0 2 4 6 8 10
Frequency
Valid cases 13 Missing cases 0
14
End of job: 13 command lines 0 errors 0 warnings 0 CPU seconds
|