GET FILE='nhtsa.sav'.
-CTABLES /TABLE=AgeGroup.
+CTABLES /TABLE=ageGroup.
GET FILE='nhtsa.sav'.
CTABLES
- /TABLE=qnd1 [MEAN, MEDIAN] BY qns3a
- /TABLE=AgeGroup [COLPCT, ROWPCT] BY qns3a.
+ /TABLE=age [MEAN, MEDIAN] BY gender
+ /TABLE=ageGroup [COLPCT, ROWPCT] BY gender.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE=AgeGroup [COLPCT 'Gender %' PCT5.0,
+CTABLES /TABLE=ageGroup [COLPCT 'Gender %' PCT5.0,
ROWPCT 'Age Group %' PCT5.0]
- BY qns3a.
+ BY gender.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE=(AgeGroup + qns1)[COLPCT] BY qns3a.
+CTABLES /TABLE=(ageGroup + membersOver16)[COLPCT] BY gender.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE=qnd1 [MEAN, MEDIAN] BY qns3a.
+CTABLES /TABLE=age [MEAN, MEDIAN] BY gender.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE=qnd1 [MEAN, MEDIAN] BY qns3a /SLABELS POSITION=ROW.
+CTABLES /TABLE=age [MEAN, MEDIAN] BY gender /SLABELS POSITION=ROW.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE=AgeGroup [TABLEPCT] /SLABELS VISIBLE=NO.
+CTABLES /TABLE=ageGroup [TABLEPCT] /SLABELS VISIBLE=NO.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE AgeGroup BY qns3a.
+CTABLES /TABLE ageGroup BY gender.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=OPPOSITE.
-CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=OPPOSITE.
+CTABLES /TABLE ageGroup BY gender /CLABELS ROWLABELS=OPPOSITE.
+CTABLES /TABLE ageGroup BY gender /CLABELS COLLABELS=OPPOSITE.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE=AgeGroup BY qns3a.
+CTABLES /TABLE=ageGroup BY gender.
GET FILE='nhtsa.sav'.
+VARIABLE LABELS
+ hasBeenPassengerOfDesignatedDriver 'desPas'
+ hasBeenPassengerOfDrunkDriver 'druPas'
+ isLicensedDriver 'licensed'
+ hasHostedEventWithAlcohol 'hostAlc'
+ hasBeenDesignatedDriver 'desDrv'.
CTABLES
- /VLABELS VARIABLES=ALL DISPLAY=NAME
- /TABLE qn61 > qn57 BY qnd7a > qn86 + qn64b BY qns3a[TABLEID, LAYERID, SUBTABLEID]
+ /TABLE hasBeenPassengerOfDesignatedDriver > hasBeenPassengerOfDrunkDriver
+ BY isLicensedDriver > hasHostedEventWithAlcohol + hasBeenDesignatedDriver
+ BY gender[TABLEID, LAYERID, SUBTABLEID]
/SLABELS POSITION=ROW.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE AgeGroup BY qns3a [ROWPCT, COLPCT].
+CTABLES /TABLE ageGroup BY gender [ROWPCT, COLPCT].
GET FILE='nhtsa.sav'.
CTABLES
- /TABLE AgeGroup BY qns3a [ROWPCT, COLPCT]
+ /TABLE ageGroup BY gender [ROWPCT, COLPCT]
/CLABELS COLLABELS=OPPOSITE.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE (qn105ba + qn105bb) [COLPCT].
-CTABLES /TABLE (qn105ba + qn105bb) [ROWPCT]
+CTABLES /TABLE (likelihoodOfBeingStoppedByPolice + likelihoodOfHavingAnAccident) [COLPCT].
+CTABLES /TABLE (likelihoodOfBeingStoppedByPolice + likelihoodOfHavingAnAccident) [ROWPCT]
/CLABELS ROW=OPPOSITE.
GET FILE='nhtsa.sav'.
CTABLES
- /TABLE qnd7a [COUNT, TOTALS[COUNT, VALIDN]]
- /CATEGORIES VARIABLES=qnd7a TOTAL=YES MISSING=INCLUDE.
+ /TABLE isLicensedDriver [COUNT, TOTALS[COUNT, VALIDN]]
+ /CATEGORIES VARIABLES=isLicensedDriver TOTAL=YES MISSING=INCLUDE.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE qn1.
-CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1, 2, 3].
+CTABLES /TABLE freqOfDriving.
+CTABLES /TABLE freqOfDriving /CATEGORIES VARIABLES=freqOfDriving [1, 2, 3].
GET FILE='nhtsa.sav'.
-CTABLES /TABLE qn1.
-CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 MISSING=INCLUDE.
+CTABLES /TABLE freqOfDriving.
+CTABLES /TABLE freqOfDriving /CATEGORIES VARIABLES=freqOfDriving MISSING=INCLUDE.
GET FILE='nhtsa.sav'.
CTABLES
- /TABLE qn1
- /CATEGORIES VARIABLES=qn1 [OTHERNM, SUBTOTAL='Valid Total',
- MISSING, SUBTOTAL='Missing Total']
- TOTAL=YES LABEL='Overall Total'.
+ /TABLE freqOfDriving
+ /CATEGORIES VARIABLES=freqOfDriving [OTHERNM, SUBTOTAL='Valid Total',
+ MISSING, SUBTOTAL='Missing Total']
+ TOTAL=YES LABEL='Overall Total'.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE AgeGroup > qns3a BY qn86.
+CTABLES /TABLE ageGroup > gender BY hasHostedEventWithAlcohol.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE=qn20 [MEAN F8.1, COUNT, VALIDN] > region
+CTABLES /TABLE=monthDaysMin1drink [MEAN F8.1, COUNT, VALIDN] > region
/CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE=qns1.
-CTABLES /TABLE=qns1 /CATEGORIES VARIABLES=qns1 EMPTY=EXCLUDE.
+CTABLES /TABLE=membersOver16.
+CTABLES /TABLE=membersOver16 /CATEGORIES VARIABLES=membersOver16 EMPTY=EXCLUDE.
/PPROPERTIES &all_drivers LABEL='All Drivers'
/PCOMPUTE &pct_never=EXPR([5] / ([1 THRU 2] + [3 THRU 4] + [5]) * 100)
/PPROPERTIES &pct_never LABEL='% Not Drivers' FORMAT=COUNT PCT40.1
- /TABLE=qn1 BY qns3a
- /CATEGORIES VARIABLES=qn1 [1 THRU 2, SUBTOTAL='Frequent Drivers',
- 3 THRU 4, SUBTOTAL='Infrequent Drivers',
- &all_drivers, 5, &pct_never,
- MISSING, SUBTOTAL='Not Drivers or Missing'].
+ /TABLE=freqOfDriving BY gender
+ /CATEGORIES VARIABLES=freqOfDriving [1 THRU 2,SUBTOTAL='Frequent Drivers',
+ 3 THRU 4, SUBTOTAL='Infrequent Drivers',
+ &all_drivers, 5, &pct_never,
+ MISSING, SUBTOTAL='Not Drivers or Missing'].
GET FILE='nhtsa.sav'.
-CTABLES /HIDESMALLCOUNTS COUNT=10 /TABLE qn37.
+CTABLES /HIDESMALLCOUNTS COUNT=10 /TABLE placeOfLastDrinkBeforeDrive.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE AgeGroup + qn1 BY qns3a.
+CTABLES /TABLE ageGroup + freqOfDriving BY gender.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE qn26 + qn27 > qns3a.
-CTABLES /TABLE (qn26 + qn27) > qns3a.
+CTABLES /TABLE hasConsideredReduction + hasBeenCriticized > gender.
+CTABLES /TABLE (hasConsideredReduction + hasBeenCriticized) > gender.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE qnd1.
+CTABLES /TABLE age.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE qnd1 > qns3a BY lang.
+CTABLES /TABLE age > gender BY lang.
GET FILE='nhtsa.sav'.
-CTABLES /TABLE qns3a > qnd1 BY lang.
+CTABLES /TABLE gender > age BY lang.
GET FILE='nhtsa.sav'.
CTABLES
- /TABLE qn20 BY qns3a
- /TABLE qn20 [C] BY qns3a.
+ /TABLE monthDaysMin1drink BY gender
+ /TABLE monthDaysMin1drink [C] BY gender.
of Drinking and Driving Attitudes and Behaviors, a public domain data
set from the (USA) National Highway Traffic Administration and
available at @url{https://data.transportation.gov}. @pspp{} includes
-this data set, with a slightly modified dictionary, as
+this data set, with a modified dictionary, as
@file{examples/nhtsa.sav}.
@node CTABLES Basics
@code{FREQUENCIES} command (@pxref{FREQUENCIES}):
@example
-CTABLES /TABLE=AgeGroup.
+CTABLES /TABLE=ageGroup.
@end example
@psppoutput {ctables1}
(@pxref{CROSSTABS}):
@example
-CTABLES /TABLE=AgeGroup BY qns3a.
+CTABLES /TABLE=ageGroup BY gender.
@end example
@psppoutput {ctables2}
axis, e.g.:
@example
-CTABLES /TABLE qn105ba BY AgeGroup > qns3a.
+CTABLES /TABLE likelihoodOfBeingStoppedByPolice BY ageGroup > gender.
@end example
@psppoutput {ctables3}
separately tabulates age group and driving frequency by gender:
@example
-CTABLES /TABLE AgeGroup + qn1 BY qns3a.
+CTABLES /TABLE ageGroup + freqOfDriving BY gender.
@end example
@psppoutput {ctables4}
tightly. Use parentheses to override operator precedence. Thus:
@example
-CTABLES /TABLE qn26 + qn27 > qns3a.
-CTABLES /TABLE (qn26 + qn27) > qns3a.
+CTABLES /TABLE hasConsideredReduction + hasBeenCriticized > gender.
+CTABLES /TABLE (hasConsideredReduction + hasBeenCriticized) > gender.
@end example
@psppoutput {ctables5}
of all of the data:
@example
-CTABLES /TABLE qnd1.
+CTABLES /TABLE age.
@end example
@psppoutput {ctables6}
language groups:
@example
-CTABLES /TABLE qns3a > qnd1 BY region.
+CTABLES /TABLE gender > age BY region.
@end example
@psppoutput {ctables7}
of the scalar and categorical variable are interchanged:
@example
-CTABLES /TABLE qnd1 > qns3a BY region.
+CTABLES /TABLE age > gender BY region.
@end example
@psppoutput {ctables8}
To treat a variable as categorical or scalar only for one use on
@code{CTABLES}, add @samp{[C]} or @samp{[S]}, respectively, after the
variable name. The following example shows the output when variable
-@code{qn20} is analyzed as scalar (the default for its measurement
+@code{monthDaysMin1drink} is analyzed as scalar (the default for its measurement
level) and as categorical:
@example
CTABLES
- /TABLE qn20 BY qns3a
- /TABLE qn20 [C] BY qns3a.
+ /TABLE monthDaysMin1drink BY gender
+ /TABLE monthDaysMin1drink [C] BY gender.
@end example
@psppoutput {ctables9}
@example
CTABLES
- /TABLE=qnd1 [MEAN, MEDIAN] BY qns3a
- /TABLE=AgeGroup [COLPCT, ROWPCT] BY qns3a.
+ /TABLE=age [MEAN, MEDIAN] BY gender
+ /TABLE=ageGroup [COLPCT, ROWPCT] BY gender.
@end example
@psppoutput {ctables10}
the summary function name. For example:
@example
-CTABLES /TABLE=AgeGroup [COLPCT 'Gender %' PCT5.0,
+CTABLES /TABLE=ageGroup [COLPCT 'Gender %' PCT5.0,
ROWPCT 'Age Group %' PCT5.0]
- BY qns3a.
+ BY gender.
@end example
@psppoutput {ctables11}
multiple variables. For example, both of these commands:
@example
-CTABLES /TABLE=AgeGroup[COLPCT] + qns1[COLPCT] BY qns3a.
-CTABLES /TABLE=(AgeGroup + qns1)[COLPCT] BY qns3a.
+CTABLES /TABLE=ageGroup[COLPCT] + membersOver16[COLPCT] BY gender.
+CTABLES /TABLE=(ageGroup + membersOver16)[COLPCT] BY gender.
@end example
@noindent
row variable and an innermost column variable within a single layer.
@end table
-The following shows how the output for the table expression @code{qn61
-> qn57 BY qnd7a > qn86 + qn64b BY qns3a}@footnote{This is not
-necessarily a meaningful table, so for clarity variable labels are
-omitted.} is divided up into @code{TABLE}, @code{LAYER}, and
-@code{SUBTABLE} areas. Each unique value for Table ID is one section,
-and similarly for Layer ID and Subtable ID. Thus, this output has two
-@code{TABLE} areas (one for @code{qnd7a} and one for @code{qn64b}),
+The following shows how the output for the table expression
+@code{hasBeenPassengerOfDesignatedDriver >
+hasBeenPassengerOfDrunkDriver BY isLicensedDriver >
+hasHostedEventWithAlcohol + hasBeenDesignatedDriver BY
+gender}@footnote{This is not necessarily a meaningful table. To make
+it easier to read, short variable labels are used.} is divided up into
+@code{TABLE}, @code{LAYER}, and @code{SUBTABLE} areas. Each unique
+value for Table ID is one section, and similarly for Layer ID and
+Subtable ID. Thus, this output has two @code{TABLE} areas (one for
+@code{isLicensedDriver} and one for @code{hasBeenDesignatedDriver}),
four @code{LAYER} areas (for those two variables, per layer), and 12
@code{SUBTABLE} areas.
@psppoutput {ctables22}
appears in a column. For example:
@example
-CTABLES /TABLE=qnd1 [MEAN, MEDIAN] BY qns3a.
+CTABLES /TABLE=age [MEAN, MEDIAN] BY gender.
@end example
@psppoutput {ctables13}
shown below:
@example
-CTABLES /TABLE=qnd1 [MEAN, MEDIAN] BY qns3a /SLABELS POSITION=ROW.
+CTABLES /TABLE=age [MEAN, MEDIAN] BY gender /SLABELS POSITION=ROW.
@end example
@psppoutput {ctables14}
evident, as in a simple case like this:
@example
-CTABLES /TABLE=AgeGroup [TABLEPCT] /SLABELS VISIBLE=NO.
+CTABLES /TABLE=ageGroup [TABLEPCT] /SLABELS VISIBLE=NO.
@end example
@psppoutput {ctables15}
variable on the columns axis:
@example
-CTABLES /TABLE AgeGroup BY qns3a.
+CTABLES /TABLE ageGroup BY gender.
@end example
@psppoutput {ctables16}
be categorical, on the given axis. For example:
@example
-CTABLES /TABLE AgeGroup BY qns3a /CLABELS ROWLABELS=OPPOSITE.
-CTABLES /TABLE AgeGroup BY qns3a /CLABELS COLLABELS=OPPOSITE.
+CTABLES /TABLE ageGroup BY gender /CLABELS ROWLABELS=OPPOSITE.
+CTABLES /TABLE ageGroup BY gender /CLABELS COLLABELS=OPPOSITE.
@end example
@psppoutput {ctables17}
For example, consider the following syntax and output:
@example
-CTABLES /TABLE AgeGroup BY qns3a [ROWPCT, COLPCT].
+CTABLES /TABLE ageGroup BY gender [ROWPCT, COLPCT].
@end example
@psppoutput {ctables23}
@example
CTABLES
- /TABLE AgeGroup BY qns3a [ROWPCT, COLPCT]
+ /TABLE ageGroup BY gender [ROWPCT, COLPCT]
/CLABELS COLLABELS=OPPOSITE.
@end example
@psppoutput {ctables24}
adapting to the changing definitions of rows and columns:
@example
-CTABLES /TABLE (qn105ba + qn105bb) [COLPCT].
-CTABLES /TABLE (qn105ba + qn105bb) [ROWPCT]
+CTABLES /TABLE (likelihoodOfBeingStoppedByPolice
+ + likelihoodOfHavingAnAccident) [COLPCT].
+CTABLES /TABLE (likelihoodOfBeingStoppedByPolice
+ + likelihoodOfHavingAnAccident) [ROWPCT]
/CLABELS ROW=OPPOSITE.
@end example
@psppoutput {ctables25}
can limit the displayed categories:
@example
-CTABLES /TABLE qn1.
-CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 [1, 2, 3].
+CTABLES /TABLE freqOfDriving.
+CTABLES /TABLE freqOfDriving /CATEGORIES VARIABLES=freqOfDriving [1, 2, 3].
@end example
@psppoutput {ctables27}
of a summary function, e.g.@: @code{KEY=COUNT}.
@ignore @c Not yet implemented
For summary functions, a variable name may be specified in
-parentheses, e.g.@: @code{KEY=MAXIUM(qnd1)}, and this is required for
+parentheses, e.g.@: @code{KEY=MAXIUM(age)}, and this is required for
functions that apply only to scalar variables. The @code{PTILE}
function also requires a percentage argument, e.g.@:
-@code{KEY=PTILE(qnd1, 90)}. Only summary functions used in the table
+@code{KEY=PTILE(age, 90)}. Only summary functions used in the table
may be used, except that @code{COUNT} is always allowed.
@end ignore
category list.
@example
-CTABLES /TABLE qn1.
-CTABLES /TABLE qn1 /CATEGORIES VARIABLES=qn1 MISSING=INCLUDE.
+CTABLES /TABLE freqOfDriving.
+CTABLES /TABLE freqOfDriving
+ /CATEGORIES VARIABLES=freqOfDriving MISSING=INCLUDE.
@end example
@psppoutput {ctables28}
@example
CTABLES
- /TABLE qn1
- /CATEGORIES VARIABLES=qn1 [OTHERNM, SUBTOTAL='Valid Total',
- MISSING, SUBTOTAL='Missing Total']
- TOTAL=YES LABEL='Overall Total'.
+ /TABLE freqOfDriving
+ /CATEGORIES VARIABLES=freqOfDriving [OTHERNM, SUBTOTAL='Valid Total',
+ MISSING, SUBTOTAL='Missing Total']
+ TOTAL=YES LABEL='Overall Total'.
@end example
@psppoutput {ctables29}
categorical @code{region} variable, as shown:
@example
-CTABLES /TABLE=region > qn20 [MEAN, VALIDN]
+CTABLES /TABLE=region > monthDaysMin1drink [MEAN, VALIDN]
/CATEGORIES VARIABLES=region TOTAL=YES LABEL='All regions'.
@end example
@psppoutput {ctables30}
@example
CTABLES
- /TABLE qnd7a [COUNT, TOTALS[COUNT, VALIDN]]
- /CATEGORIES VARIABLES=qnd7a TOTAL=YES MISSING=INCLUDE.
+ /TABLE isLicensedDriver [COUNT, TOTALS[COUNT, VALIDN]]
+ /CATEGORIES VARIABLES=isLicensedDriver TOTAL=YES MISSING=INCLUDE.
@end example
@psppoutput {ctables26}
or @code{OTHERNM}.
The following example syntax and output show the effect of
-@code{EMPTY=EXCLUDE} for the @code{qns1} variable, in which 0 is labeled
-``None'' but no cases exist with that value:
+@code{EMPTY=EXCLUDE} for the @code{membersOver16} variable, in which 0
+is labeled ``None'' but no cases exist with that value:
@example
-CTABLES /TABLE=qns1.
-CTABLES /TABLE=qns1 /CATEGORIES VARIABLES=qns1 EMPTY=EXCLUDE.
+CTABLES /TABLE=membersOver16.
+CTABLES /TABLE=membersOver16 /CATEGORIES VARIABLES=membersOver16 EMPTY=EXCLUDE.
@end example
@psppoutput {ctables31}
/PPROPERTIES &all_drivers LABEL='All Drivers'
/PCOMPUTE &pct_never=EXPR([5] / ([1 THRU 2] + [3 THRU 4] + [5]) * 100)
/PPROPERTIES &pct_never LABEL='% Not Drivers' FORMAT=COUNT PCT40.1
- /TABLE=qn1 BY qns3a
- /CATEGORIES VARIABLES=qn1 [1 THRU 2, SUBTOTAL='Frequent Drivers',
- 3 THRU 4, SUBTOTAL='Infrequent Drivers',
- &all_drivers, 5, &pct_never,
- MISSING, SUBTOTAL='Not Drivers or Missing'].
+ /TABLE=freqOfDriving BY gender
+ /CATEGORIES VARIABLES=freqOfDriving
+ [1 THRU 2, SUBTOTAL='Frequent Drivers',
+ 3 THRU 4, SUBTOTAL='Infrequent Drivers',
+ &all_drivers, 5, &pct_never,
+ MISSING, SUBTOTAL='Not Drivers or Missing'].
@end example
@psppoutput{ctables35}
@code{HIDESMALLCOUNTS}:
@example
-CTABLES /HIDESMALLCOUNTS COUNT=10 /TABLE qn37.
+CTABLES /HIDESMALLCOUNTS COUNT=10 /TABLE placeOfLastDrinkBeforeDrive.
@end example
@psppoutput{ctables36}
5 '46 to 55'
6 '56 to 65'
7 '66 or older'.
+RENAME VARIABLES
+ (QNSA1 = sampleSource)
+ (QNS1 = membersOver16)
+ (QNS3A = gender)
+ (QN1 = freqOfDriving)
+ (QN15 = freqOfDrinking)
+ (QN17 = mostFreqBeverage)
+ (QN18 = portionsPerSitting)
+ (QN19A = startAgeOfDrinking)
+ (qn20 = monthDaysMin1drink)
+ (qn23 = monthDaysMin5drinks)
+ (QN26 = hasConsideredReduction)
+ (QN27 = hasBeenCriticized)
+ (QN28 = hasFeltBadOrGuilty)
+ (QN29 = hasDrunkInMorning)
+ (qn31 = portionsConsideredSafe2Hrs)
+ (QN33 = hasDrivenAfterDrinking)
+ (qn35 = timesDrivenAfterDrinking30Days)
+ (qn36 = monthsSinceLastDriveAfterDrink)
+ (QN37 = placeOfLastDrinkBeforeDrive)
+ (qn38 = portionsOfLastDrinkBeforeDrive)
+ (QN39H = lengthOfLastDrinkBeforeDriveHrs)
+ (QN39M = lengthOfLastDrinkBeforeDriveMins)
+ (qn39 = lengthOfLastDrinkBeforeDrive)
+ (qn41 = timeBetweenLastDrinkAndDrive)
+ (QN43A = woreSeatbeltLastDriveAfterDrink)
+ (qn44 = nPassengersLastDriveAfterDrink)
+ (qn44a = nPassengersUnder15LastDriveAfterDrink)
+ (QN49 = positionVsLegalLimitLastDriveAfterDrink)
+ (qn52 = timesOverLegalLimit12Months)
+ (QN54 = hasAvoidedDrivingAfterDrink)
+ (QN56 = alternativeUsedLastTimeAvoided)
+ (QN57 = hasBeenPassengerOfDrunkDriver)
+ (QN61 = hasBeenPassengerOfDesignatedDriver)
+ (QN64B = hasBeenDesignatedDriver)
+ (qn65 = nPortionsLastTimeAsDesignatedDriver)
+ (QN65A = momentOfDesignation)
+ (qn66 = nPortionsMaxDesignatedDriver)
+ (QN86 = hasHostedEventWithAlcohol)
+ (QN87 = levelOfConcernAboutDrivingAtLastEvent)
+ (QN88_1 = measuresAgainstDrivingAfterDrinkAtLastEvent_1)
+ (QN88_2 = measuresAgainstDrivingAfterDrinkAtLastEvent_2)
+ (QN88_3 = measuresAgainstDrivingAfterDrinkAtLastEvent_3)
+ (QN89 = hasHostedEventForYouthUnder21)
+ (QN90 = hasMonitoredAlcoholConsumptionAtLastEventUnder21)
+ (QN90A = youthUnder21HasDrunkAlcoholAtLastEvent)
+ (QN91_1 = measuresAgainstDrivingAfterDrinkAtLastEventUnder21_1)
+ (QN91_2 = measuresAgainstDrivingAfterDrinkAtLastEventUnder21_2)
+ (QN91_3 = measuresAgainstDrivingAfterDrinkAtLastEventUnder21_3)
+ (QN96A = hasWitnessedDrunkPersonPlanningToDrive)
+ (QN100 = hasTriedToStopDrunkPersonFromDriving)
+ (QN101 = measuresToStopDrunkPersonFromDriving)
+ (QN102 = drunkPersonDroveAnyhow)
+ (QN102B = hasBeenEncouragedToDrinkMoreThanPlanned)
+ (QN102C = hasFeltCompelledToDrink)
+ (QN103 = levelOfThreatDrinkingAndDrivingByOtherPeople)
+ (QN105BA = likelihoodOfBeingStoppedByPolice)
+ (QN105BB = likelihoodOfHavingAnAccident)
+ (QN105BC = likelihoodOfBeingConvicted)
+ (QN105BD = likelihoodOfBeingArrested)
+ (QN113 = hasBeenArrestedForDrinkingAndDriving)
+ (qn114 = numberOfArrestsLast2Years)
+ (QN116 = opinionAboutSeverityOfPenalties)
+ (QN120 = hasSeenSobrietyCheckpoint)
+ (qn121 = numberOfSobrietyCheckpointsCrossed12Months)
+ (QN122C = desiredFrequencyOfSobrietyCheckpoints)
+ (QN123 = awarenessOfBAClevels)
+ (qn126 = portionsCorrespondingToBAC.08)
+ (QN131A = hasBeenInvolvedInCrash)
+ (QN132A = alcoholInvolvedInLastCrash)
+ (QN133 = injuriesInLastCrash)
+ (QN139A = effectivenessPoliceEfforts)
+ (QN139E = effectivenessAlternativeTransport)
+ (QN139G = effectivenessTreatment)
+ (QN139H = effectivenessPenaltiesLicensedEstablishments)
+ (QN139K = effectivenessPenaltiesPartyHosts)
+ (QN139L = effectivenessSuspensionOfLicense)
+ (QN139M = effectivenessConfiscationOfVehicle)
+ (QN139N = effectivenessBreathLock)
+ (QN139_A = awarenessNationalMinimumDrinkingAge)
+ (QN139_B = minimumNationalDrinkingAge)
+ (QN139CA = effectivenessUnder21PoliceEfforts)
+ (QN139CE = effectivenessUnder21AlternativeTransport)
+ (QN139CF = effectivenessUnder21LimitingAmount)
+ (QN139CG = effectivenessUnder21Treatment)
+ (QN139CH = effectivenessUnder21PenaltiesLicensedEstablishments)
+ (QN139CK = effectivenessUnder21PenaltiesPartyHosts)
+ (QN139CL = effectivenessUnder21SuspensionOfLicense)
+ (QN139CN = effectivenessUnder21BreathLock)
+ (QN140AA = support1stTimeSuspensionOfLicense)
+ (QN140AB = support1stTimeJail)
+ (QN140AC = support1stTimeConfiscationOfVehicle)
+ (QN140AD = support1stTimeBreathLock)
+ (QN140AE = supportConfiscationOfLicensePlates)
+ (QN140AF = supportCompulsaryTreatment)
+ (qnd1 = age)
+ (QND1B = numberOfChildrenUnder16)
+ (QND2_1 = employmentStatus_1)
+ (QND2_2 = employmentStatus_2)
+ (QND2_3 = employmentStatus_3)
+ (QND3 = education)
+ (QND5 = hispanicOrLatino)
+ (QND5A = ethnicBackground)
+ (QND6_1 = race_1)
+ (QND6_2 = race_2)
+ (QND6_3 = race_3)
+ (QND6_4 = race_4)
+ (QND6_5 = race_5)
+ (QND7A = isLicensedDriver)
+ (QND8 = income)
+ (qnd9 = weightOfRespondent)
+ (QND11A = singleLandLinePhoneNumber)
+ (QND11 = nLandLinePhoneNumbers).
SAVE OUTFILE='nhtsa.sav'.
tests/language/data-io/test.ods \
tests/language/data-io/newone.ods \
tests/language/data-io/readnames.ods \
+ tests/language/stats/nhtsa.sav \
tests/language/stats/llz.zsav \
tests/utilities/regress.spv
dnl * Data-dependent sorting.
AT_SETUP([CTABLES parsing])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_CLEANUP
AT_SETUP([CTABLES parsing - negative])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES.
AT_CLEANUP
AT_SETUP([CTABLES parsing - more negative])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /PCOMPUTE &pc=EXPR(SUBTOTAL) /TABLE qn1 /CATEGORIES VARIABLES=qn1 [&pc].
AT_CLEANUP
AT_SETUP([CTABLES one categorical variable])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /TABLE qn1.
AT_CLEANUP
AT_SETUP([CTABLES one string variable])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
STRING licensed(A8).
AT_CLEANUP
AT_SETUP([CTABLES one scale variable])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
DESCRIPTIVES qnd1.
AT_SETUP([CTABLES simple stacking])
AT_KEYWORDS([stack stacked])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /TABLE qn105ba + qn105bb + qn105bc + qn105bd BY qns3a [COLPCT PCT8.0].
AT_CLEANUP
AT_SETUP([CTABLES show or hide empty categories])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
IF (qn105ba = 2) qn105ba = 1.
AT_CLEANUP
AT_SETUP([CTABLES sorting categories])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
IF (QND5A=6) QND5A=-1.
AT_SETUP([CTABLES simple nesting])
AT_KEYWORDS([nest nested])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /TABLE (qn105ba + qn105bb + qn105bc + qn105bd) > qns3a [COUNT, TABLEPCT PCT8.0]
AT_SETUP([CTABLES nesting and scale variables])
AT_KEYWORDS([nest nested])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /TABLE=qnd1 > qn1 BY qns3a.
AT_SETUP([CTABLES SLABELS])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /TABLE qn1 [COUNT COLPCT].
AT_CLEANUP
AT_SETUP([CTABLES simple totals])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /TABLE=qn17
AT_CLEANUP
AT_SETUP([CTABLES subtotals])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /TABLE=qn105ba BY qns1
AT_SETUP([CTABLES PCOMPUTE])
AT_KEYWORDS([postcompute])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_SETUP([CTABLES PCOMPUTE - OTHERNM and MISSING])
AT_KEYWORDS([postcompute])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_SETUP([CTABLES PCOMPUTE - THRU])
AT_KEYWORDS([postcompute])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_CLEANUP
AT_SETUP([CTABLES CLABELS])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /TABLE AgeGroup BY qns3a.
AT_CLEANUP
AT_SETUP([CTABLES VLABELS - variables on different axes])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /VLABELS VARIABLES=qns3a qnd5a DISPLAY=DEFAULT /TABLE qnd5a BY qns3a.
AT_SETUP([CTABLES VLABELS - stacked variables])
AT_KEYWORDS([stack stacking])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a + qns3a.
AT_SETUP([CTABLES VLABELS - nested variables])
AT_KEYWORDS([nest nesting])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /VLABELS VARIABLES=qns3a DISPLAY=NAME /TABLE qnd5a > qns3a.
AT_CLEANUP
AT_SETUP([CTABLES FORMAT EMPTY])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /FORMAT EMPTY=ZERO /TABLE qnd5a BY qnd5.
AT_CLEANUP
AT_SETUP([CTABLES FORMAT MISSING])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /FORMAT MISSING='(no data)' /TABLE qnd5a[COLPCT] BY qnd5.
AT_CLEANUP
AT_SETUP([CTABLES HIDESMALLCOUNTS])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /TABLE qn38[c][COUNT, COLPCT].
AT_CLEANUP
AT_SETUP([CTABLES FORMAT MINCOLWIDTH MAXCOLWIDTH])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES /FORMAT MINCOLWIDTH=1 MAXCOLWIDTH=2 UNITS=INCHES /TABLE BY qns3a.
AT_SETUP([CTABLES special formats])
AT_KEYWORDS([NEGPAREN NEQUAL PAREN PCTPAREN])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
COMPUTE x = qnd3 - 4.
AT_CLEANUP
AT_SETUP([CTABLES TITLES])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_CLEANUP
AT_SETUP([CTABLES area definitions])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=OPPOSITE])
AT_KEYWORDS([ROWLABELS OPPOSITE])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=OPPOSITE])
AT_KEYWORDS([COLLABELS OPPOSITE])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_SETUP([CTABLES area definitions with CLABELS ROWLABELS=LAYER])
AT_KEYWORDS([ROWLABELS LAYER])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_SETUP([CTABLES area definitions with CLABELS COLLABELS=LAYER])
AT_KEYWORDS([COLLABELS LAYER])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_CLEANUP
AT_SETUP([CTABLES categorical summary functions])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_CLEANUP
AT_SETUP([CTABLES scale summary functions])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
SET TVAR=NAME.
AT_CLEANUP
AT_SETUP([CTABLES hidden scale VLABELS])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.
CTABLES
AT_CLEANUP
AT_SETUP([CTABLES with SPLIT FILE])
-AT_CHECK([ln $top_srcdir/examples/nhtsa.sav . || cp $top_srcdir/examples/nhtsa.sav .])
+AT_CHECK([ln $top_srcdir/tests/language/stats/nhtsa.sav . || cp $top_srcdir/tests/language/stats/nhtsa.sav .])
AT_DATA([ctables.sps],
[[GET 'nhtsa.sav'.