but to suppress the frequency count table (from PASTE ):
-
FREQUENCIES
VARIABLES=age
/FORMAT=LIMIT(10) /NTILES= 3
/STATISTICS=STDDEV MINIMUM MAXIMUM MEAN
/ORDER= ANALYSIS .
|
[NB: 10 is the default limit for format, but it can be set at any value]
But forget PASTE. I would have done (as a preliminary check on value range, outliers, unexpected values etc.)
freq var age.
…then to get Pallant’s cutting points: (which you can do just as easily from the frequency count)
freq var age /for not/ per 33 67.
For the recode (since you already have the valid range from the frequency check):
-
recode age
(18 thru 29 =1)
(30 thru 44 = 2)
(45 thru 82 = 3)
(else=sysmis)
into agegrp3.
|
…for the labels:
-
var lab agegrp3 ‘Grouped age (3 groups)’.
val lab agegrp3 1 ’18 - 29’ 2 ’30 - 44’ 3 ‘45+’.
|
…and for the frequency check on the new group:
-
Thus, all the above laborious steps in drop-down menus could have been done (again in seconds) with:
-
recode age (18 thru 29 =1)(30 thru 44 = 2)
(45 thru 82 = 3)(else=sysmis)
into agegrp3.
var lab agegrp3 ' Grouped age (3 groups)'.
val lab agegrp3 1 '18 - 29' 2 '30 - 44' 3 '45+'.
freq var agegrp3.
|
…but to be statistically correct:
comp age = age+0.5.
freq var age /for not /sta mea std /per 33 67.
…which is more accurate, but doesn’t change the groupings needed for recode into agegrp3
Exercise 4: Correlation (2005, pp78ff)
I found a major problem repeating this exercise from the book. Although the variable names are given in an initial decision-making table, they are not given in the actual exercises. The sample outputs use variable labels, not variable names, and this is confusing, especially for the second exercise for which, “Click on the first variable” is not particularly helpful. However, having worked out which variables (tpcoiss and tpstress) are supposed to be used:
Graphs
Scatter [Simple will be highlit]
Define
Scroll down to find the variables
Click and drag tpstress to the Y Axis box and tpcoiss to the X Axis box
then click OK
PASTE produces:
-
GRAPH
/SCATTERPLOT(BIVAR)=tpstress WITH tpcoiss
/MISSING=LISTWISE .
|
…but it’s quicker to write: GRAPH /SCAT tpstress WITH tpcoiss.
since LISTWISE is the default.
Share with your friends: |