Hoe to hide empty row in CTABLES

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Hoe to hide empty row in CTABLES

la volta statistics

Hi all

I would like to exclude an empty row in a Table. I used a code that did that perfectly well in SPSS 15 using EMPTY = exclude.

However in SPSS 18 and SPSS 19 the row (Test) will always appear in the Table.

Does anybody have a solution for that?

 

TIA, Christian

 

data list list

 /Medi(F8.0) Sex(F8.1) Age(F8.2) Test(F8.2) .

begin data

1 1 44.25 50

2 1 52.92 40

1 1 37.21 30

1 1 60.87 30

2 1 58.69 20

2 2 43.17 20

1 2 44.93 10

1 1 34.19 60

1 2 39.96 70

2 1 63.04 70

End Data.

 

Var Label Medi 'Treatment'.

Val Label Medi 1 'Verum'

               2 'Placebo'.

 

 

REcode Test (else = 99).

MISSING VALUES Test (99).

exec.

 

CTABLES

 /Format Missing = '' Empty = Zero

 /VLABELS VARIABLES=Medi Sex Age Test

      DISPLAY=Label

  /TABLE  Age [s][MEAN   F8.2] +

         Test [s][MEAN   F8.2]

    BY Medi[c]

  /SLABELS POSITION=Column  VISIBLE = no

  /CATEGORIES VARIABLES=Medi  ORDER=A KEY=VALUE EMPTY=ECCLUDE.

 

 

 

**********************************
la volta statistics

Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
CH-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email:
[hidden email] 
Web: www.lavolta.ch

 

Reply | Threaded
Open this post in threaded view
|

Re: Hoe to hide empty row in CTABLES

Chris Hunt

EMPTY = exclude only excludes values that have a count of zero.  You need MISSING =  Exclude to exclude the values you have selected as missing.

 

Chris

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of la volta statistics
Sent: 25 February 2011 14:15
To: [hidden email]
Subject: Hoe to hide empty row in CTABLES

 

Hi all

I would like to exclude an empty row in a Table. I used a code that did that perfectly well in SPSS 15 using EMPTY = exclude.

However in SPSS 18 and SPSS 19 the row (Test) will always appear in the Table.

Does anybody have a solution for that?

 

TIA, Christian

 

data list list

 /Medi(F8.0) Sex(F8.1) Age(F8.2) Test(F8.2) .

begin data

1 1 44.25 50

2 1 52.92 40

1 1 37.21 30

1 1 60.87 30

2 1 58.69 20

2 2 43.17 20

1 2 44.93 10

1 1 34.19 60

1 2 39.96 70

2 1 63.04 70

End Data.

 

Var Label Medi 'Treatment'.

Val Label Medi 1 'Verum'

               2 'Placebo'.

 

 

REcode Test (else = 99).

MISSING VALUES Test (99).

exec.

 

CTABLES

 /Format Missing = '' Empty = Zero

 /VLABELS VARIABLES=Medi Sex Age Test

      DISPLAY=Label

  /TABLE  Age [s][MEAN   F8.2] +

         Test [s][MEAN   F8.2]

    BY Medi[c]

  /SLABELS POSITION=Column  VISIBLE = no

  /CATEGORIES VARIABLES=Medi  ORDER=A KEY=VALUE EMPTY=ECCLUDE.

 

 

 

**********************************
la volta statistics

Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
CH-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email:
[hidden email] 
Web: www.lavolta.ch

 

Reply | Threaded
Open this post in threaded view
|

AW: Hoe to hide empty row in CTABLES

la volta statistics

Thanks Chris

I know this but this doesn't work neither.

 

Christian

 

 

**********************************
la volta statistics

Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
CH-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email:
[hidden email] 
Web:
www.lavolta.ch


Von: SPSSX(r) Discussion [mailto:[hidden email]] Im Auftrag von Chris Hunt
Gesendet: Freitag, 25. Februar 2011 15:50
An: [hidden email]
Betreff: Re: Hoe to hide empty row in CTABLES

 

EMPTY = exclude only excludes values that have a count of zero.  You need MISSING =  Exclude to exclude the values you have selected as missing.

 

Chris

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of la volta statistics
Sent: 25 February 2011 14:15
To: [hidden email]
Subject: Hoe to hide empty row in CTABLES

 

Hi all

I would like to exclude an empty row in a Table. I used a code that did that perfectly well in SPSS 15 using EMPTY = exclude.

However in SPSS 18 and SPSS 19 the row (Test) will always appear in the Table.

Does anybody have a solution for that?

 

TIA, Christian

 

data list list

 /Medi(F8.0) Sex(F8.1) Age(F8.2) Test(F8.2) .

begin data

1 1 44.25 50

2 1 52.92 40

1 1 37.21 30

1 1 60.87 30

2 1 58.69 20

2 2 43.17 20

1 2 44.93 10

1 1 34.19 60

1 2 39.96 70

2 1 63.04 70

End Data.

 

Var Label Medi 'Treatment'.

Val Label Medi 1 'Verum'

               2 'Placebo'.

 

 

REcode Test (else = 99).

MISSING VALUES Test (99).

exec.

 

CTABLES

 /Format Missing = '' Empty = Zero

 /VLABELS VARIABLES=Medi Sex Age Test

      DISPLAY=Label

  /TABLE  Age [s][MEAN   F8.2] +

         Test [s][MEAN   F8.2]

    BY Medi[c]

  /SLABELS POSITION=Column  VISIBLE = no

  /CATEGORIES VARIABLES=Medi  ORDER=A KEY=VALUE EMPTY=ECCLUDE.

 

 

 

**********************************
la volta statistics

Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
CH-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email:
[hidden email] 
Web: www.lavolta.ch

 

Reply | Threaded
Open this post in threaded view
|

Re: Hoe to hide empty row in CTABLES

Chris Hunt

I think the exclude is over-ruled because in your code you have asked for the mean of the variable test. Remove this and it will work.

 

i.e.

 

data list list

 /Medi(F8.0) Sex(F8.1) Age(F8.2) Test(F8.2) .

begin data

1 1 44.25 50

2 1 52.92 40

1 1 37.21 30

1 1 60.87 30

2 1 58.69 20

2 2 43.17 20

1 2 44.93 10

1 1 34.19 60

1 2 39.96 70

2 1 63.04 70

End Data.

 

Var Label Medi 'Treatment'.

Val Label Medi 1 'Verum'

               2 'Placebo'.

 

 

REcode Test (else = 99).

MISSING VALUES Test (99).

exec.

 

CTABLES

 /Format Missing = '' Empty = Zero

 /VLABELS VARIABLES=Medi Sex Age Test

      DISPLAY=Label

  /TABLE  Age [s][MEAN   F8.2]

    BY Medi[c]

  /SLABELS POSITION=Column  VISIBLE = no

  /CATEGORIES VARIABLES=Medi  ORDER=A KEY=VALUE EMPTY=ECCLUDE.

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of la volta statistics
Sent: 25 February 2011 15:11
To: [hidden email]
Subject: AW: Hoe to hide empty row in CTABLES

 

Thanks Chris

I know this but this doesn't work neither.

 

Christian

 

 

**********************************
la volta statistics

Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
CH-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email:
[hidden email] 
Web:
www.lavolta.ch


Von: SPSSX(r) Discussion [mailto:[hidden email]] Im Auftrag von Chris Hunt
Gesendet: Freitag, 25. Februar 2011 15:50
An: [hidden email]
Betreff: Re: Hoe to hide empty row in CTABLES

 

EMPTY = exclude only excludes values that have a count of zero.  You need MISSING =  Exclude to exclude the values you have selected as missing.

 

Chris

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of la volta statistics
Sent: 25 February 2011 14:15
To: [hidden email]
Subject: Hoe to hide empty row in CTABLES

 

Hi all

I would like to exclude an empty row in a Table. I used a code that did that perfectly well in SPSS 15 using EMPTY = exclude.

However in SPSS 18 and SPSS 19 the row (Test) will always appear in the Table.

Does anybody have a solution for that?

 

TIA, Christian

 

data list list

 /Medi(F8.0) Sex(F8.1) Age(F8.2) Test(F8.2) .

begin data

1 1 44.25 50

2 1 52.92 40

1 1 37.21 30

1 1 60.87 30

2 1 58.69 20

2 2 43.17 20

1 2 44.93 10

1 1 34.19 60

1 2 39.96 70

2 1 63.04 70

End Data.

 

Var Label Medi 'Treatment'.

Val Label Medi 1 'Verum'

               2 'Placebo'.

 

 

REcode Test (else = 99).

MISSING VALUES Test (99).

exec.

 

CTABLES

 /Format Missing = '' Empty = Zero

 /VLABELS VARIABLES=Medi Sex Age Test

      DISPLAY=Label

  /TABLE  Age [s][MEAN   F8.2] +

         Test [s][MEAN   F8.2]

    BY Medi[c]

  /SLABELS POSITION=Column  VISIBLE = no

  /CATEGORIES VARIABLES=Medi  ORDER=A KEY=VALUE EMPTY=ECCLUDE.

 

 

 

**********************************
la volta statistics

Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
CH-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email:
[hidden email] 
Web: www.lavolta.ch

 

Reply | Threaded
Open this post in threaded view
|

AW: Hoe to hide empty row in CTABLES

la volta statistics

Thanks Chris

However, you just took out the variable 'Test' from the Ctable command (leaving 'Age by Medi' only). This way 'Test' wouldn't show even if it had some values.

The annoying thing about this is, that I have data for tables with much of the rows being empty. In SPSS 15 this was not a problem. Empty rows just did not show using EMPTY=EXCLUDE (or MISSING=EXCLUDE). I have not found a solution for that so far.

   

TIA, Christian

 

**********************************
la volta statistics

Christian Schmidhauser, Dr.phil.II
W
einbergstrasse 108
CH-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email:
[hidden email] 
Web:
www.lavolta.ch


Von: SPSSX(r) Discussion [mailto:[hidden email]] Im Auftrag von Chris Hunt
Gesendet: Freitag, 25. Februar 2011 17:06
An: [hidden email]
Betreff: Re: Hoe to hide empty row in CTABLES

 

I think the exclude is over-ruled because in your code you have asked for the mean of the variable test. Remove this and it will work.

 

i.e.

 

data list list

 /Medi(F8.0) Sex(F8.1) Age(F8.2) Test(F8.2) .

begin data

1 1 44.25 50

2 1 52.92 40

1 1 37.21 30

1 1 60.87 30

2 1 58.69 20

2 2 43.17 20

1 2 44.93 10

1 1 34.19 60

1 2 39.96 70

2 1 63.04 70

End Data.

 

Var Label Medi 'Treatment'.

Val Label Medi 1 'Verum'

               2 'Placebo'.

 

 

REcode Test (else = 99).

MISSING VALUES Test (99).

exec.

 

CTABLES

 /Format Missing = '' Empty = Zero

 /VLABELS VARIABLES=Medi Sex Age Test

      DISPLAY=Label

  /TABLE  Age [s][MEAN   F8.2]

    BY Medi[c]

  /SLABELS POSITION=Column  VISIBLE = no

  /CATEGORIES VARIABLES=Medi  ORDER=A KEY=VALUE EMPTY=EXCLUDE.

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of la volta statistics
Sent: 25 February 2011 15:11
To: [hidden email]
Subject: AW: Hoe to hide empty row in CTABLES

 

Thanks Chris

I know this but this doesn't work neither.

 

Christian

 

 

**********************************
la volta statistics

Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
CH-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email:
[hidden email] 
Web:
www.lavolta.ch


Von: SPSSX(r) Discussion [mailto:[hidden email]] Im Auftrag von Chris Hunt
Gesendet: Freitag, 25. Februar 2011 15:50
An: [hidden email]
Betreff: Re: Hoe to hide empty row in CTABLES

 

EMPTY = exclude only excludes values that have a count of zero.  You need MISSING =  Exclude to exclude the values you have selected as missing.

 

Chris

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of la volta statistics
Sent: 25 February 2011 14:15
To: [hidden email]
Subject: Hoe to hide empty row in CTABLES

 

Hi all

I would like to exclude an empty row in a Table. I used a code that did that perfectly well in SPSS 15 using EMPTY = exclude.

However in SPSS 18 and SPSS 19 the row (Test) will always appear in the Table.

Does anybody have a solution for that?

 

TIA, Christian

 

data list list

 /Medi(F8.0) Sex(F8.1) Age(F8.2) Test(F8.2) .

begin data

1 1 44.25 50

2 1 52.92 40

1 1 37.21 30

1 1 60.87 30

2 1 58.69 20

2 2 43.17 20

1 2 44.93 10

1 1 34.19 60

1 2 39.96 70

2 1 63.04 70

End Data.

 

Var Label Medi 'Treatment'.

Val Label Medi 1 'Verum'

               2 'Placebo'.

 

 

REcode Test (else = 99).

MISSING VALUES Test (99).

exec.

 

CTABLES

 /Format Missing = '' Empty = Zero

 /VLABELS VARIABLES=Medi Sex Age Test

      DISPLAY=Label

  /TABLE  Age [s][MEAN   F8.2] +

         Test [s][MEAN   F8.2]

    BY Medi[c]

  /SLABELS POSITION=Column  VISIBLE = no

  /CATEGORIES VARIABLES=Medi  ORDER=A KEY=VALUE EMPTY=ECCLUDE.

 

 

 

**********************************
la volta statistics

Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
CH-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email:
[hidden email] 
Web: www.lavolta.ch