https://www.ibm.com/docs/zh/spss-statistics/29.0.0?topic=reference-ctables

SPSS custom table

 

CTABLES

  /VLABELS VARIABLES=MR1 MR2 MR3 MR4 MR5 MR6  gender DISPLAY=BOTH

  /TABLE imd1[MEAN F40.2]+ imd2[MEAN F40.2]+ imd3[MEAN F40.2]+ imd4[MEAN F40.2]+ imd5[MEAN F40.2]+ imd6[MEAN F40.2]   BY gender [C] 

  /CATEGORIES VARIABLES= gender ORDER=A KEY=VALUE EMPTY=INCLUDE

  /CRITERIA CILEVEL=95.

---------

  gender 性别  
 
imd1 3.05 3.35
imd2 3.28 3.55
imd3 4.11 4.11
imd4 3.92 3.85
imd5 3.67 3.76
imd6 3.87 3.91

 

* 包含了卡方检验-------------频数表.

CTABLES

  /VLABELS VARIABLES=nage_range newincome edu gender  DISPLAY=BOTH

  /TABLE nage_range + newincome +  edu   BY gender [C] [COUNT F40.0]

  /CATEGORIES VARIABLES=nage_range newincome edu ORDER=A KEY=VALUE EMPTY=INCLUDE

  /CRITERIA CILEVEL=95

  /SIGTEST TYPE=CHISQUARE ALPHA=0.05 INCLUDEMRSETS=YES CATEGORIES=ALLVISIBLE.

    gender 性别  
   
年龄段 25岁以下 48 86
  26~35 31 54
  36~45 50 50
  46~55 30 20
  56岁以上 15 4
 收入段 2000元以下 34 66
  2001-4000元 32 46
  4001-6000元 60 50
  6001-8000元 18 28
  8000元以上 30 24
受教育程度 初中及以下 18 2
  高中 17 12
  大专或高职 30 34
  本科 75 124
  硕士研究生 22 30
  博士研究生 12 12

* 人口统计变量的分组比较——行百分比.

CTABLES

  /VLABELS VARIABLES=nage_range newincome edu gender  DISPLAY=BOTH

  /TABLE nage_range + newincome +  edu   BY gender [C][ROWPCT.COUNT ]

  /CATEGORIES VARIABLES=nage_range newincome edu ORDER=A KEY=VALUE EMPTY=INCLUDE

  /CRITERIA CILEVEL=95

  /SIGTEST TYPE=CHISQUARE ALPHA=0.05 INCLUDEMRSETS=YES CATEGORIES=ALLVISIBLE.

    gender 性别  
   
    行 N % 行 N %
年龄段 25岁以下 35.8% 64.2%
  26~35 36.5% 63.5%
  36~45 50.0% 50.0%
  46~55 60.0% 40.0%
  56岁以上 78.9% 21.1%
 收入段 2000元以下 34.0% 66.0%
  2001-4000元 41.0% 59.0%
  4001-6000元 54.5% 45.5%
  6001-8000元 39.1% 60.9%
  8000元以上 55.6% 44.4%
受教育程度 初中及以下 90.0% 10.0%
  高中 58.6% 41.4%
  大专或高职 46.9% 53.1%
  本科 37.7% 62.3%
  硕士研究生 42.3% 57.7%
  博士研究生 50.0% 50.0%

* 人口统计变量的分组比较——列百分比.

CTABLES

  /VLABELS VARIABLES=nage_range newincome edu gender  DISPLAY=BOTH

  /TABLE nage_range + newincome +  edu   BY gender [C][COLPCT.COUNT ]

  /CATEGORIES VARIABLES=nage_range newincome edu ORDER=A KEY=VALUE EMPTY=INCLUDE

  /CRITERIA CILEVEL=95

  /SIGTEST TYPE=CHISQUARE ALPHA=0.05 INCLUDEMRSETS=YES CATEGORIES=ALLVISIBLE.

 

    gender 性别  
   
    列 N % 列 N %
 年龄段 25岁以下 27.6% 40.2%
  26~35 17.8% 25.2%
  36~45 28.7% 23.4%
  46~55 17.2% 9.3%
  56岁以上 8.6% 1.9%
 收入段 2000元以下 19.5% 30.8%
  2001-4000元 18.4% 21.5%
  4001-6000元 34.5% 23.4%
  6001-8000元 10.3% 13.1%
  8000元以上 17.2% 11.2%
 受教育程度 初中及以下 10.3% 0.9%
  高中 9.8% 5.6%
  大专或高职 17.2% 15.9%
  本科 43.1% 57.9%
  硕士研究生 12.6% 14.0%
  博士研究生 6.9% 5.6%

* 人口统计变量的分组比较——全表百分比.

CTABLES

  /VLABELS VARIABLES=nage_range newincome edu gender  DISPLAY=BOTH

      /TABLE nage_range + newincome +  edu   BY gender [C][TABLEPCT.COUNT ]

  /CATEGORIES VARIABLES=nage_range newincome edu ORDER=A KEY=VALUE EMPTY=INCLUDE

  /CRITERIA CILEVEL=95

  /SIGTEST TYPE=CHISQUARE ALPHA=0.05 INCLUDEMRSETS=YES CATEGORIES=ALLVISIBLE.

 

    gender 性别  
   
    表 N % 表 N %
 年龄段 25岁以下 12.4% 22.2%
  26~35 8.0% 13.9%
  36~45 12.9% 12.9%
  46~55 7.7% 5.2%
  56岁以上 3.9% 1.0%
收入段 2000元以下 8.8% 17.0%
  2001-4000元 8.2% 11.9%
  4001-6000元 15.5% 12.9%
  6001-8000元 4.6% 7.2%
  8000元以上 7.7% 6.2%
受教育程度 初中及以下 4.6% 0.5%
  高中 4.4% 3.1%
  大专或高职 7.7% 8.8%
  本科 19.3% 32.0%
  硕士研究生 5.7% 7.7%
  博士研究生 3.1% 3.1%

 

 

CTABLES
  /VLABELS VARIABLES=gender age4 region income_range te_range  DISPLAY=LABEL
      /TABLE age4> sat2 [S][MEAN F40.2] + region > sat2 [S][MEAN F40.2]+ income_range > sat2 [S][MEAN F40.2] +  te_range > sat2 [S][MEAN F40.2] by gender.

 

 

 

 


Function

Description

Default Label*

Default Format

COUNT

Number of cases in each category. This is the default for categorical and multiple response variables.

Count

Count

ROWPCT.COUNT

Row percentage based on cell counts. Computed within subtable.

Row %

Percent

COLPCT.COUNT

Column percentage based on cell counts. Computed within subtable.

Column %

Percent

TABLEPCT.COUNT

Table percentage based on cell counts.

Table %

Percent

SUBTABLEPCT.COUNT

Subtable percentage based on cell counts.

Subtable %

Percent

LAYERPCT.COUNT

Layer percentage based on cell counts. Same as table percentage if no layers are defined.

Layer %

Percent

LAYERROWPCT.COUNT

Row percentage based on cell counts. Percentages sum to 100% across the entire row (that is, across subtables).

Layer Row %

Percent

LAYERCOLPCT.COUNT

Column percentage based on cell counts. Percentages sum to 100% across the entire column (that is, across subtables).

Layer Column %

Percent

ROWPCT.VALIDN

Row percentage based on valid count.

Row Valid N %

Percent

COLPCT.VALIDN

Column percentage based on valid count.

Column Valid N %

Percent

TABLEPCT.VALIDN

Table percentage based on valid count.

Table Valid N %

Percent

SUBTABLEPCT.VALIDN

Subtable percentage based on valid count.

Subtable Valid N %

Percent

LAYERPCT.VALIDN

Layer percentage based on valid count.

Layer Valid N %

Percent

LAYERROWPCT.VALIDN

Row percentage based on valid count. Percentages sum to 100% across the entire row.

Layer Row Valid N %

Percent

LAYERCOLPCT.VALIDN

Column percentage based on valid count. Percentages sum to 100% across the entire column.

Layer Column Valid N %

Percent

ROWPCT.TOTALN

Row percentage based on total count, including user-missing and system-missing values.

Row Total N %

Percent

COLPCT.TOTALN

Column percentage based on total count, including user-missing and system-missing values.

Column Total N %

Percent

TABLEPCT.TOTALN

Table percentage based on total count, including user-missing and system-missing values.

Table Total N %

Percent

SUBTABLEPCT.TOTALN

Subtable percentage based on total count, including user-missing and system-missing values.

Subtable Total N %

Percent

LAYERPCT.TOTALN

Layer percentage based on total count, including user-missing and system-missing values.

Layer Total N %

Percent

LAYERROWPCT.TOTALN

Row percentage based on total count, including user-missing and system-missing values. Percentages sum to 100% across the entire row.

Layer Row Total N %

Percent

LAYERCOLPCT.TOTALN

Column percentage based on total count, including user-missing and system-missing values. Percentages sum to 100% across the entire column.

Layer Column Total N %

Percent

 

*This is the default on a U.S.-English system.

The.COUNTsuffix can be omitted from percentages that are based on cell counts. Thus,ROWPCTis equivalent toROWPCT.COUNT.

 

Function

Description

Default Label

Default Format

MAXIMUM

Largest value.

Maximum

General

MEAN

Arithmetic mean. The default for scale variables.

Mean

General

MEDIAN

50th percentile.

Median

General

MINIMUM

Smallest value.

Minimum

General

MISSING

Count of missing values (both user-missing and system-missing).

Missing

General

MODE

Most frequent value. If there is a tie, the smallest value is shown.

Mode

General

PTILE

Percentile. Takes a numeric value between 0 and 100 as a required parameter. PTILE is computed the same way as APTILE in the TABLES command. Note that in the TABLES command, the default percentile method was HPTILE.

Percentile ####.##

General

RANGE

Difference between maximum and minimum values.

Range

General

SEMEAN

Standard error of the mean.

Std Error of Mean

General

STDDEV

Standard deviation.

Std Deviation

General

SUM

Sum of values.

Sum

General

TOTALN

Count of nonmissing, user-missing, and system-missing values. The count excludes valid values hidden via the CATEGORIES subcommand.

Total N

Count

VALIDN

Count of nonmissing values.

Valid N

Count

VARIANCE

Variance.

Variance

General

ROWPCT.SUM

Row percentage based on sums.

Row Sum %

Percent

COLPCT.SUM

Column percentage based on sums.

Column Sum %

Percent

TABLEPCT.SUM

Table percentage based on sums.

Table Sum %

Percent

SUBTABLEPCT.SUM

Subtable percentage based on sums.

Subtable Sum %

Percent

LAYERPCT.SUM

Layer percentage based on sums.

Layer Sum %

Percent

LAYERROWPCT.SUM

Row percentage based on sums. Percentages sum to 100% across the entire row.

Layer Row Sum %

Percent

LAYERCOLPCT.SUM

Column percentage based on sums. Percentages sum to 100% across the entire column.

Layer Column Sum %

Percent

 

 

Function

Description

Default Label

Default Format

RESPONSES

Count of responses.

Responses

Count

ROWPCT.RESPONSES

Row percentage based on responses. Total number of responses is the denominator.

Row Responses %

Percent

COLPCT.RESPONSES

Column percentage based on responses. Total number of responses is the denominator.

Column Responses %

Percent

TABLEPCT.RESPONSES

Table percentage based on responses. Total number of responses is the denominator.

Table Responses %

Percent

SUBTABLEPCT.RESPONSES

Subtable percentage based on responses. Total number of responses is the denominator.

Subtable Responses %

Percent

LAYERPCT.RESPONSES

Layer percentage based on responses. Total number of responses is the denominator.

Layer Responses %

Percent

LAYERROWPCT.RESPONSES

Row percentage based on responses. Total number of responses is the denominator. Percentages sum to 100% across the entire row (that is, across subtables).

Layer Row Responses %

Percent

LAYERCOLPCT.RESPONSES

Column percentage based on responses. Total number of responses is the denominator. Percentages sum to 100% across the entire column (that is, across subtables).

Layer Column Responses %

Percent

ROWPCT.RESPONSES.COUNT

Row percentage: Responses are the numerator, and total count is the denominator.

Row Responses % (Base: Count)

Percent

COLPCT.RESPONSES.COUNT

Column percentage: Responses are the numerator, and total count is the denominator.

Column Responses % (Base: Count)

Percent

TABLEPCT.RESPONSES.COUNT

Table percentage: Responses are the numerator, and total count is the denominator.

Table Responses % (Base: Count)

Percent

SUBTABLEPCT.RESPONSES.COUNT

Subtable percentage: Responses are the numerator, and total count is the denominator.

Subtable Responses % (Base: Count)

Percent

LAYERPCT.RESPONSES.COUNT

Layer percentage: Responses are the numerator, and total count is the denominator.

Layer Responses % (Base: Count)

Percent

LAYERROWPCT.RESPONSES.COUNT

Row percentage: Responses are the numerator, and total count is the denominator. Percentages sum to 100% across the entire row (that is, across subtables).

Layer Row Responses % (Base: Count)

Percent

LAYERCOLPCT.RESPONSES.COUNT

Column percentage: Responses are the numerator, and total count is the denominator. Percentages sum to 100% across the entire column (that is, across subtables).

Layer Column Responses % (Base: Count)

Percent

ROWPCT.COUNT.RESPONSES

Row percentage: Count is the numerator, and total responses are the denominator.

Row Count % (Base: Responses)

Percent

COLPCT.COUNT.RESPONSES

Column percentage: Count is the numerator, and total responses are the denominator.

Column Count % (Base: Responses)

Percent

TABLEPCT.COUNT.RESPONSES

Table percentage: Count is the numerator, and total responses are the denominator.

Table Count % (Base: Responses)

Percent

SUBTABLEPCT.COUNT. RESPONSES

Subtable percentage: Count is the numerator, and total responses are the denominator.

Subtable Count % (Base: Responses)

Percent

LAYERPCT.COUNT. RESPONSES

Layer percentage: Count is the numerator, and total responses are the denominator.

Layer Count % (Base: Responses)

Percent

LAYERROWPCT.COUNT.RESPONSES

Row percentage: Count is the numerator, and total responses are the denominator. Percentages sum to 100% across the entire row (that is, across subtables).

Layer Row Count % (Base: Responses)

Percent

LAYERCOLPCT.COUNT.RESPONSES

Row percentage: Count is the numerator, and total responses are the denominator. Percentages sum to 100% across the entire column (that is, across subtables).

Layer Column Count % (Base: Responses)

Percent