SPSS格式化CTABLE,带有重复的行标签

时间:2016-08-12 11:39:15

标签: spss

假设我有一张性别和年龄计数表,在CTABLE中我想重复每一行的标签,而不是:

Male   | Aged 0 to 15
       | Aged 16 to 59
       | Aged 60 and older
Female | Aged 0 to 15
       | Aged 16 to 59
       | Aged 60 and older

我想:

Male   | Aged 0 to 15
Male   | Aged 16 to 59
Male   | Aged 60 and older
Female | Aged 0 to 15
Female | Aged 16 to 59
Female | Aged 60 and older

实际上我有四个级别:

Male | Aged 0 to 15 | White | Born UK
Male | Aged 0 to 15 | White | Born Outside UK
Male | Aged 0 to 15 | Mixed | Born UK
Male | Aged 0 to 15 | Mixed | Born Outside UK
Male | Aged 0 to 15 | Asian | Born UK
Male | Aged 0 to 15 | Asian | Born Outside UK

感谢。

由我添加:

这是我希望重复行标签的表格的语法。该表仅包含有关此组合中有多少人居住在12个地区之一的列数。

CTABLES
  /VLABELS VARIABLES=sex age5 eth cob region DISPLAY=LABEL
  /TABLE sex [C] > age5 [C] > eth [C] > cob [C][COUNT F40.0] BY region [C]
  /CATEGORIES VARIABLES=sex eth cob region ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE
  /CATEGORIES VARIABLES=age5 ORDER=A KEY=VALUE EMPTY=EXCLUDE.

1 个答案:

答案 0 :(得分:0)

没有自然/直接的方式来实现你想要做的事情。尽管如此,我提供了一些解决方案,我过去曾经使用过这些解决方案,你可能想要考虑它们各自的缺点。或者,您可能需要考虑使用AGGREGATE或VBA在导出到Excel后发布编辑表(如果它被定向到Excel)。

<xe:djCurrencyTextBox id="djCurrencyTextBox1"
                value="#{document1.NumField_2}"
                promptMessage="enter a US dollar amount">
                <xe:this.constraints>
                    <xe:djNumberConstraints currency="USD"
                        type="currency">
                    </xe:djNumberConstraints>
                </xe:this.constraints>
                <xp:this.converter>
                    <xp:convertNumber></xp:convertNumber>
                </xp:this.converter>
            </xe:djCurrencyTextBox>