Trouble with ctables

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

Trouble with ctables

John F Hall

I'm working on date variables in my cumulative mother file for the British Social Attitudes Survey 1983-2016.

 

FREQ year gives me:

 

 

year Year of Interview

 

Frequency

Valid

1983

1761

1984

1675

1985

1804

1986

3100

1987

2847

1989

3029

1990

2797

1991

2918

1993

2945

1994

3469

1995

3633

1996

3662

1997

1355

1998

3146

1999

3143

2000

3426

2001

3287

2002

3435

2003

4432

2004

3199

2005

4268

2006

4290

2007

4124

2008

4486

2009

3421

2010

3297

2011

3311

2012

3248

2013

3244

2014

2878

2015

8656

2016

5884

Total

110170

. .but

CTABLES /table year   

. . only gets:

 

 

Mean

year Year of Interview

2002

 

Why is it giving a mean, not counts?

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with ctables

Jignesh Sutar
This behavior of CTABLES (vs. FREQ) is because CTABLE is ever so clever by taking into account the the VARIABLE LEVEL of the variable that is being tabulated. Your YEAR variable must be set as a SCALE variable as oppose to NOMINAL or ORDINAL.

Either preset it to NOMINAL or ORDINAL using syntax

VARIABLE LEVEL year (ORDINAL).

Or add "[C]" to signify/force in the CTABLES syntax that YEAR is actually a categorical variable rather than scale [S].

CTABLES /TABLE year [C].


Hope this helps.
Jignesh




On Thu, 26 Apr 2018 at 11:52 John F Hall <[hidden email]> wrote:

I'm working on date variables in my cumulative mother file for the British Social Attitudes Survey 1983-2016.

 

FREQ year gives me:

 

 

year Year of Interview

 

Frequency

Valid

1983

1761

1984

1675

1985

1804

1986

3100

1987

2847

1989

3029

1990

2797

1991

2918

1993

2945

1994

3469

1995

3633

1996

3662

1997

1355

1998

3146

1999

3143

2000

3426

2001

3287

2002

3435

2003

4432

2004

3199

2005

4268

2006

4290

2007

4124

2008

4486

2009

3421

2010

3297

2011

3311

2012

3248

2013

3244

2014

2878

2015

8656

2016

5884

Total

110170

. .but

CTABLES /table year   

. . only gets:

 

 

Mean

year Year of Interview

2002

 

Why is it giving a mean, not counts?

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Trouble with ctables

John F Hall

Jignesh

Brilliant.  Mille fois merci!  Saves having to delete columns from FREQ output.  0003 Constant is a leftover from the CAPI/BLAISE data collection.

John

 

CTABLES /table year [c].

 

 

Count

year Year of Interview

0003 Constant

0

1983

1761

1984

1675

1985

1804

1986

3100

1987

2847

1989

3029

1990

2797

1991

2918

1993

2945

1994

3469

1995

3633

1996

3662

1997

1355

1998

3146

1999

3143

2000

3426

2001

3287

2002

3435

2003

4432

2004

3199

2005

4268

2006

4290

2007

4124

2008

4486

2009

3421

2010

3297

2011

3311

2012

3248

2013

3244

2014

2878

2015

8656

2016

5884

 

 

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jignesh Sutar
Sent: 26 April 2018 13:02
To: [hidden email]
Subject: Re: Trouble with ctables

 

This behavior of CTABLES (vs. FREQ) is because CTABLE is ever so clever by taking into account the the VARIABLE LEVEL of the variable that is being tabulated. Your YEAR variable must be set as a SCALE variable as oppose to NOMINAL or ORDINAL.

 

Either preset it to NOMINAL or ORDINAL using syntax

 

VARIABLE LEVEL year (ORDINAL).

 

Or add "[C]" to signify/force in the CTABLES syntax that YEAR is actually a categorical variable rather than scale [S].

 

CTABLES /TABLE year [C].

 

 

Hope this helps.

Jignesh

 

 

 

 

On Thu, 26 Apr 2018 at 11:52 John F Hall <[hidden email]> wrote:

I'm working on date variables in my cumulative mother file for the British Social Attitudes Survey 1983-2016.

 

FREQ year gives me:

 

 

year Year of Interview

 

Frequency

Valid

1983

1761

1984

1675

1985

1804

1986

3100

1987

2847

1989

3029

1990

2797

1991

2918

1993

2945

1994

3469

1995

3633

1996

3662

1997

1355

1998

3146

1999

3143

2000

3426

2001

3287

2002

3435

2003

4432

2004

3199

2005

4268

2006

4290

2007

4124

2008

4486

2009

3421

2010

3297

2011

3311

2012

3248

2013

3244

2014

2878

2015

8656

2016

5884

Total

110170

. .but

CTABLES /table year   

. . only gets:

 

 

Mean

year Year of Interview

2002

 

Why is it giving a mean, not counts?

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

FW: Trouble with ctables

John F Hall
In reply to this post by Jignesh Sutar

Jignesh

Brilliant.  Mille fois merci!  Saves having to delete columns from FREQ output.  0003 Constant is a leftover from the CAPI/BLAISE data collection.

John

 

CTABLES /table year [c].

 

 

Count

year Year of Interview

0003 Constant

0

1983

1761

1984

1675

1985

1804

1986

3100

1987

2847

1989

3029

1990

2797

1991

2918

1993

2945

1994

3469

1995

3633

1996

3662

1997

1355

1998

3146

1999

3143

2000

3426

2001

3287

2002

3435

2003

4432

2004

3199

2005

4268

2006

4290

2007

4124

2008

4486

2009

3421

2010

3297

2011

3311

2012

3248

2013

3244

2014

2878

2015

8656

2016

5884

 

 

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Jignesh Sutar
Sent: 26 April 2018 13:02
To:
[hidden email]
Subject: Re: Trouble with ctables

 

This behavior of CTABLES (vs. FREQ) is because CTABLE is ever so clever by taking into account the the VARIABLE LEVEL of the variable that is being tabulated. Your YEAR variable must be set as a SCALE variable as oppose to NOMINAL or ORDINAL.

 

Either preset it to NOMINAL or ORDINAL using syntax

 

VARIABLE LEVEL year (ORDINAL).

 

Or add "[C]" to signify/force in the CTABLES syntax that YEAR is actually a categorical variable rather than scale [S].

 

CTABLES /TABLE year [C].

 

 

Hope this helps.

Jignesh

 

 

 

 

On Thu, 26 Apr 2018 at 11:52 John F Hall <[hidden email]> wrote:

I'm working on date variables in my cumulative mother file for the British Social Attitudes Survey 1983-2016.

 

FREQ year gives me:

 

 

year Year of Interview

 

Frequency

Valid

1983

1761

1984

1675

1985

1804

1986

3100

1987

2847

1989

3029

1990

2797

1991

2918

1993

2945

1994

3469

1995

3633

1996

3662

1997

1355

1998

3146

1999

3143

2000

3426

2001

3287

2002

3435

2003

4432

2004

3199

2005

4268

2006

4290

2007

4124

2008

4486

2009

3421

2010

3297

2011

3311

2012

3248

2013

3244

2014

2878

2015

8656

2016

5884

Total

110170

. .but

CTABLES /table year   

. . only gets:

 

 

Mean

year Year of Interview

2002

 

Why is it giving a mean, not counts?

 

John F Hall  MA (Cantab) Dip Ed (Dunelm)

[Retired academic survey researcher]

 

Email:          [hidden email]

Website:     Journeys in Survey Research

Course:       Survey Analysis Workshop (SPSS)

Research:   Subjective Social Indicators (Quality of Life)

 

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD

===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD