In support of CTABLES

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

In support of CTABLES

ViAnn Beadle
In support of CTABLES

There has been a small skirmish going on about MULT RESPONSE vs. CTABLES on this list that has become a bit of a religious debate. I think a little history needs to be injected into this debate. I worked for SPSS for 30 years and did requirements analysis, procedure design to meet requirements, and user interface design from syntax to point&click interfaces to output design. I designed the TABLES procedure but I was not directly involved in CTABLES.  Please note that these are solely my opinions and recollections.

ANCIENT HISTORY:

CROSSTABS was one of the original procedures in SPSS and was modeled after an even more ancient mainframe program IIRC, Datatext. It suited the needs for simple crosstabs based upon an analytic technique called Lazarsfeldian elaboration analysis of attitudinal data from political surveys (circa, 1940’s). Statisticians began introducing all sorts of statistical tests for categorical data to move beyond description to tests of statistical (circa, 1960’s). SPSS was differentiated form Datatext in that it provided an ever-increasing set of statistical measures.

While the social scientists were inventing their techniques for the analysis of simple surveys, the market researchers were inventing their own techniques for the analysis of product surveys. Many of the features added to SPSS were driven by demands from the marketing research segment.

MARKETING RESEARCH DRIVEN REQUIREMENTS:

Multiple Response Tables: Marketing data analyses focuses on comparing products in parallel. Tables are required to cross and compare multiple variables. The first requirement is tabulate and cross multiple response data within a single question. MULT RESPONSE was added to SPSS to support this requirement.

Nesting. CROSSTABS, and MULT RESPONSE were limited to 2-D tables. One variable defining the rows and one variable defining the columns. Nesting which is an essential feature of Lazarsfeldian elaboration analysis generates multiple separate subtables. Market researchers have to deliver compact tables to their clients and this is just not an acceptable format for them. This was a basic requirement that release 1 of the TABLES option had to meet.

Banner and Stub Tables: This requirement is to provide multiple variables within a table to provide a compact display. Marketing researchers call these tables Banners and Stubs. The banner typically contains demographic variables like gender, age category, region and race which are concatenated to form subtables of grouped columns, while the stub contains rows or responses to an one or more concatenated attitude variables. This was a basic requirement that release 1 of the TABLES option had to meet.

Summary and Counts together: This requirement is to provide both categorical counts and summary functions like mean, median, and sum within a single table. For example a typical table might include counts for a Likert Scale in the stub with a median or mean summary value row. This also was the basic requirement that release 1 of the TABLES option had to meet. The concept of level of measurement tied to the appropriate summary statistic was introduced into TABLES to simplify syntax and UI.

Parallel Tabulation: This requirement is to tabulate and cross parallel response data within a single question. For example, you want the distribution of ratings across a number of products in a single table with columns as individual products and rows as counts or ratings. Within the market research discipline, this is called a comparimeter table or table of frequencies. MULT RESPONSE doesn’t do this directly. To do this you have to structure the data file so that each case contains a response to a single product and a product key. The easiest way to handle this is to use VARSTOCASES to restructure the file. This was added to the second release of TABLES.

Inferential Statistics: Marketing researchers not only want to the descriptive statistics, they need inferential statistics comparing responses to parallel products. This was a basic requirement that release 1 of CTABLES had to meet.

Subtotals. Marketing researchers not only want totals across nesting, they want subtotals within a simple subtable . This was a basic requirement that release 1 of CTABLES had to meet.

SYNTAX vs. POINT&CLICK:

Simple syntax probably doesn’t need a point&click UI. CROSSTABS and MULT RESPONSE are very, very simple while CTABLES is not. CROSSTABS and MULT RESPONSE produce a limited set of simple tables while CTABLES can build very complicated concatenated and nested tables with different levels of summarization within them. The dynamic WYSIWYSG (what you see is what you “should” get) gives you great feedback on the physical structure of the complex table you are building and is great representation of the underlying table algebra.

I want to focus on my table and not the syntactical steps requires to achieve that table. The more features added to procedures, the more complex the syntax and the less likely we are go get it right without a lot of debugging.

You may not get exactly what you want the first time you use the Custom Tables UI, but I bet you get there a lot sooner than trying to learn syntax that looks like this:

CTABLES

 /FORMAT MINCOLWIDTH={DEFAULT}  MAXCOLWIDTH={DEFAULT}

                     {value  }              {value  }

         UNITS={POINTS}   EMPTY= {ZERO   }   MISSING= {'.'    }

               {INCHES}          {BLANK  }            {'chars'}

               {CM    }          {'chars'}

 /VLABELS VARIABLES= varlist

         DISPLAY= {DEFAULT}

                  {NAME   }

                  {LABEL  }

                  {BOTH   }

                  {NONE   }

 /MRSETS COUNTDUPLICATES= {NO }

                          {YES}

 /SMISSING {VARIABLE}

           {LISTWISE}

 /PCOMPUTE &catname= EXPR(expression)

 /PPROPERTIES &catname &catname...

              LABEL= "label"

              FORMAT= summary format ... summary format

              HIDESOURCECATS= {NO**}

                              {YES }

 /HIDESMALLCOUNTS COUNT = {5      }

                          {integer}

 /TABLE  rows BY columns BY layers

 /SLABELS POSITION= {COLUMN}  VISIBLE= {YES}

                    {ROW   }           {NO }

                    {LAYER }

 /CLABELS {AUTO                  }

          {ROWLABELS= {OPPOSITE} }

                      {LAYER   } 

          {COLLABELS= {OPPOSITE} }

                      {LAYER   } 

 /CATEGORIES  VARIABLES= varlist 

    { [value, value, value...]                              }

    { ORDER= {A} KEY= {VALUE           } MISSING= {EXCLUDE} }

             {D}      {LABEL           }          {INCLUDE}

                      {summary(varname)}

     TOTAL= {NO  }  LABEL= "label" POSITION= {AFTER } EMPTY= {INCLUDE}

            {YES }                           {BEFORE}        {EXCLUDE}

   Explicit value lists can include SUBTOTAL=’label’, HSUBTOTAL=’label’, MISSING, OTHERNM.


 /TITLES  CAPTION= ['text' 'text'...]

          CORNER=  ['text' 'text'...]

          TITLE=   ['text' 'text'...]

          Text can contain the symbols )DATE  )TIME  )TABLE

 /SIGTEST TYPE= CHISQUARE  ALPHA= {0.05              }

                                  {significance level}

          INCLUDEMRSETS={YES**}

                        {NO   }

          CATEGORIES={ALLVISIBLE**}

                     {SUBTOTALS   }

 /COMPARETEST TYPE= {PROP}  ALPHA= {0.05              }

                    {MEAN}         {significance level}

          ADJUST= {BONFERRONI}  ORIGIN=COLUMN

                  {NONE      }

          INCLUDEMRSETS={YES**}  MEANSVARIANCE={ALLCATS   }

                        {NO   }                {TESTEDCATS}

          CATEGORIES={ALLVISIBLE**}

                     {SUBTOTALS   }

          MERGE={NO**}

                {YES}

Row, column, and layer elements each have the general form

 varname {[C]} [summary ‘label’ format...] {+}  varname ... 

         {[S]}                             {>}

When nesting (>) and concatenation (+) are combined, as in a + b > c, nesting occurs before concatenation; parentheses can be used to change precedence, as in (a + b) > c.

Summary functions available for all variables: COUNT ROWPCT.COUNT COLPCT.COUNT TABLEPCT.COUNT SUBTABLEPCT.COUNT LAYERPCT.COUNT LAYERROWPCT.COUNT LAYERCOLPCT.COUNT ROWPCT.VALIDN COLPCT.VALIDN TABLEPCT.VALIDN SUBTABLEPCT.VALIDN LAYERPCT.VALIDN LAYERROWPCT.VALIDN LAYERCOLPCT.VALIDN ROWPCT.TOTALN COLPCT.TOTALN TABLEPCT.TOTALN SUBTABLEPCT.TOTALN LAYERPCT.TOTALN LAYERROWPCT.TOTALN LAYERCOLPCT.TOTALN

Summary functions available for scale variables and for totals and subtotals of numeric variables: MAXIMUM MEAN MEDIAN MINIMUM MISSING MODE PTILE RANGE SEMEAN STDDEV SUM TOTALN VALIDN VARIANCE ROWPCT.SUM COLPCT.SUM TABLEPCT.SUM SUBTABLEPCT.SUM LAYERPCT.SUM LAYERROWPCT.SUM LAYERCOLPCT.SUM

Summary functions available for multiple response variables and their totals: RESPONSES ROWPCT.RESPONSES COLPCT.RESPONSES TABLEPCT.RESPONSES SUBTABLEPCT.RESPONSES LAYERPCT.RESPONSES LAYERROWPCT.RESPONSES LAYERCOLPCT.RESPONSES ROWPCT.RESPONSES.COUNT COLPCT.RESPONSES.COUNT TABLEPCT.RESPONSES.COUNT SUBTABLEPCT.RESPONSES.COUNT LAYERPCT.RESPONSES.COUNT LAYERROWPCT.RESPONSES.COUNT LAYERCOLPCT.RESPONSES.COUNT ROWPCT.COUNT.RESPONSES COLPCT.COUNT.RESPONSES TABLEPCT.COUNT.RESPONSES SUBTABLEPCT.COUNT.RESPONSES LAYERPCT.COUNT.RESPONSES LAYERROWPCT. COUNT.RESPONSES LAYERCOLPCT.COUNT.RESPONSES

For unweighted summaries, prefix U to a function name, as in UCOUNT.

Formats for summaries: COMMAw.d DOLLARw.d Fw.d NEGPARENw.d NEQUALw.d PARENw.d PCTw.d PCTPARENw.d DOTw.d CCA...CCEw.d Nw.d Ew.d and all DATE formats

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

John F Hall
In support of CTABLES

ViAnn

 

This was a really interesting and helpful contribution to the discussion, especially the history of evolving demands on SPSS.  I vaguely remember submitting (during the 1974 LSE international conference I organised in 1974 at LSE, London) a list of requests to SPSS which included something that emerged as MULT RESPONSE: before that we used to get analysis from Research Services or Jim Ring twiddled with SPSS output to produce something similar.

 

I think people are to some extent talking at cross-purposes.  My syntax approach to MR (and other SPSS procedures) was aimed at beginning students and researchers in sociology and related areas, many of whom, even these days, are wary of anything with numbers in, even though they all seem to have laptops.  Most of them are unlikely to progress to using SPSS in later employment, although SPSS may well help them to find it in these difficult times.  What was more important was for them to master some basic research language and logic related to the processing and analysis of data from questionnaire surveys.  Angus Campbell (Director of ISR, Ann Arbor) always wondered why such students were never expected to acquire laboratory skills analogous to those expected of students in physics and chemistry.  Syntax helps them to follow the process, even if they paste it from the GUI, but sometimes it’s easier to use very simple syntax (and accept defaults).

 

A major constraint on teaching is overcrowded student timetables: 3 hours a week (1 teaching + 2 in the lab) for 13 weeks did not allow for much statistics, but sophomore students learned a lot from practical exercises using data from real surveys, including a secondary analysis project and report.  Many went on to apply their new skills on real surveys for agencies where they spent their professional placement year.  CTABLES would be far beyond anything most of my students would have understood and followed, but the basic course would have given them a grounding from which to pursue this and more advanced procedures and statistics.

 

You refer to Lazarsfeldian elaboration.  One of the underlying themes of my course was to demonstrate how a statistic (mean, %, r) for a sample can be broken down into sub-statistics for sub-samples and to ask students for explanations of what happens when they do this for first, second and later order tables: then to think about other variables which might be used as test/controls and run more analyses.  The old BREAKDOWN procedure was very handy for this when values were recoded to dichotomies of 0 and 100 and the means (now actually percentages) were effectively tabulated in elaboration tables.

 

Overall using simple syntax gave students confidence to tackle computers, data and numbers: more important, it made them think. 

 

John

 

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of ViAnn Beadle
Sent: 14 March 2012 17:49
To: [hidden email]
Subject: In support of CTABLES

 

There has been a small skirmish going on about MULT RESPONSE vs. CTABLES on this list that has become a bit of a religious debate. I think a little history needs to be injected into this debate. I worked for SPSS for 30 years and did requirements analysis, procedure design to meet requirements, and user interface design from syntax to point&click interfaces to output design. I designed the TABLES procedure but I was not directly involved in CTABLES.  Please note that these are solely my opinions and recollections.

ANCIENT HISTORY:

CROSSTABS was one of the original procedures in SPSS and was modeled after an even more ancient mainframe program IIRC, Datatext. It suited the needs for simple crosstabs based upon an analytic technique called Lazarsfeldian elaboration analysis of attitudinal data from political surveys (circa, 1940’s). Statisticians began introducing all sorts of statistical tests for categorical data to move beyond description to tests of statistical (circa, 1960’s). SPSS was differentiated form Datatext in that it provided an ever-increasing set of statistical measures.

While the social scientists were inventing their techniques for the analysis of simple surveys, the market researchers were inventing their own techniques for the analysis of product surveys. Many of the features added to SPSS were driven by demands from the marketing research segment.

MARKETING RESEARCH DRIVEN REQUIREMENTS:

Multiple Response Tables: Marketing data analyses focuses on comparing products in parallel. Tables are required to cross and compare multiple variables. The first requirement is tabulate and cross multiple response data within a single question. MULT RESPONSE was added to SPSS to support this requirement.

Nesting. CROSSTABS, and MULT RESPONSE were limited to 2-D tables. One variable defining the rows and one variable defining the columns. Nesting which is an essential feature of Lazarsfeldian elaboration analysis generates multiple separate subtables. Market researchers have to deliver compact tables to their clients and this is just not an acceptable format for them. This was a basic requirement that release 1 of the TABLES option had to meet.

Banner and Stub Tables: This requirement is to provide multiple variables within a table to provide a compact display. Marketing researchers call these tables Banners and Stubs. The banner typically contains demographic variables like gender, age category, region and race which are concatenated to form subtables of grouped columns, while the stub contains rows or responses to an one or more concatenated attitude variables. This was a basic requirement that release 1 of the TABLES option had to meet.

Summary and Counts together: This requirement is to provide both categorical counts and summary functions like mean, median, and sum within a single table. For example a typical table might include counts for a Likert Scale in the stub with a median or mean summary value row. This also was the basic requirement that release 1 of the TABLES option had to meet. The concept of level of measurement tied to the appropriate summary statistic was introduced into TABLES to simplify syntax and UI.

Parallel Tabulation: This requirement is to tabulate and cross parallel response data within a single question. For example, you want the distribution of ratings across a number of products in a single table with columns as individual products and rows as counts or ratings. Within the market research discipline, this is called a comparimeter table or table of frequencies. MULT RESPONSE doesn’t do this directly. To do this you have to structure the data file so that each case contains a response to a single product and a product key. The easiest way to handle this is to use VARSTOCASES to restructure the file. This was added to the second release of TABLES.

Inferential Statistics: Marketing researchers not only want to the descriptive statistics, they need inferential statistics comparing responses to parallel products. This was a basic requirement that release 1 of CTABLES had to meet.

Subtotals. Marketing researchers not only want totals across nesting, they want subtotals within a simple subtable . This was a basic requirement that release 1 of CTABLES had to meet.

SYNTAX vs. POINT&CLICK:

Simple syntax probably doesn’t need a point&click UI. CROSSTABS and MULT RESPONSE are very, very simple while CTABLES is not. CROSSTABS and MULT RESPONSE produce a limited set of simple tables while CTABLES can build very complicated concatenated and nested tables with different levels of summarization within them. The dynamic WYSIWYSG (what you see is what you “should” get) gives you great feedback on the physical structure of the complex table you are building and is great representation of the underlying table algebra.

I want to focus on my table and not the syntactical steps requires to achieve that table. The more features added to procedures, the more complex the syntax and the less likely we are go get it right without a lot of debugging.

You may not get exactly what you want the first time you use the Custom Tables UI, but I bet you get there a lot sooner than trying to learn syntax that looks like this:

CTABLES

 /FORMAT MINCOLWIDTH={DEFAULT}  MAXCOLWIDTH={DEFAULT}

                     {value  }              {value  }

         UNITS={POINTS}   EMPTY= {ZERO   }   MISSING= {'.'    }

               {INCHES}          {BLANK  }            {'chars'}

               {CM    }          {'chars'}

 /VLABELS VARIABLES= varlist

         DISPLAY= {DEFAULT}

                  {NAME   }

                  {LABEL  }

                  {BOTH   }

                  {NONE   }

 /MRSETS COUNTDUPLICATES= {NO }

                          {YES}

 /SMISSING {VARIABLE}

           {LISTWISE}

 /PCOMPUTE &catname= EXPR(expression)

 /PPROPERTIES &catname &catname...

              LABEL= "label"

              FORMAT= summary format ... summary format

              HIDESOURCECATS= {NO**}

                              {YES }

 /HIDESMALLCOUNTS COUNT = {5      }

                          {integer}

 /TABLE  rows BY columns BY layers

 /SLABELS POSITION= {COLUMN}  VISIBLE= {YES}

                    {ROW   }           {NO }

                    {LAYER }

 /CLABELS {AUTO                  }

          {ROWLABELS= {OPPOSITE} }

                      {LAYER   } 

          {COLLABELS= {OPPOSITE} }

                      {LAYER   } 

 /CATEGORIES  VARIABLES= varlist 

    { [value, value, value...]                              }

    { ORDER= {A} KEY= {VALUE           } MISSING= {EXCLUDE} }

             {D}      {LABEL           }          {INCLUDE}

                      {summary(varname)}

     TOTAL= {NO  }  LABEL= "label" POSITION= {AFTER } EMPTY= {INCLUDE}

            {YES }                           {BEFORE}        {EXCLUDE}

   Explicit value lists can include SUBTOTAL=’label’, HSUBTOTAL=’label’, MISSING, OTHERNM.

 

 /TITLES  CAPTION= ['text' 'text'...]

          CORNER=  ['text' 'text'...]

          TITLE=   ['text' 'text'...]

          Text can contain the symbols )DATE  )TIME  )TABLE

 /SIGTEST TYPE= CHISQUARE  ALPHA= {0.05              }

                                  {significance level}

          INCLUDEMRSETS={YES**}

                        {NO   }

          CATEGORIES={ALLVISIBLE**}

                     {SUBTOTALS   }

 /COMPARETEST TYPE= {PROP}  ALPHA= {0.05              }

                    {MEAN}         {significance level}

          ADJUST= {BONFERRONI}  ORIGIN=COLUMN

                  {NONE      }

          INCLUDEMRSETS={YES**}  MEANSVARIANCE={ALLCATS   }

                        {NO   }                {TESTEDCATS}

          CATEGORIES={ALLVISIBLE**}

                     {SUBTOTALS   }

          MERGE={NO**}

                {YES}

Row, column, and layer elements each have the general form

 varname {[C]} [summary ‘label’ format...] {+}  varname ... 

         {[S]}                             {>}

When nesting (>) and concatenation (+) are combined, as in a + b > c, nesting occurs before concatenation; parentheses can be used to change precedence, as in (a + b) > c.

Summary functions available for all variables: COUNT ROWPCT.COUNT COLPCT.COUNT TABLEPCT.COUNT SUBTABLEPCT.COUNT LAYERPCT.COUNT LAYERROWPCT.COUNT LAYERCOLPCT.COUNT ROWPCT.VALIDN COLPCT.VALIDN TABLEPCT.VALIDN SUBTABLEPCT.VALIDN LAYERPCT.VALIDN LAYERROWPCT.VALIDN LAYERCOLPCT.VALIDN ROWPCT.TOTALN COLPCT.TOTALN TABLEPCT.TOTALN SUBTABLEPCT.TOTALN LAYERPCT.TOTALN LAYERROWPCT.TOTALN LAYERCOLPCT.TOTALN

Summary functions available for scale variables and for totals and subtotals of numeric variables: MAXIMUM MEAN MEDIAN MINIMUM MISSING MODE PTILE RANGE SEMEAN STDDEV SUM TOTALN VALIDN VARIANCE ROWPCT.SUM COLPCT.SUM TABLEPCT.SUM SUBTABLEPCT.SUM LAYERPCT.SUM LAYERROWPCT.SUM LAYERCOLPCT.SUM

Summary functions available for multiple response variables and their totals: RESPONSES ROWPCT.RESPONSES COLPCT.RESPONSES TABLEPCT.RESPONSES SUBTABLEPCT.RESPONSES LAYERPCT.RESPONSES LAYERROWPCT.RESPONSES LAYERCOLPCT.RESPONSES ROWPCT.RESPONSES.COUNT COLPCT.RESPONSES.COUNT TABLEPCT.RESPONSES.COUNT SUBTABLEPCT.RESPONSES.COUNT LAYERPCT.RESPONSES.COUNT LAYERROWPCT.RESPONSES.COUNT LAYERCOLPCT.RESPONSES.COUNT ROWPCT.COUNT.RESPONSES COLPCT.COUNT.RESPONSES TABLEPCT.COUNT.RESPONSES SUBTABLEPCT.COUNT.RESPONSES LAYERPCT.COUNT.RESPONSES LAYERROWPCT. COUNT.RESPONSES LAYERCOLPCT.COUNT.RESPONSES

For unweighted summaries, prefix U to a function name, as in UCOUNT.

Formats for summaries: COMMAw.d DOLLARw.d Fw.d NEGPARENw.d NEQUALw.d PARENw.d PCTw.d PCTPARENw.d DOTw.d CCA...CCEw.d Nw.d Ew.d and all DATE formats

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Raffe, Sydelle, SSA
In support of CTABLES

Can’t believe Datatext has arisen in any discussion. Thought I was the only who remembered that.

 


From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: Wednesday, March 14, 2012 11:49 AM
To: [hidden email]
Subject: Re: In support of CTABLES

 

ViAnn

 

This was a really interesting and helpful contribution to the discussion, especially the history of evolving demands on SPSS.  I vaguely remember submitting (during the 1974 LSE international conference I organised in 1974 at LSE, London) a list of requests to SPSS which included something that emerged as MULT RESPONSE: before that we used to get analysis from Research Services or Jim Ring twiddled with SPSS output to produce something similar.

 

I think people are to some extent talking at cross-purposes.  My syntax approach to MR (and other SPSS procedures) was aimed at beginning students and researchers in sociology and related areas, many of whom, even these days, are wary of anything with numbers in, even though they all seem to have laptops.  Most of them are unlikely to progress to using SPSS in later employment, although SPSS may well help them to find it in these difficult times.  What was more important was for them to master some basic research language and logic related to the processing and analysis of data from questionnaire surveys.  Angus Campbell (Director of ISR, Ann Arbor) always wondered why such students were never expected to acquire laboratory skills analogous to those expected of students in physics and chemistry.  Syntax helps them to follow the process, even if they paste it from the GUI, but sometimes it’s easier to use very simple syntax (and accept defaults).

 

A major constraint on teaching is overcrowded student timetables: 3 hours a week (1 teaching + 2 in the lab) for 13 weeks did not allow for much statistics, but sophomore students learned a lot from practical exercises using data from real surveys, including a secondary analysis project and report.  Many went on to apply their new skills on real surveys for agencies where they spent their professional placement year.  CTABLES would be far beyond anything most of my students would have understood and followed, but the basic course would have given them a grounding from which to pursue this and more advanced procedures and statistics.

 

You refer to Lazarsfeldian elaboration.  One of the underlying themes of my course was to demonstrate how a statistic (mean, %, r) for a sample can be broken down into sub-statistics for sub-samples and to ask students for explanations of what happens when they do this for first, second and later order tables: then to think about other variables which might be used as test/controls and run more analyses.  The old BREAKDOWN procedure was very handy for this when values were recoded to dichotomies of 0 and 100 and the means (now actually percentages) were effectively tabulated in elaboration tables.

 

Overall using simple syntax gave students confidence to tackle computers, data and numbers: more important, it made them think. 

 

John

 

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of ViAnn Beadle
Sent: 14 March 2012 17:49
To: [hidden email]
Subject: In support of CTABLES

 

There has been a small skirmish going on about MULT RESPONSE vs. CTABLES on this list that has become a bit of a religious debate. I think a little history needs to be injected into this debate. I worked for SPSS for 30 years and did requirements analysis, procedure design to meet requirements, and user interface design from syntax to point&click interfaces to output design. I designed the TABLES procedure but I was not directly involved in CTABLES.  Please note that these are solely my opinions and recollections.

ANCIENT HISTORY:

CROSSTABS was one of the original procedures in SPSS and was modeled after an even more ancient mainframe program IIRC, Datatext. It suited the needs for simple crosstabs based upon an analytic technique called Lazarsfeldian elaboration analysis of attitudinal data from political surveys (circa, 1940’s). Statisticians began introducing all sorts of statistical tests for categorical data to move beyond description to tests of statistical (circa, 1960’s). SPSS was differentiated form Datatext in that it provided an ever-increasing set of statistical measures.

While the social scientists were inventing their techniques for the analysis of simple surveys, the market researchers were inventing their own techniques for the analysis of product surveys. Many of the features added to SPSS were driven by demands from the marketing research segment.

MARKETING RESEARCH DRIVEN REQUIREMENTS:

Multiple Response Tables: Marketing data analyses focuses on comparing products in parallel. Tables are required to cross and compare multiple variables. The first requirement is tabulate and cross multiple response data within a single question. MULT RESPONSE was added to SPSS to support this requirement.

Nesting. CROSSTABS, and MULT RESPONSE were limited to 2-D tables. One variable defining the rows and one variable defining the columns. Nesting which is an essential feature of Lazarsfeldian elaboration analysis generates multiple separate subtables. Market researchers have to deliver compact tables to their clients and this is just not an acceptable format for them. This was a basic requirement that release 1 of the TABLES option had to meet.

Banner and Stub Tables: This requirement is to provide multiple variables within a table to provide a compact display. Marketing researchers call these tables Banners and Stubs. The banner typically contains demographic variables like gender, age category, region and race which are concatenated to form subtables of grouped columns, while the stub contains rows or responses to an one or more concatenated attitude variables. This was a basic requirement that release 1 of the TABLES option had to meet.

Summary and Counts together: This requirement is to provide both categorical counts and summary functions like mean, median, and sum within a single table. For example a typical table might include counts for a Likert Scale in the stub with a median or mean summary value row. This also was the basic requirement that release 1 of the TABLES option had to meet. The concept of level of measurement tied to the appropriate summary statistic was introduced into TABLES to simplify syntax and UI.

Parallel Tabulation: This requirement is to tabulate and cross parallel response data within a single question. For example, you want the distribution of ratings across a number of products in a single table with columns as individual products and rows as counts or ratings. Within the market research discipline, this is called a comparimeter table or table of frequencies. MULT RESPONSE doesn’t do this directly. To do this you have to structure the data file so that each case contains a response to a single product and a product key. The easiest way to handle this is to use VARSTOCASES to restructure the file. This was added to the second release of TABLES.

Inferential Statistics: Marketing researchers not only want to the descriptive statistics, they need inferential statistics comparing responses to parallel products. This was a basic requirement that release 1 of CTABLES had to meet.

Subtotals. Marketing researchers not only want totals across nesting, they want subtotals within a simple subtable . This was a basic requirement that release 1 of CTABLES had to meet.

SYNTAX vs. POINT&CLICK:

Simple syntax probably doesn’t need a point&click UI. CROSSTABS and MULT RESPONSE are very, very simple while CTABLES is not. CROSSTABS and MULT RESPONSE produce a limited set of simple tables while CTABLES can build very complicated concatenated and nested tables with different levels of summarization within them. The dynamic WYSIWYSG (what you see is what you “should” get) gives you great feedback on the physical structure of the complex table you are building and is great representation of the underlying table algebra.

I want to focus on my table and not the syntactical steps requires to achieve that table. The more features added to procedures, the more complex the syntax and the less likely we are go get it right without a lot of debugging.

You may not get exactly what you want the first time you use the Custom Tables UI, but I bet you get there a lot sooner than trying to learn syntax that looks like this:

CTABLES

 /FORMAT MINCOLWIDTH={DEFAULT}  MAXCOLWIDTH={DEFAULT}

                     {value  }              {value  }

         UNITS={POINTS}   EMPTY= {ZERO   }   MISSING= {'.'    }

               {INCHES}          {BLANK  }            {'chars'}

               {CM    }          {'chars'}

 /VLABELS VARIABLES= varlist

         DISPLAY= {DEFAULT}

                  {NAME   }

                  {LABEL  }

                  {BOTH   }

                  {NONE   }

 /MRSETS COUNTDUPLICATES= {NO }

                          {YES}

 /SMISSING {VARIABLE}

           {LISTWISE}

 /PCOMPUTE &catname= EXPR(expression)

 /PPROPERTIES &catname &catname...

              LABEL= "label"

              FORMAT= summary format ... summary format

              HIDESOURCECATS= {NO**}

                              {YES }

 /HIDESMALLCOUNTS COUNT = {5      }

                          {integer}

 /TABLE  rows BY columns BY layers

 /SLABELS POSITION= {COLUMN}  VISIBLE= {YES}

                    {ROW   }           {NO }

                    {LAYER }

 /CLABELS {AUTO                  }

          {ROWLABELS= {OPPOSITE} }

                      {LAYER   } 

          {COLLABELS= {OPPOSITE} }

                      {LAYER   } 

 /CATEGORIES  VARIABLES= varlist 

    { [value, value, value...]                              }

    { ORDER= {A} KEY= {VALUE           } MISSING= {EXCLUDE} }

             {D}      {LABEL           }          {INCLUDE}

                      {summary(varname)}

     TOTAL= {NO  }  LABEL= "label" POSITION= {AFTER } EMPTY= {INCLUDE}

            {YES }                           {BEFORE}        {EXCLUDE}

   Explicit value lists can include SUBTOTAL=’label’, HSUBTOTAL=’label’, MISSING, OTHERNM.

 

 /TITLES  CAPTION= ['text' 'text'...]

          CORNER=  ['text' 'text'...]

          TITLE=   ['text' 'text'...]

          Text can contain the symbols )DATE  )TIME  )TABLE

 /SIGTEST TYPE= CHISQUARE  ALPHA= {0.05              }

                                  {significance level}

          INCLUDEMRSETS={YES**}

                        {NO   }

          CATEGORIES={ALLVISIBLE**}

                     {SUBTOTALS   }

 /COMPARETEST TYPE= {PROP}  ALPHA= {0.05              }

                    {MEAN}         {significance level}

          ADJUST= {BONFERRONI}  ORIGIN=COLUMN

                  {NONE      }

          INCLUDEMRSETS={YES**}  MEANSVARIANCE={ALLCATS   }

                        {NO   }                {TESTEDCATS}

          CATEGORIES={ALLVISIBLE**}

                     {SUBTOTALS   }

          MERGE={NO**}

                {YES}

Row, column, and layer elements each have the general form

 varname {[C]} [summary ‘label’ format...] {+}  varname ... 

         {[S]}                             {>}

When nesting (>) and concatenation (+) are combined, as in a + b > c, nesting occurs before concatenation; parentheses can be used to change precedence, as in (a + b) > c.

Summary functions available for all variables: COUNT ROWPCT.COUNT COLPCT.COUNT TABLEPCT.COUNT SUBTABLEPCT.COUNT LAYERPCT.COUNT LAYERROWPCT.COUNT LAYERCOLPCT.COUNT ROWPCT.VALIDN COLPCT.VALIDN TABLEPCT.VALIDN SUBTABLEPCT.VALIDN LAYERPCT.VALIDN LAYERROWPCT.VALIDN LAYERCOLPCT.VALIDN ROWPCT.TOTALN COLPCT.TOTALN TABLEPCT.TOTALN SUBTABLEPCT.TOTALN LAYERPCT.TOTALN LAYERROWPCT.TOTALN LAYERCOLPCT.TOTALN

Summary functions available for scale variables and for totals and subtotals of numeric variables: MAXIMUM MEAN MEDIAN MINIMUM MISSING MODE PTILE RANGE SEMEAN STDDEV SUM TOTALN VALIDN VARIANCE ROWPCT.SUM COLPCT.SUM TABLEPCT.SUM SUBTABLEPCT.SUM LAYERPCT.SUM LAYERROWPCT.SUM LAYERCOLPCT.SUM

Summary functions available for multiple response variables and their totals: RESPONSES ROWPCT.RESPONSES COLPCT.RESPONSES TABLEPCT.RESPONSES SUBTABLEPCT.RESPONSES LAYERPCT.RESPONSES LAYERROWPCT.RESPONSES LAYERCOLPCT.RESPONSES ROWPCT.RESPONSES.COUNT COLPCT.RESPONSES.COUNT TABLEPCT.RESPONSES.COUNT SUBTABLEPCT.RESPONSES.COUNT LAYERPCT.RESPONSES.COUNT LAYERROWPCT.RESPONSES.COUNT LAYERCOLPCT.RESPONSES.COUNT ROWPCT.COUNT.RESPONSES COLPCT.COUNT.RESPONSES TABLEPCT.COUNT.RESPONSES SUBTABLEPCT.COUNT.RESPONSES LAYERPCT.COUNT.RESPONSES LAYERROWPCT. COUNT.RESPONSES LAYERCOLPCT.COUNT.RESPONSES

For unweighted summaries, prefix U to a function name, as in UCOUNT.

Formats for summaries: COMMAw.d DOLLARw.d Fw.d NEGPARENw.d NEQUALw.d PARENw.d PCTw.d PCTPARENw.d DOTw.d CCA...CCEw.d Nw.d Ew.d and all DATE formats

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Jon K Peck
CTABLES has elaborate, although logical, syntax for complicated things.  For simple things, it's as simple as it gets:
CTABLES /TABLE x BY y.

And for an MR set,
CTABLES /TABLE $x BY y.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

John F Hall

Jon

 

You made no mention of the MRSETS command.

 

It took me well over an hour to sort this out, and I know my way round SPSS reasonably well.  Beginning students would clearly take much longer or give up altogether.  To prepare a new tutorial for such students would take an unconscionably long time.  

 

Much of my time was spent wading throught the CSR where nothing in CTABLES explaining MRSETS and it doesn’t refer you to the separate MRSETS command.  I discovered this by trying to run Analyze >  Mult Response > Define … before being pointed to Data >  Define MR sets. (it didn’t help that Mult Resp is buried at the bottom of the Analyze list.)  I used PASTE from Data > Define MR sets to see the syntax generated.

 

MRSETS

  /MCGROUP NAME=$prej VARIABLES=v608 v610 v612

  /DISPLAY NAME=[$prej].

 

. .and ran your syntax substituting my own vars.

 

CTABLES /TABLE $prej BY v575.

 

 

 

Q.70e:    How [prejudiced] would you describe yourself?

Very prejudiced

A little prejudiced

Not prejudiced

Count

Count

Count

$prej

Asians

25

148

0

Blacks

15

66

0

Coloureds

12

41

0

Pakistanis

24

105

0

Indians

9

42

0

Sikhs

1

3

0

West Indians

14

84

0

Africans

4

24

0

Other specified

8

36

0

Against all races

44

529

0

 

This proves the late Professor Sir Roger Jowell’s contention that, “The verb to be prejudiced has no first person singular!”  This was actually because V575 was a filter question and the question about groups prejudiced against was not asked of people who claimed not to be prejudiced.  In cases like this it is sometimes useful to display the data in descending order of frequencies: can that be done in MR?

 

Being curious I then went into CTables to see what syntax was generated  (Nice surprise to see mock-up tables to indicate what the output would contain!) . . to get the same table, but the generated syntax would, like the spider, have frightened Miss Muffitt and my students away. 

 

CTABLES

  /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT

  /TABLE $prej [COUNT F40.0] BY v575

  /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE.

 

Anyway, thanks for the tip about shortened syntax for CTABLES.  Some of the possibilities in the CSR seem promising.  I’ll play around with the format and contents to see if I can produce the kind of tables I used to recommend to students, but which couldn’t be produced by SPSS.  These would include tables with row % and a single base N on the same row (ie not two rows as in crosstabs) and tables to illustrate Lazarsfeldian elaboration as per Rosenberg.

 

John (with an h) Hall

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

 

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Jon K Peck
Sent: 15 March 2012 21:43
To: [hidden email]
Subject: Re: In support of CTABLES

 

CTABLES has elaborate, although logical, syntax for complicated things.  For simple things, it's as simple as it gets:
CTABLES /TABLE x BY y.

And for an MR set,
CTABLES /TABLE $x BY y.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Jon K Peck
One of the key points about CTABLES and MR sets is the separation of definition and use.  And that the definitions persist with the data.  So once the set is defined, you can just use it in CTABLES and GGRAPH without having to reproduce the definition.  MULT RESPONSE and old TABLES don't work this way.

We would have retrofit MULT RESPONSE to use the persistent definitions, but we couldn't do that because the newer sets are more general and have features that MULT RESPONSE could not use.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        "John F Hall" <[hidden email]>
To:        Jon K Peck/Chicago/IBM@IBMUS, <[hidden email]>
Cc:        "'Bruce Weaver'" <[hidden email]>
Date:        03/15/2012 11:26 PM
Subject:        RE: In support of CTABLES




Jon
 
You made no mention of the MRSETS command.
 
It took me well over an hour to sort this out, and I know my way round SPSS reasonably well.  Beginning students would clearly take much longer or give up altogether.  To prepare a new tutorial for such students would take an unconscionably long time.  
 
Much of my time was spent wading throught the CSR where nothing in CTABLES explaining MRSETS and it doesn’t refer you to the separate MRSETS command.  I discovered this by trying to run Analyze >  Mult Response > Define … before being pointed to Data >  Define MR sets. (it didn’t help that Mult Resp is buried at the bottom of the Analyze list.)  I used PASTE from Data > Define MR sets to see the syntax generated.
 
MRSETS
  /MCGROUP NAME=$prej VARIABLES=v608 v610 v612
  /DISPLAY NAME=[$prej].
 
. .and ran your syntax substituting my own vars.
 
CTABLES /TABLE $prej BY v575.
 
 

 
Q.70e:    How [prejudiced] would you describe yourself?
Very prejudiced
A little prejudiced
Not prejudiced
Count
Count
Count
$prej Asians
25
148
0
Blacks
15
66
0
Coloureds
12
41
0
Pakistanis
24
105
0
Indians
9
42
0
Sikhs
1
3
0
West Indians
14
84
0
Africans
4
24
0
Other specified
8
36
0
Against all races
44
529
0

 
This proves the late Professor Sir Roger Jowell’s contention that, “The verb to be prejudiced has no first person singular!”  This was actually because V575 was a filter question and the question about groups prejudiced against was not asked of people who claimed not to be prejudiced.  In cases like this it is sometimes useful to display the data in descending order of frequencies: can that be done in MR?
 
Being curious I then went into CTables to see what syntax was generated  (Nice surprise to see mock-up tables to indicate what the output would contain!) . . to get the same table, but the generated syntax would, like the spider, have frightened Miss Muffitt and my students away.  
 
CTABLES
  /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT
  /TABLE $prej [COUNT F40.0] BY v575
  /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE.
 
Anyway, thanks for the tip about shortened syntax for CTABLES.  Some of the possibilities in the CSR seem promising.  I’ll play around with the format and contents to see if I can produce the kind of tables I used to recommend to students, but which couldn’t be produced by SPSS.  These would include tables with row % and a single base N on the same row (ie not two rows as in crosstabs) and tables to illustrate Lazarsfeldian elaboration as per Rosenberg.
 
John (with an h) Hall
 
Email:     johnfhall@...
Website: www.surveyresearch.weebly.com
Skype:   surveyresearcher1
Phone:    (+33) (0) 2.33.45.91.47
 
 
 
 
 
 
 
From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon K Peck
Sent:
15 March 2012 21:43
To:
[hidden email]
Subject:
Re: In support of CTABLES

 
CTABLES has elaborate, although logical, syntax for complicated things.  For simple things, it's as simple as it gets:
CTABLES /TABLE x BY y.


And for an MR set,

CTABLES /TABLE $x BY y.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM

peck@...
new phone: 720-342-5621

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Poes, Matthew Joseph-2
In reply to this post by John F Hall

John,

                I agree with you that new students need to learn how to code logic into SPSS.  It’s important to understand what these programs are doing.  As long as students understand that in the real world, if using SPSS, they will likely use a canned module within the program to do these same functions, then learning the logic that underlies it is fine (just as learning to hand write a regression and solve).

 

                However, I know you have considerably more experience with both SPSS and coding than I do, but I learned MRSETs in a matter of 30 minutes or so, and had a working understanding of CTables in probably the same time.  I’ve only been working with the two actively for about 2 years now, but find them supremely easy to use.  While I frequently make my CTables through the interface, instead of syntax, I can write my CTables via syntax without issue (it’s just much quicker to let SPSS do it for me).  In terms of MRsets, I always write this in syntax, and it doesn’t take me long at all. 

               

                If nothing else, its very easy to make mistakes in long and complicated code, but the code for CTables and MRsets is not long and complicated unless your needs are long and complicated.  Debugging this is a non-issue.  I really don’t understand why it took you so long to learn, why you are so resistant to them, and why you continue to post these disparaging remarks.  I happen to love Ctables and MRsets in SPSS because I find they have made my life much easier.  I was honestly shocked to find someone disagree with that.  Maybe the issue is that we are each used to different things, and as a result what I am finding “time saving” you are finding “complicated.”

 

                I would be surprised if, in time, you didn’t find Ctables to be a giant improvement over the old tables system, in terms of flexibility.  While memorizing all of the possible code is daunting (I certainly have not myself) I find it easy to figure out. 

 

Matthew J Poes

Research Data Specialist

Center for Prevention Research and Development

University of Illinois

510 Devonshire Dr.

Champaign, IL 61820

Phone: 217-265-4576

email: [hidden email]

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: Friday, March 16, 2012 12:27 AM
To: [hidden email]
Subject: Re: In support of CTABLES

 

Jon

 

You made no mention of the MRSETS command.

 

It took me well over an hour to sort this out, and I know my way round SPSS reasonably well.  Beginning students would clearly take much longer or give up altogether.  To prepare a new tutorial for such students would take an unconscionably long time.  

 

Much of my time was spent wading throught the CSR where nothing in CTABLES explaining MRSETS and it doesn’t refer you to the separate MRSETS command.  I discovered this by trying to run Analyze >  Mult Response > Define … before being pointed to Data >  Define MR sets. (it didn’t help that Mult Resp is buried at the bottom of the Analyze list.)  I used PASTE from Data > Define MR sets to see the syntax generated.

 

MRSETS

  /MCGROUP NAME=$prej VARIABLES=v608 v610 v612

  /DISPLAY NAME=[$prej].

 

. .and ran your syntax substituting my own vars.

 

CTABLES /TABLE $prej BY v575.

 

 

 

Q.70e:    How [prejudiced] would you describe yourself?

Very prejudiced

A little prejudiced

Not prejudiced

Count

Count

Count

$prej

Asians

25

148

0

Blacks

15

66

0

Coloureds

12

41

0

Pakistanis

24

105

0

Indians

9

42

0

Sikhs

1

3

0

West Indians

14

84

0

Africans

4

24

0

Other specified

8

36

0

Against all races

44

529

0

 

This proves the late Professor Sir Roger Jowell’s contention that, “The verb to be prejudiced has no first person singular!”  This was actually because V575 was a filter question and the question about groups prejudiced against was not asked of people who claimed not to be prejudiced.  In cases like this it is sometimes useful to display the data in descending order of frequencies: can that be done in MR?

 

Being curious I then went into CTables to see what syntax was generated  (Nice surprise to see mock-up tables to indicate what the output would contain!) . . to get the same table, but the generated syntax would, like the spider, have frightened Miss Muffitt and my students away. 

 

CTABLES

  /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT

  /TABLE $prej [COUNT F40.0] BY v575

  /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE.

 

Anyway, thanks for the tip about shortened syntax for CTABLES.  Some of the possibilities in the CSR seem promising.  I’ll play around with the format and contents to see if I can produce the kind of tables I used to recommend to students, but which couldn’t be produced by SPSS.  These would include tables with row % and a single base N on the same row (ie not two rows as in crosstabs) and tables to illustrate Lazarsfeldian elaboration as per Rosenberg.

 

John (with an h) Hall

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

 

 

 

 

 

 

From: SPSSX(r) Discussion [hidden email] On Behalf Of Jon K Peck
Sent: 15 March 2012 21:43
To: [hidden email]
Subject: Re: In support of CTABLES

 

CTABLES has elaborate, although logical, syntax for complicated things.  For simple things, it's as simple as it gets:
CTABLES /TABLE x BY y.

And for an MR set,
CTABLES /TABLE $x BY y.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

John F Hall

Matthew

 

I think you may have missed a later exchange with Jon which may address your concerns.

 

I totally agree with you, but I always put myself in the place of a naïve user seeing something for the first time.  At 4 o’clock this morning I was possibly a little slower than usual but the route I took with the GUI was probably typical of student beginners in social and political sciences.

 

I’ve nothing against the GUI and I use it to save time when it’s quicker (which isn’t often for basic operations and analysis) but the CT syntax generated that way for MR was daunting to me, let alone the sort of students I used to teach.  If I’ve forgotten the exact syntax I open the CSR (and sometimes leave it open during SPSS sessions). 

 

The pedagogic approach adopted in my courses must have had some merit as many students still write in appreciation 20 or more years after I retired: seven of them are now full Professors in UK universities and many others occupy senior research positions.  However this may have more to do with being taught by practicing researchers than being exposed to SPSS syntax (GUI didn’t exist in those days).

 

I have continued this approach in updating and converting the courses for SPSS for Windows.  I do this because, whilst there are many survey methods courses around using SPSS as a basis, they tend to be oriented more to sampling error,  mathematical statistics and statistical modelling than to the actual substance of the research and the logic and process of addressing substantive research questions using data from questionnaire surveys.  As John Tukey once said, “All the statistics in the world won’t save you if you asked the wrong question in the first place.”  And as my old boss Mark Abrams used to say, “If it’s worth saying, it’s worth saying in percentages.” However I suspect he would have been just as happy, if not more, with the graphics now available.

 

If I can fit CT into this approach I certainly will, but it will take many steps and many screenshots to explain the journey and the resulting syntax.  Meanwhile I still have around half of the course materials to convert and update.  When I have finished using survey data from the 1970s and 1980s, I can begin to think about more recent material from the BSA, the ESS and ONS well-being surveys as well as the GSS.

 

What would be interesting would be to see what beginning students and researchers actually do (keystrokes, mouse movements and viewer output) and how long it takes them, when they use SPSS to perform a set of standard exercises.  We did something like this in the 1970s when we got ULCC to pin a questionnaire to all SPSS output in which errors had occurred.  This was to check whether SPSS had accurately identified the source of any errors, and what the actual error was.  I don’t have a copy of the report, but there was a short article in the ULCC Newsletter by Cathie Marsh and John Utting which might be interesting to compare with today’s much improved and less confusing, mostly user-friendly error messages.

 

Finally, perhaps you should actually have a look at some of my tutorials, starting with page:

 

http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html and then by having a look at http://surveyresearch.weebly.com/old-dog-old-tricks.html  The first slideshow is quite fun and not covered in the main presentation.  I’d appreciate your comments and suggestions.

 

All my materials are available for free download.  Also I’m working on my own with no institutional affiliation or support, and on a fractional pension.  Some of my closest professional colleagues have recently passed away: I hope that, before my own time comes, my site can help share with others something of the knowledge and skills I have acquired, and of the thrills I have enjoyed, as a survey researcher since 1965.

 

Incidentally, although I’ve been using SPSS since 1972, on dozens if not hundreds of data sets, I’ve never written any code except for a suite of survey analysis programs in Algol in the 1960’s (input and output on 8-hole paper tape).

 

Meanwhile, I have a large garden to prepare for planting, a building extension to finish and a backlog of 400+ films recorded from (UK) TV to catch  up on.  Who said retirement was boring?

 

Cheers

 

John Hall

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

PS 

 

 

 

From: Poes, Matthew Joseph [mailto:[hidden email]]
Sent: 16 March 2012 14:39
To: 'John F Hall'; '[hidden email]'
Subject: RE: In support of CTABLES

 

John,

                I agree with you that new students need to learn how to code logic into SPSS.  It’s important to understand what these programs are doing.  As long as students understand that in the real world, if using SPSS, they will likely use a canned module within the program to do these same functions, then learning the logic that underlies it is fine (just as learning to hand write a regression and solve).

 

                However, I know you have considerably more experience with both SPSS and coding than I do, but I learned MRSETs in a matter of 30 minutes or so, and had a working understanding of CTables in probably the same time.  I’ve only been working with the two actively for about 2 years now, but find them supremely easy to use.  While I frequently make my CTables through the interface, instead of syntax, I can write my CTables via syntax without issue (it’s just much quicker to let SPSS do it for me).  In terms of MRsets, I always write this in syntax, and it doesn’t take me long at all. 

               

                If nothing else, its very easy to make mistakes in long and complicated code, but the code for CTables and MRsets is not long and complicated unless your needs are long and complicated.  Debugging this is a non-issue.  I really don’t understand why it took you so long to learn, why you are so resistant to them, and why you continue to post these disparaging remarks.  I happen to love Ctables and MRsets in SPSS because I find they have made my life much easier.  I was honestly shocked to find someone disagree with that.  Maybe the issue is that we are each used to different things, and as a result what I am finding “time saving” you are finding “complicated.”

 

                I would be surprised if, in time, you didn’t find Ctables to be a giant improvement over the old tables system, in terms of flexibility.  While memorizing all of the possible code is daunting (I certainly have not myself) I find it easy to figure out. 

 

Matthew J Poes

Research Data Specialist

Center for Prevention Research and Development

University of Illinois

510 Devonshire Dr.

Champaign, IL 61820

Phone: 217-265-4576

email: [hidden email]

 

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of John F Hall
Sent: Friday, March 16, 2012 12:27 AM
To: [hidden email]
Subject: Re: In support of CTABLES

 

Jon

 

You made no mention of the MRSETS command.

 

It took me well over an hour to sort this out, and I know my way round SPSS reasonably well.  Beginning students would clearly take much longer or give up altogether.  To prepare a new tutorial for such students would take an unconscionably long time.  

 

Much of my time was spent wading throught the CSR where nothing in CTABLES explaining MRSETS and it doesn’t refer you to the separate MRSETS command.  I discovered this by trying to run Analyze >  Mult Response > Define … before being pointed to Data >  Define MR sets. (it didn’t help that Mult Resp is buried at the bottom of the Analyze list.)  I used PASTE from Data > Define MR sets to see the syntax generated.

 

MRSETS

  /MCGROUP NAME=$prej VARIABLES=v608 v610 v612

  /DISPLAY NAME=[$prej].

 

. .and ran your syntax substituting my own vars.

 

CTABLES /TABLE $prej BY v575.

 

 

 

Q.70e:    How [prejudiced] would you describe yourself?

Very prejudiced

A little prejudiced

Not prejudiced

Count

Count

Count

$prej

Asians

25

148

0

Blacks

15

66

0

Coloureds

12

41

0

Pakistanis

24

105

0

Indians

9

42

0

Sikhs

1

3

0

West Indians

14

84

0

Africans

4

24

0

Other specified

8

36

0

Against all races

44

529

0

 

This proves the late Professor Sir Roger Jowell’s contention that, “The verb to be prejudiced has no first person singular!”  This was actually because V575 was a filter question and the question about groups prejudiced against was not asked of people who claimed not to be prejudiced.  In cases like this it is sometimes useful to display the data in descending order of frequencies: can that be done in MR?

 

Being curious I then went into CTables to see what syntax was generated  (Nice surprise to see mock-up tables to indicate what the output would contain!) . . to get the same table, but the generated syntax would, like the spider, have frightened Miss Muffitt and my students away. 

 

CTABLES

  /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT

  /TABLE $prej [COUNT F40.0] BY v575

  /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE.

 

Anyway, thanks for the tip about shortened syntax for CTABLES.  Some of the possibilities in the CSR seem promising.  I’ll play around with the format and contents to see if I can produce the kind of tables I used to recommend to students, but which couldn’t be produced by SPSS.  These would include tables with row % and a single base N on the same row (ie not two rows as in crosstabs) and tables to illustrate Lazarsfeldian elaboration as per Rosenberg.

 

John (with an h) Hall

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

 

 

 

 

 

 

From: SPSSX(r) Discussion [hidden email] On Behalf Of Jon K Peck
Sent: 15 March 2012 21:43
To: [hidden email]
Subject: Re: In support of CTABLES

 

CTABLES has elaborate, although logical, syntax for complicated things.  For simple things, it's as simple as it gets:
CTABLES /TABLE x BY y.

And for an MR set,
CTABLES /TABLE $x BY y.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Poes, Matthew Joseph-2

Hey John,

                That all sounds great.  I’ll certainly take a look at your tutorials when I have some time.  I hope you do enjoy your retirement, and sorry to hear it must be on a fractional pension.  I’ve learned greatly from the wisdom and experience of people like you over the years.  Being a software expert is nothing if you don’t know how to apply it.  My technical knowledge has far surpassed many of my mentor’s over the years, and at the moment (I don’t consider this to be saying much), is the greatest in the unit I work with, but I still learn greatly from the people around me with far more years of practical experience.  Understanding the logic which underlies these programs is key to interpreting the output you see.  Had it not been for people like yourself in my own life, I’m sure I would have made far more mistakes and had many of them make it to the public. 

 

Matthew J Poes

Research Data Specialist

Center for Prevention Research and Development

University of Illinois

510 Devonshire Dr.

Champaign, IL 61820

Phone: 217-265-4576

email: [hidden email]

 

 

From: John F Hall [mailto:[hidden email]]
Sent: Friday, March 16, 2012 10:47 AM
To: Poes, Matthew Joseph; [hidden email]
Cc: 'Bruce Weaver'
Subject: RE: In support of CTABLES

 

Matthew

 

I think you may have missed a later exchange with Jon which may address your concerns.

 

I totally agree with you, but I always put myself in the place of a naïve user seeing something for the first time.  At 4 o’clock this morning I was possibly a little slower than usual but the route I took with the GUI was probably typical of student beginners in social and political sciences.

 

I’ve nothing against the GUI and I use it to save time when it’s quicker (which isn’t often for basic operations and analysis) but the CT syntax generated that way for MR was daunting to me, let alone the sort of students I used to teach.  If I’ve forgotten the exact syntax I open the CSR (and sometimes leave it open during SPSS sessions). 

 

The pedagogic approach adopted in my courses must have had some merit as many students still write in appreciation 20 or more years after I retired: seven of them are now full Professors in UK universities and many others occupy senior research positions.  However this may have more to do with being taught by practicing researchers than being exposed to SPSS syntax (GUI didn’t exist in those days).

 

I have continued this approach in updating and converting the courses for SPSS for Windows.  I do this because, whilst there are many survey methods courses around using SPSS as a basis, they tend to be oriented more to sampling error,  mathematical statistics and statistical modelling than to the actual substance of the research and the logic and process of addressing substantive research questions using data from questionnaire surveys.  As John Tukey once said, “All the statistics in the world won’t save you if you asked the wrong question in the first place.”  And as my old boss Mark Abrams used to say, “If it’s worth saying, it’s worth saying in percentages.” However I suspect he would have been just as happy, if not more, with the graphics now available.

 

If I can fit CT into this approach I certainly will, but it will take many steps and many screenshots to explain the journey and the resulting syntax.  Meanwhile I still have around half of the course materials to convert and update.  When I have finished using survey data from the 1970s and 1980s, I can begin to think about more recent material from the BSA, the ESS and ONS well-being surveys as well as the GSS.

 

What would be interesting would be to see what beginning students and researchers actually do (keystrokes, mouse movements and viewer output) and how long it takes them, when they use SPSS to perform a set of standard exercises.  We did something like this in the 1970s when we got ULCC to pin a questionnaire to all SPSS output in which errors had occurred.  This was to check whether SPSS had accurately identified the source of any errors, and what the actual error was.  I don’t have a copy of the report, but there was a short article in the ULCC Newsletter by Cathie Marsh and John Utting which might be interesting to compare with today’s much improved and less confusing, mostly user-friendly error messages.

 

Finally, perhaps you should actually have a look at some of my tutorials, starting with page:

 

http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html and then by having a look at http://surveyresearch.weebly.com/old-dog-old-tricks.html  The first slideshow is quite fun and not covered in the main presentation.  I’d appreciate your comments and suggestions.

 

All my materials are available for free download.  Also I’m working on my own with no institutional affiliation or support, and on a fractional pension.  Some of my closest professional colleagues have recently passed away: I hope that, before my own time comes, my site can help share with others something of the knowledge and skills I have acquired, and of the thrills I have enjoyed, as a survey researcher since 1965.

 

Incidentally, although I’ve been using SPSS since 1972, on dozens if not hundreds of data sets, I’ve never written any code except for a suite of survey analysis programs in Algol in the 1960’s (input and output on 8-hole paper tape).

 

Meanwhile, I have a large garden to prepare for planting, a building extension to finish and a backlog of 400+ films recorded from (UK) TV to catch  up on.  Who said retirement was boring?

 

Cheers

 

John Hall

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

PS 

 

 

 

From: Poes, Matthew Joseph [hidden email]
Sent: 16 March 2012 14:39
To: 'John F Hall'; '[hidden email]'
Subject: RE: In support of CTABLES

 

John,

                I agree with you that new students need to learn how to code logic into SPSS.  It’s important to understand what these programs are doing.  As long as students understand that in the real world, if using SPSS, they will likely use a canned module within the program to do these same functions, then learning the logic that underlies it is fine (just as learning to hand write a regression and solve).

 

                However, I know you have considerably more experience with both SPSS and coding than I do, but I learned MRSETs in a matter of 30 minutes or so, and had a working understanding of CTables in probably the same time.  I’ve only been working with the two actively for about 2 years now, but find them supremely easy to use.  While I frequently make my CTables through the interface, instead of syntax, I can write my CTables via syntax without issue (it’s just much quicker to let SPSS do it for me).  In terms of MRsets, I always write this in syntax, and it doesn’t take me long at all. 

               

                If nothing else, its very easy to make mistakes in long and complicated code, but the code for CTables and MRsets is not long and complicated unless your needs are long and complicated.  Debugging this is a non-issue.  I really don’t understand why it took you so long to learn, why you are so resistant to them, and why you continue to post these disparaging remarks.  I happen to love Ctables and MRsets in SPSS because I find they have made my life much easier.  I was honestly shocked to find someone disagree with that.  Maybe the issue is that we are each used to different things, and as a result what I am finding “time saving” you are finding “complicated.”

 

                I would be surprised if, in time, you didn’t find Ctables to be a giant improvement over the old tables system, in terms of flexibility.  While memorizing all of the possible code is daunting (I certainly have not myself) I find it easy to figure out. 

 

Matthew J Poes

Research Data Specialist

Center for Prevention Research and Development

University of Illinois

510 Devonshire Dr.

Champaign, IL 61820

Phone: 217-265-4576

email: [hidden email]

 

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of John F Hall
Sent: Friday, March 16, 2012 12:27 AM
To: [hidden email]
Subject: Re: In support of CTABLES

 

Jon

 

You made no mention of the MRSETS command.

 

It took me well over an hour to sort this out, and I know my way round SPSS reasonably well.  Beginning students would clearly take much longer or give up altogether.  To prepare a new tutorial for such students would take an unconscionably long time.  

 

Much of my time was spent wading throught the CSR where nothing in CTABLES explaining MRSETS and it doesn’t refer you to the separate MRSETS command.  I discovered this by trying to run Analyze >  Mult Response > Define … before being pointed to Data >  Define MR sets. (it didn’t help that Mult Resp is buried at the bottom of the Analyze list.)  I used PASTE from Data > Define MR sets to see the syntax generated.

 

MRSETS

  /MCGROUP NAME=$prej VARIABLES=v608 v610 v612

  /DISPLAY NAME=[$prej].

 

. .and ran your syntax substituting my own vars.

 

CTABLES /TABLE $prej BY v575.

 

 

 

Q.70e:    How [prejudiced] would you describe yourself?

Very prejudiced

A little prejudiced

Not prejudiced

Count

Count

Count

$prej

Asians

25

148

0

Blacks

15

66

0

Coloureds

12

41

0

Pakistanis

24

105

0

Indians

9

42

0

Sikhs

1

3

0

West Indians

14

84

0

Africans

4

24

0

Other specified

8

36

0

Against all races

44

529

0

 

This proves the late Professor Sir Roger Jowell’s contention that, “The verb to be prejudiced has no first person singular!”  This was actually because V575 was a filter question and the question about groups prejudiced against was not asked of people who claimed not to be prejudiced.  In cases like this it is sometimes useful to display the data in descending order of frequencies: can that be done in MR?

 

Being curious I then went into CTables to see what syntax was generated  (Nice surprise to see mock-up tables to indicate what the output would contain!) . . to get the same table, but the generated syntax would, like the spider, have frightened Miss Muffitt and my students away. 

 

CTABLES

  /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT

  /TABLE $prej [COUNT F40.0] BY v575

  /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE.

 

Anyway, thanks for the tip about shortened syntax for CTABLES.  Some of the possibilities in the CSR seem promising.  I’ll play around with the format and contents to see if I can produce the kind of tables I used to recommend to students, but which couldn’t be produced by SPSS.  These would include tables with row % and a single base N on the same row (ie not two rows as in crosstabs) and tables to illustrate Lazarsfeldian elaboration as per Rosenberg.

 

John (with an h) Hall

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

 

 

 

 

 

 

From: SPSSX(r) Discussion [hidden email] On Behalf Of Jon K Peck
Sent: 15 March 2012 21:43
To: [hidden email]
Subject: Re: In support of CTABLES

 

CTABLES has elaborate, although logical, syntax for complicated things.  For simple things, it's as simple as it gets:
CTABLES /TABLE x BY y.

And for an MR set,
CTABLES /TABLE $x BY y.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Poes, Matthew Joseph-2
In reply to this post by John F Hall

In case this is of use to others.  I’ve experienced occasional resistance to the idea of using the drop down interface, as opposed to code.  Saving everything you do in code is, of course, always important.  However, with Ctables, I often need to show large groups of variables (such as the component variables of a scale), and typing this out (as many as 3 separate times) can become tedious.  I often use the drop down menu to create the table, then paste out the syntax to save myself time. 

 

Matthew J Poes

Research Data Specialist

Center for Prevention Research and Development

University of Illinois

510 Devonshire Dr.

Champaign, IL 61820

Phone: 217-265-4576

email: [hidden email]

 

 

From: John F Hall [mailto:[hidden email]]
Sent: Friday, March 16, 2012 10:47 AM
To: Poes, Matthew Joseph; [hidden email]
Cc: 'Bruce Weaver'
Subject: RE: In support of CTABLES

 

Matthew

 

I think you may have missed a later exchange with Jon which may address your concerns.

 

I totally agree with you, but I always put myself in the place of a naïve user seeing something for the first time.  At 4 o’clock this morning I was possibly a little slower than usual but the route I took with the GUI was probably typical of student beginners in social and political sciences.

 

I’ve nothing against the GUI and I use it to save time when it’s quicker (which isn’t often for basic operations and analysis) but the CT syntax generated that way for MR was daunting to me, let alone the sort of students I used to teach.  If I’ve forgotten the exact syntax I open the CSR (and sometimes leave it open during SPSS sessions). 

 

The pedagogic approach adopted in my courses must have had some merit as many students still write in appreciation 20 or more years after I retired: seven of them are now full Professors in UK universities and many others occupy senior research positions.  However this may have more to do with being taught by practicing researchers than being exposed to SPSS syntax (GUI didn’t exist in those days).

 

I have continued this approach in updating and converting the courses for SPSS for Windows.  I do this because, whilst there are many survey methods courses around using SPSS as a basis, they tend to be oriented more to sampling error,  mathematical statistics and statistical modelling than to the actual substance of the research and the logic and process of addressing substantive research questions using data from questionnaire surveys.  As John Tukey once said, “All the statistics in the world won’t save you if you asked the wrong question in the first place.”  And as my old boss Mark Abrams used to say, “If it’s worth saying, it’s worth saying in percentages.” However I suspect he would have been just as happy, if not more, with the graphics now available.

 

If I can fit CT into this approach I certainly will, but it will take many steps and many screenshots to explain the journey and the resulting syntax.  Meanwhile I still have around half of the course materials to convert and update.  When I have finished using survey data from the 1970s and 1980s, I can begin to think about more recent material from the BSA, the ESS and ONS well-being surveys as well as the GSS.

 

What would be interesting would be to see what beginning students and researchers actually do (keystrokes, mouse movements and viewer output) and how long it takes them, when they use SPSS to perform a set of standard exercises.  We did something like this in the 1970s when we got ULCC to pin a questionnaire to all SPSS output in which errors had occurred.  This was to check whether SPSS had accurately identified the source of any errors, and what the actual error was.  I don’t have a copy of the report, but there was a short article in the ULCC Newsletter by Cathie Marsh and John Utting which might be interesting to compare with today’s much improved and less confusing, mostly user-friendly error messages.

 

Finally, perhaps you should actually have a look at some of my tutorials, starting with page:

 

http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html and then by having a look at http://surveyresearch.weebly.com/old-dog-old-tricks.html  The first slideshow is quite fun and not covered in the main presentation.  I’d appreciate your comments and suggestions.

 

All my materials are available for free download.  Also I’m working on my own with no institutional affiliation or support, and on a fractional pension.  Some of my closest professional colleagues have recently passed away: I hope that, before my own time comes, my site can help share with others something of the knowledge and skills I have acquired, and of the thrills I have enjoyed, as a survey researcher since 1965.

 

Incidentally, although I’ve been using SPSS since 1972, on dozens if not hundreds of data sets, I’ve never written any code except for a suite of survey analysis programs in Algol in the 1960’s (input and output on 8-hole paper tape).

 

Meanwhile, I have a large garden to prepare for planting, a building extension to finish and a backlog of 400+ films recorded from (UK) TV to catch  up on.  Who said retirement was boring?

 

Cheers

 

John Hall

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

PS 

 

 

 

From: Poes, Matthew Joseph [hidden email]
Sent: 16 March 2012 14:39
To: 'John F Hall'; '[hidden email]'
Subject: RE: In support of CTABLES

 

John,

                I agree with you that new students need to learn how to code logic into SPSS.  It’s important to understand what these programs are doing.  As long as students understand that in the real world, if using SPSS, they will likely use a canned module within the program to do these same functions, then learning the logic that underlies it is fine (just as learning to hand write a regression and solve).

 

                However, I know you have considerably more experience with both SPSS and coding than I do, but I learned MRSETs in a matter of 30 minutes or so, and had a working understanding of CTables in probably the same time.  I’ve only been working with the two actively for about 2 years now, but find them supremely easy to use.  While I frequently make my CTables through the interface, instead of syntax, I can write my CTables via syntax without issue (it’s just much quicker to let SPSS do it for me).  In terms of MRsets, I always write this in syntax, and it doesn’t take me long at all. 

               

                If nothing else, its very easy to make mistakes in long and complicated code, but the code for CTables and MRsets is not long and complicated unless your needs are long and complicated.  Debugging this is a non-issue.  I really don’t understand why it took you so long to learn, why you are so resistant to them, and why you continue to post these disparaging remarks.  I happen to love Ctables and MRsets in SPSS because I find they have made my life much easier.  I was honestly shocked to find someone disagree with that.  Maybe the issue is that we are each used to different things, and as a result what I am finding “time saving” you are finding “complicated.”

 

                I would be surprised if, in time, you didn’t find Ctables to be a giant improvement over the old tables system, in terms of flexibility.  While memorizing all of the possible code is daunting (I certainly have not myself) I find it easy to figure out. 

 

Matthew J Poes

Research Data Specialist

Center for Prevention Research and Development

University of Illinois

510 Devonshire Dr.

Champaign, IL 61820

Phone: 217-265-4576

email: [hidden email]

 

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of John F Hall
Sent: Friday, March 16, 2012 12:27 AM
To: [hidden email]
Subject: Re: In support of CTABLES

 

Jon

 

You made no mention of the MRSETS command.

 

It took me well over an hour to sort this out, and I know my way round SPSS reasonably well.  Beginning students would clearly take much longer or give up altogether.  To prepare a new tutorial for such students would take an unconscionably long time.  

 

Much of my time was spent wading throught the CSR where nothing in CTABLES explaining MRSETS and it doesn’t refer you to the separate MRSETS command.  I discovered this by trying to run Analyze >  Mult Response > Define … before being pointed to Data >  Define MR sets. (it didn’t help that Mult Resp is buried at the bottom of the Analyze list.)  I used PASTE from Data > Define MR sets to see the syntax generated.

 

MRSETS

  /MCGROUP NAME=$prej VARIABLES=v608 v610 v612

  /DISPLAY NAME=[$prej].

 

. .and ran your syntax substituting my own vars.

 

CTABLES /TABLE $prej BY v575.

 

 

 

Q.70e:    How [prejudiced] would you describe yourself?

Very prejudiced

A little prejudiced

Not prejudiced

Count

Count

Count

$prej

Asians

25

148

0

Blacks

15

66

0

Coloureds

12

41

0

Pakistanis

24

105

0

Indians

9

42

0

Sikhs

1

3

0

West Indians

14

84

0

Africans

4

24

0

Other specified

8

36

0

Against all races

44

529

0

 

This proves the late Professor Sir Roger Jowell’s contention that, “The verb to be prejudiced has no first person singular!”  This was actually because V575 was a filter question and the question about groups prejudiced against was not asked of people who claimed not to be prejudiced.  In cases like this it is sometimes useful to display the data in descending order of frequencies: can that be done in MR?

 

Being curious I then went into CTables to see what syntax was generated  (Nice surprise to see mock-up tables to indicate what the output would contain!) . . to get the same table, but the generated syntax would, like the spider, have frightened Miss Muffitt and my students away. 

 

CTABLES

  /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT

  /TABLE $prej [COUNT F40.0] BY v575

  /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE.

 

Anyway, thanks for the tip about shortened syntax for CTABLES.  Some of the possibilities in the CSR seem promising.  I’ll play around with the format and contents to see if I can produce the kind of tables I used to recommend to students, but which couldn’t be produced by SPSS.  These would include tables with row % and a single base N on the same row (ie not two rows as in crosstabs) and tables to illustrate Lazarsfeldian elaboration as per Rosenberg.

 

John (with an h) Hall

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

 

 

 

 

 

 

From: SPSSX(r) Discussion [hidden email] On Behalf Of Jon K Peck
Sent: 15 March 2012 21:43
To: [hidden email]
Subject: Re: In support of CTABLES

 

CTABLES has elaborate, although logical, syntax for complicated things.  For simple things, it's as simple as it gets:
CTABLES /TABLE x BY y.

And for an MR set,
CTABLES /TABLE $x BY y.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Jon K Peck
One of the less well-known features of CTABLES syntax is that you can factor out the statistics list when it is the same for a batch of variables.  The gui does not do this, leading people to think you have to write out the statistics for each variable.

For example, the gui might generate this TABLE subcommand with two variables in the rows:
 /TABLE jobcat [C][COUNT F40.0, ROWPCT.COUNT PCT40.1] + educ [C][COUNT F40.0, ROWPCT.COUNT
    PCT40.1] BY gender [C]
but it can be simplified like this:
 /TABLE (jobcat [C] + educ [C])[COUNT F40.0, ROWPCT.COUNT PCT40.1] BY gender [C]

Further, if the measurement levels are set correctly and you use default formats, it can be further simplified to
 /TABLE (jobcat + educ)[COUNT ROWPCT.COUNT] BY gender

Regards,
Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        "Poes, Matthew Joseph" <[hidden email]>
To:        [hidden email]
Date:        03/16/2012 11:03 AM
Subject:        Re: [SPSSX-L] In support of CTABLES
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




In case this is of use to others.  I’ve experienced occasional resistance to the idea of using the drop down interface, as opposed to code.  Saving everything you do in code is, of course, always important.  However, with Ctables, I often need to show large groups of variables (such as the component variables of a scale), and typing this out (as many as 3 separate times) can become tedious.  I often use the drop down menu to create the table, then paste out the syntax to save myself time.  
 
Matthew J Poes
Research Data Specialist
Center for Prevention Research and Development
University of Illinois
510 Devonshire Dr.
Champaign, IL 61820
Phone: 217-265-4576
email: mpoes@...
 
 
From: John F Hall [mailto:johnfhall@...]
Sent:
Friday, March 16, 2012 10:47 AM
To:
Poes, Matthew Joseph; [hidden email]
Cc:
'Bruce Weaver'
Subject:
RE: In support of CTABLES

 
Matthew
 
I think you may have missed a later exchange with Jon which may address your concerns.
 
I totally agree with you, but I always put myself in the place of a naïve user seeing something for the first time.  At 4 o’clock this morning I was possibly a little slower than usual but the route I took with the GUI was probably typical of student beginners in social and political sciences.
 
I’ve nothing against the GUI and I use it to save time when it’s quicker (which isn’t often for basic operations and analysis) but the CT syntax generated that way for MR was daunting to me, let alone the sort of students I used to teach.  If I’ve forgotten the exact syntax I open the CSR (and sometimes leave it open during SPSS sessions).  
 
The pedagogic approach adopted in my courses must have had some merit as many students still write in appreciation 20 or more years after I retired: seven of them are now full Professors in UK universities and many others occupy senior research positions.  However this may have more to do with being taught by practicing researchers than being exposed to SPSS syntax (GUI didn’t exist in those days).
 
I have continued this approach in updating and converting the courses for SPSS for Windows.  I do this because, whilst there are many survey methods courses around using SPSS as a basis, they tend to be oriented more to sampling error,  mathematical statistics and statistical modelling than to the actual substance of the research and the logic and process of addressing substantive research questions using data from questionnaire surveys.  As John Tukey once said, “All the statistics in the world won’t save you if you asked the wrong question in the first place.”  And as my old boss Mark Abrams used to say, “If it’s worth saying, it’s worth saying in percentages.” However I suspect he would have been just as happy, if not more, with the graphics now available.
 
If I can fit CT into this approach I certainly will, but it will take many steps and many screenshots to explain the journey and the resulting syntax.  Meanwhile I still have around half of the course materials to convert and update.  When I have finished using survey data from the 1970s and 1980s, I can begin to think about more recent material from the BSA, the ESS and ONS well-being surveys as well as the GSS.
 
What would be interesting would be to see what beginning students and researchers actually do (keystrokes, mouse movements and viewer output) and how long it takes them, when they use SPSS to perform a set of standard exercises.  We did something like this in the 1970s when we got ULCC to pin a questionnaire to all SPSS output in which errors had occurred.  This was to check whether SPSS had accurately identified the source of any errors, and what the actual error was.  I don’t have a copy of the report, but there was a short article in the ULCC Newsletter by Cathie Marsh and John Utting which might be interesting to compare with today’s much improved and less confusing, mostly user-friendly error messages.
 
Finally, perhaps you should actually have a look at some of my tutorials, starting with page:
 
http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html and then by having a look at http://surveyresearch.weebly.com/old-dog-old-tricks.html  The first slideshow is quite fun and not covered in the main presentation.  I’d appreciate your comments and suggestions.
 
All my materials are available for free download.  Also I’m working on my own with no institutional affiliation or support, and on a fractional pension.  Some of my closest professional colleagues have recently passed away: I hope that, before my own time comes, my site can help share with others something of the knowledge and skills I have acquired, and of the thrills I have enjoyed, as a survey researcher since 1965.
 
Incidentally, although I’ve been using SPSS since 1972, on dozens if not hundreds of data sets, I’ve never written any code except for a suite of survey analysis programs in Algol in the 1960’s (input and output on 8-hole paper tape).
 
Meanwhile, I have a large garden to prepare for planting, a building extension to finish and a backlog of 400+ films recorded from (UK) TV to catch  up on.  Who said retirement was boring?
 
Cheers
 
John Hall
 
Email:     johnfhall@...
Website: www.surveyresearch.weebly.com
Skype:   surveyresearcher1
Phone:    (+33) (0) 2.33.45.91.47
 
PS  
 
 
 
From: Poes, Matthew Joseph [mailto:mpoes@...]
Sent:
16 March 2012 14:39
To:
'John F Hall'; '[hidden email]'
Subject:
RE: In support of CTABLES

 
John,
                I agree with you that new students need to learn how to code logic into SPSS.  It’s important to understand what these programs are doing.  As long as students understand that in the real world, if using SPSS, they will likely use a canned module within the program to do these same functions, then learning the logic that underlies it is fine (just as learning to hand write a regression and solve).
 
                However, I know you have considerably more experience with both SPSS and coding than I do, but I learned MRSETs in a matter of 30 minutes or so, and had a working understanding of CTables in probably the same time.  I’ve only been working with the two actively for about 2 years now, but find them supremely easy to use.  While I frequently make my CTables through the interface, instead of syntax, I can write my CTables via syntax without issue (it’s just much quicker to let SPSS do it for me).  In terms of MRsets, I always write this in syntax, and it doesn’t take me long at all.  
               
                If nothing else, its very easy to make mistakes in long and complicated code, but the code for CTables and MRsets is not long and complicated unless your needs are long and complicated.  Debugging this is a non-issue.  I really don’t understand why it took you so long to learn, why you are so resistant to them, and why you continue to post these disparaging remarks.  I happen to love Ctables and MRsets in SPSS because I find they have made my life much easier.  I was honestly shocked to find someone disagree with that.  Maybe the issue is that we are each used to different things, and as a result what I am finding “time saving” you are finding “complicated.”
 
                I would be surprised if, in time, you didn’t find Ctables to be a giant improvement over the old tables system, in terms of flexibility.  While memorizing all of the possible code is daunting (I certainly have not myself) I find it easy to figure out.  
 
Matthew J Poes
Research Data Specialist
Center for Prevention Research and Development
University of Illinois
510 Devonshire Dr.
Champaign, IL 61820
Phone: 217-265-4576
email: mpoes@...
 
 
From: SPSSX(r) Discussion [[hidden email]] On Behalf Of John F Hall
Sent:
Friday, March 16, 2012 12:27 AM
To:
[hidden email]
Subject:
Re: In support of CTABLES

 
Jon
 
You made no mention of the MRSETS command.
 
It took me well over an hour to sort this out, and I know my way round SPSS reasonably well.  Beginning students would clearly take much longer or give up altogether.  To prepare a new tutorial for such students would take an unconscionably long time.  
 
Much of my time was spent wading throught the CSR where nothing in CTABLES explaining MRSETS and it doesn’t refer you to the separate MRSETS command.  I discovered this by trying to run Analyze >  Mult Response > Define … before being pointed to Data >  Define MR sets. (it didn’t help that Mult Resp is buried at the bottom of the Analyze list.)  I used PASTE from Data > Define MR sets to see the syntax generated.
 
MRSETS
  /MCGROUP NAME=$prej VARIABLES=v608 v610 v612
  /DISPLAY NAME=[$prej].
 
. .and ran your syntax substituting my own vars.
 
CTABLES /TABLE $prej BY v575.
 
 

 
Q.70e:    How [prejudiced] would you describe yourself?
Very prejudiced
A little prejudiced
Not prejudiced
Count
Count
Count
$prej Asians
25
148
0
Blacks
15
66
0
Coloureds
12
41
0
Pakistanis
24
105
0
Indians
9
42
0
Sikhs
1
3
0
West Indians
14
84
0
Africans
4
24
0
Other specified
8
36
0
Against all races
44
529
0

 
This proves the late Professor Sir Roger Jowell’s contention that, “The verb to be prejudiced has no first person singular!”  This was actually because V575 was a filter question and the question about groups prejudiced against was not asked of people who claimed not to be prejudiced.  In cases like this it is sometimes useful to display the data in descending order of frequencies: can that be done in MR?
 
Being curious I then went into CTables to see what syntax was generated  (Nice surprise to see mock-up tables to indicate what the output would contain!) . . to get the same table, but the generated syntax would, like the spider, have frightened Miss Muffitt and my students away.  
 
CTABLES
  /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT
  /TABLE $prej [COUNT F40.0] BY v575
  /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE.
 
Anyway, thanks for the tip about shortened syntax for CTABLES.  Some of the possibilities in the CSR seem promising.  I’ll play around with the format and contents to see if I can produce the kind of tables I used to recommend to students, but which couldn’t be produced by SPSS.  These would include tables with row % and a single base N on the same row (ie not two rows as in crosstabs) and tables to illustrate Lazarsfeldian elaboration as per Rosenberg.
 
John (with an h) Hall
 
Email:     johnfhall@...
Website: www.surveyresearch.weebly.com
Skype:   surveyresearcher1
Phone:    (+33) (0) 2.33.45.91.47
 
 
 
 
 
 
 
From: SPSSX(r) Discussion [hidden email] On Behalf Of Jon K Peck
Sent:
15 March 2012 21:43
To:
[hidden email]
Subject:
Re: In support of CTABLES

 
CTABLES has elaborate, although logical, syntax for complicated things.  For simple things, it's as simple as it gets:
CTABLES /TABLE x BY y.


And for an MR set,

CTABLES /TABLE $x BY y.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM

peck@...
new phone: 720-342-5621

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Poes, Matthew Joseph-2

Thanks Jon,

                I was actually aware of that ability (though stumbled upon it by accident).  I often need to include a measurement level ([C]) since a lot of my data will get used in multiple ways, and I use that syntax to adjust how I report it.  For me, the increased speed through the GUI actually comes from the variables themselves.  It’s just easier to grab a group of variables and drag it onto the table, rather than to type out each one.  Not everyone is nice to me with short easy variable names. 

 

Matthew J Poes

Research Data Specialist

Center for Prevention Research and Development

University of Illinois

510 Devonshire Dr.

Champaign, IL 61820

Phone: 217-265-4576

email: [hidden email]

 

 

From: Jon K Peck [mailto:[hidden email]]
Sent: Friday, March 16, 2012 3:31 PM
To: Poes, Matthew Joseph; [hidden email]
Subject: Re: [SPSSX-L] In support of CTABLES

 

One of the less well-known features of CTABLES syntax is that you can factor out the statistics list when it is the same for a batch of variables.  The gui does not do this, leading people to think you have to write out the statistics for each variable.

For example, the gui might generate this TABLE subcommand with two variables in the rows:
 /TABLE jobcat [C][COUNT F40.0, ROWPCT.COUNT PCT40.1] + educ [C][COUNT F40.0, ROWPCT.COUNT
    PCT40.1] BY gender [C]
but it can be simplified like this:
 /TABLE (jobcat [C] + educ [C])[COUNT F40.0, ROWPCT.COUNT PCT40.1] BY gender [C]

Further, if the measurement levels are set correctly and you use default formats, it can be further simplified to
 /TABLE (jobcat + educ)[COUNT ROWPCT.COUNT] BY gender

Regards,
Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        "Poes, Matthew Joseph" <[hidden email]>
To:        [hidden email]
Date:        03/16/2012 11:03 AM
Subject:        Re: [SPSSX-L] In support of CTABLES
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





In case this is of use to others.  I’ve experienced occasional resistance to the idea of using the drop down interface, as opposed to code.  Saving everything you do in code is, of course, always important.  However, with Ctables, I often need to show large groups of variables (such as the component variables of a scale), and typing this out (as many as 3 separate times) can become tedious.  I often use the drop down menu to create the table, then paste out the syntax to save myself time.  
 
Matthew J Poes
Research Data Specialist
Center for Prevention Research and Development
University of Illinois
510 Devonshire Dr.
Champaign, IL 61820
Phone: 217-265-4576
email: [hidden email]
 
 
From: John F Hall [[hidden email]]
Sent:
Friday, March 16, 2012 10:47 AM
To:
Poes, Matthew Joseph; [hidden email]
Cc:
'Bruce Weaver'
Subject:
RE: In support of CTABLES

 
Matthew
 
I think you may have missed a later exchange with Jon which may address your concerns.
 
I totally agree with you, but I always put myself in the place of a naïve user seeing something for the first time.  At 4 o’clock this morning I was possibly a little slower than usual but the route I took with the GUI was probably typical of student beginners in social and political sciences.
 
I’ve nothing against the GUI and I use it to save time when it’s quicker (which isn’t often for basic operations and analysis) but the CT syntax generated that way for MR was daunting to me, let alone the sort of students I used to teach.  If I’ve forgotten the exact syntax I open the CSR (and sometimes leave it open during SPSS sessions).  
 
The pedagogic approach adopted in my courses must have had some merit as many students still write in appreciation 20 or more years after I retired: seven of them are now full Professors in UK universities and many others occupy senior research positions.  However this may have more to do with being taught by practicing researchers than being exposed to SPSS syntax (GUI didn’t exist in those days).
 
I have continued this approach in updating and converting the courses for SPSS for Windows.  I do this because, whilst there are many survey methods courses around using SPSS as a basis, they tend to be oriented more to sampling error,  mathematical statistics and statistical modelling than to the actual substance of the research and the logic and process of addressing substantive research questions using data from questionnaire surveys.  As John Tukey once said, “All the statistics in the world won’t save you if you asked the wrong question in the first place.”  And as my old boss Mark Abrams used to say, “If it’s worth saying, it’s worth saying in percentages.” However I suspect he would have been just as happy, if not more, with the graphics now available.
 
If I can fit CT into this approach I certainly will, but it will take many steps and many screenshots to explain the journey and the resulting syntax.  Meanwhile I still have around half of the course materials to convert and update.  When I have finished using survey data from the 1970s and 1980s, I can begin to think about more recent material from the BSA, the ESS and ONS well-being surveys as well as the GSS.
 
What would be interesting would be to see what beginning students and researchers actually do (keystrokes, mouse movements and viewer output) and how long it takes them, when they use SPSS to perform a set of standard exercises.  We did something like this in the 1970s when we got ULCC to pin a questionnaire to all SPSS output in which errors had occurred.  This was to check whether SPSS had accurately identified the source of any errors, and what the actual error was.  I don’t have a copy of the report, but there was a short article in the ULCC Newsletter by Cathie Marsh and John Utting which might be interesting to compare with today’s much improved and less confusing, mostly user-friendly error messages.
 
Finally, perhaps you should actually have a look at some of my tutorials, starting with page:
 
http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html and then by having a look at http://surveyresearch.weebly.com/old-dog-old-tricks.html  The first slideshow is quite fun and not covered in the main presentation.  I’d appreciate your comments and suggestions.
 
All my materials are available for free download.  Also I’m working on my own with no institutional affiliation or support, and on a fractional pension.  Some of my closest professional colleagues have recently passed away: I hope that, before my own time comes, my site can help share with others something of the knowledge and skills I have acquired, and of the thrills I have enjoyed, as a survey researcher since 1965.
 
Incidentally, although I’ve been using SPSS since 1972, on dozens if not hundreds of data sets, I’ve never written any code except for a suite of survey analysis programs in Algol in the 1960’s (input and output on 8-hole paper tape).
 
Meanwhile, I have a large garden to prepare for planting, a building extension to finish and a backlog of 400+ films recorded from (UK) TV to catch  up on.  Who said retirement was boring?
 
Cheers
 
John Hall
 
Email:     [hidden email]
Website: www.surveyresearch.weebly.com
Skype:   surveyresearcher1
Phone:    (+33) (0) 2.33.45.91.47
 
PS  
 
 
 
From: Poes, Matthew Joseph [hidden email]
Sent:
16 March 2012 14:39
To:
'John F Hall'; '[hidden email]'
Subject:
RE: In support of CTABLES

 
John,
                I agree with you that new students need to learn how to code logic into SPSS.  It’s important to understand what these programs are doing.  As long as students understand that in the real world, if using SPSS, they will likely use a canned module within the program to do these same functions, then learning the logic that underlies it is fine (just as learning to hand write a regression and solve).
 
                However, I know you have considerably more experience with both SPSS and coding than I do, but I learned MRSETs in a matter of 30 minutes or so, and had a working understanding of CTables in probably the same time.  I’ve only been working with the two actively for about 2 years now, but find them supremely easy to use.  While I frequently make my CTables through the interface, instead of syntax, I can write my CTables via syntax without issue (it’s just much quicker to let SPSS do it for me).  In terms of MRsets, I always write this in syntax, and it doesn’t take me long at all.  
               
                If nothing else, its very easy to make mistakes in long and complicated code, but the code for CTables and MRsets is not long and complicated unless your needs are long and complicated.  Debugging this is a non-issue.  I really don’t understand why it took you so long to learn, why you are so resistant to them, and why you continue to post these disparaging remarks.  I happen to love Ctables and MRsets in SPSS because I find they have made my life much easier.  I was honestly shocked to find someone disagree with that.  Maybe the issue is that we are each used to different things, and as a result what I am finding “time saving” you are finding “complicated.”
 
                I would be surprised if, in time, you didn’t find Ctables to be a giant improvement over the old tables system, in terms of flexibility.  While memorizing all of the possible code is daunting (I certainly have not myself) I find it easy to figure out.  
 
Matthew J Poes
Research Data Specialist
Center for Prevention Research and Development
University of Illinois
510 Devonshire Dr.
Champaign, IL 61820
Phone: 217-265-4576
email: [hidden email]
 
 
From: SPSSX(r) Discussion [[hidden email]] On Behalf Of John F Hall
Sent:
Friday, March 16, 2012 12:27 AM
To:
[hidden email]
Subject:
Re: In support of CTABLES
 
Jon
 
You made no mention of the MRSETS command.
 
It took me well over an hour to sort this out, and I know my way round SPSS reasonably well.  Beginning students would clearly take much longer or give up altogether.  To prepare a new tutorial for such students would take an unconscionably long time.  
 
Much of my time was spent wading throught the CSR where nothing in CTABLES explaining MRSETS and it doesn’t refer you to the separate MRSETS command.  I discovered this by trying to run Analyze >  Mult Response > Define … before being pointed to Data >  Define MR sets. (it didn’t help that Mult Resp is buried at the bottom of the Analyze list.)  I used PASTE from Data > Define MR sets to see the syntax generated.
 
MRSETS
  /MCGROUP NAME=$prej VARIABLES=v608 v610 v612
  /DISPLAY NAME=[$prej].
 
. .and ran your syntax substituting my own vars.
 
CTABLES /TABLE $prej BY v575.
 
 

 

Q.70e:    How [prejudiced] would you describe yourself?

Very prejudiced

A little prejudiced

Not prejudiced

Count

Count

Count

$prej

Asians

25

148

0

Blacks

15

66

0

Coloureds

12

41

0

Pakistanis

24

105

0

Indians

9

42

0

Sikhs

1

3

0

West Indians

14

84

0

Africans

4

24

0

Other specified

8

36

0

Against all races

44

529

0


 
This proves the late Professor Sir Roger Jowell’s contention that, “The verb to be prejudiced has no first person singular!”  This was actually because V575 was a filter question and the question about groups prejudiced against was not asked of people who claimed not to be prejudiced.  In cases like this it is sometimes useful to display the data in descending order of frequencies: can that be done in MR?
 
Being curious I then went into CTables to see what syntax was generated  (Nice surprise to see mock-up tables to indicate what the output would contain!) . . to get the same table, but the generated syntax would, like the spider, have frightened Miss Muffitt and my students away.  
 
CTABLES
  /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT
  /TABLE $prej [COUNT F40.0] BY v575
  /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE.
 
Anyway, thanks for the tip about shortened syntax for CTABLES.  Some of the possibilities in the CSR seem promising.  I’ll play around with the format and contents to see if I can produce the kind of tables I used to recommend to students, but which couldn’t be produced by SPSS.  These would include tables with row % and a single base N on the same row (ie not two rows as in crosstabs) and tables to illustrate Lazarsfeldian elaboration as per Rosenberg.
 
John (with an h) Hall
 
Email:     [hidden email]
Website: www.surveyresearch.weebly.com
Skype:   surveyresearcher1
Phone:    (+33) (0) 2.33.45.91.47
 
 
 
 
 
 
 
From: SPSSX(r) Discussion [hidden email] On Behalf Of Jon K Peck
Sent:
15 March 2012 21:43
To:
[hidden email]
Subject:
Re: In support of CTABLES
 
CTABLES has elaborate, although logical, syntax for complicated things.  For simple things, it's as simple as it gets:
CTABLES /TABLE x BY y.


And for an MR set,

CTABLES /TABLE $x BY y.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Art Kendall
it is a time-saving practice in the long run to be sure that meaning names and labels, level of measurement, separate missing value labels, etc are all completed in the data view before doing anything with the data.� I make it practice since about 1974 to have all of the team understand the labeling etc very early in a project.

Short names may reduce typing but longer names help keep the substantive meaning of variables in mind.

I find <utilities> <variables>
useful while drafting syntax.

Also I often edit the syntax produced by the GUI to reduce lists of variables. (Just cut out all but the first and last variable and insert "to".)
� This is related to my readability soapbox.


Reordering target variable lists

Variables appear on dialog box target lists in the order in which they are selected from the source list. If you want to change the order of variables on a target list—but you don't want to deselect all of the variables and reselect them in the new order—you can move variables up and down on the target list using the Ctrl key (Macintosh: Command key) with the up and down arrow keys. You can move multiple variables simultaneously if they are contiguous (grouped together). You cannot move noncontiguous groups of variables.


using MATCH FILES specifying only 1 file and putting "all" at the end of the list is another way of making life easier.

Even before there were PC's� one could always cut-and paste from other syntax.
Art Kendall Social Research Consultants

On 3/16/2012 4:41 PM, Poes, Matthew Joseph wrote:

Thanks Jon,

� � � � � � � � � � � � � � � I was actually aware of that ability (though stumbled upon it by accident).� I often need to include a measurement level ([C]) since a lot of my data will get used in multiple ways, and I use that syntax to adjust how I report it.� For me, the increased speed through the GUI actually comes from the variables themselves.� It’s just easier to grab a group of variables and drag it onto the table, rather than to type out each one.� Not everyone is nice to me with short easy variable names.�

Matthew J Poes

Research Data Specialist

Center for Prevention Research and Development

University of Illinois

510 Devonshire Dr.

Champaign, IL 61820

Phone:� 217-265-4576

email: [hidden email]

From: Jon K Peck [[hidden email]]
Sent: Friday, March 16, 2012 3:31 PM
To: Poes, Matthew Joseph; [hidden email]
Subject: Re: [SPSSX-L] In support of CTABLES

One of the less well-known features of CTABLES syntax is that you can factor out the statistics list when it is the same for a batch of variables. � The gui does not do this, leading people to think you have to write out the statistics for each variable.

For example, the gui might generate this TABLE subcommand with two variables in the rows:
� /TABLE jobcat [C][COUNT F40.0, ROWPCT.COUNT PCT40.1] + educ [C][COUNT F40.0, ROWPCT.COUNT
� � PCT40.1] BY gender [C]
but it can be simplified like this:
� /TABLE (jobcat [C] + educ [C])[COUNT F40.0, ROWPCT.COUNT PCT40.1] BY gender [C]

Further, if the measurement levels are set correctly and you use default formats, it can be further simplified to
� /TABLE (jobcat + educ)[COUNT ROWPCT.COUNT] BY gender

Regards,
Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From: � � � � "Poes, Matthew Joseph" <[hidden email]>
To: � � � � [hidden email]
Date: � � � � 03/16/2012 11:03 AM
Subject: � � � � Re: [SPSSX-L] In support of CTABLES
Sent by: � � � � "SPSSX(r) Discussion" <[hidden email]>





In case this is of use to others. � I’ve experienced occasional resistance to the idea of using the drop down interface, as opposed to code. � Saving everything you do in code is, of course, always important. � However, with Ctables, I often need to show large groups of variables (such as the component variables of a scale), and typing this out (as many as 3 separate times) can become tedious. � I often use the drop down menu to create the table, then paste out the syntax to save myself time. �

Matthew J Poes
Research Data Specialist
Center for Prevention Research and Development
University of Illinois
510 Devonshire Dr.
Champaign, IL 61820
Phone: 217-265-4576
email: [hidden email]


From: John F Hall [[hidden email]]
Sent:
Friday, March 16, 2012 10:47 AM
To:
Poes, Matthew Joseph; [hidden email]
Cc:
'Bruce Weaver'
Subject:
RE: In support of CTABLES


Matthew

I think you may have missed a later exchange with Jon which may address your concerns.

I totally agree with you, but I always put myself in the place of a naïve user seeing something for the first time. � At 4 o’clock this morning I was possibly a little slower than usual but the route I took with the GUI was probably typical of student beginners in social and political sciences.

I’ve nothing against the GUI and I use it to save time when it’s quicker (which isn’t often for basic operations and analysis) but the CT syntax generated that way for MR was daunting to me, let alone the sort of students I used to teach. � If I’ve forgotten the exact syntax I open the CSR (and sometimes leave it open during SPSS sessions). �

The pedagogic approach adopted in my courses must have had some merit as many students still write in appreciation 20 or more years after I retired: seven of them are now full Professors in UK universities and many others occupy senior research positions. � However this may have more to do with being taught by practicing researchers than being exposed to SPSS syntax (GUI didn’t exist in those days).

I have continued this approach in updating and converting the courses for SPSS for Windows. � I do this because, whilst there are many survey methods courses around using SPSS as a basis, they tend to be oriented more to sampling error, � mathematical statistics and statistical modelling than to the actual substance of the research and the logic and process of addressing substantive research questions using data from questionnaire surveys. � As John Tukey once said, “All the statistics in the world won’t save you if you asked the wrong question in the first place.” � And as my old boss Mark Abrams used to say, “If it’s worth saying, it’s worth saying in percentages.” However I suspect he would have been just as happy, if not more, with the graphics now available.

If I can fit CT into this approach I certainly will, but it will take many steps and many screenshots to explain the journey and the resulting syntax. � Meanwhile I still have around half of the course materials to convert and update. � When I have finished using survey data from the 1970s and 1980s, I can begin to think about more recent material from the BSA, the ESS and ONS well-being surveys as well as the GSS.

What would be interesting would be to see what beginning students and researchers actually do (keystrokes, mouse movements and viewer output) and how long it takes them, when they use SPSS to perform a set of standard exercises. � We did something like this in the 1970s when we got ULCC to pin a questionnaire to all SPSS output in which errors had occurred. � This was to check whether SPSS had accurately identified the source of any errors, and what the actual error was. � I don’t have a copy of the report, but there was a short article in the ULCC Newsletter by Cathie Marsh and John Utting which might be interesting to compare with today’s much improved and less confusing, mostly user-friendly error messages.

Finally, perhaps you should actually have a look at some of my tutorials, starting with page:

http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html and then by having a look at http://surveyresearch.weebly.com/old-dog-old-tricks.html � The first slideshow is quite fun and not covered in the main presentation. � I’d appreciate your comments and suggestions.

All my materials are available for free download. � Also I’m working on my own with no institutional affiliation or support, and on a fractional pension. � Some of my closest professional colleagues have recently passed away: I hope that, before my own time comes, my site can help share with others something of the knowledge and skills I have acquired, and of the thrills I have enjoyed, as a survey researcher since 1965.

Incidentally, although I’ve been using SPSS since 1972, on dozens if not hundreds of data sets, I’ve never written any code except for a suite of survey analysis programs in Algol in the 1960’s (input and output on 8-hole paper tape).

Meanwhile, I have a large garden to prepare for planting, a building extension to finish and a backlog of 400+ films recorded from (UK) TV to catch � up on. � Who said retirement was boring?

Cheers

John Hall

Email: � � [hidden email]
Website: www.surveyresearch.weebly.com
Skype: � surveyresearcher1
Phone: � � (+33) (0) 2.33.45.91.47

PS �



From: Poes, Matthew Joseph [hidden email]
Sent:
16 March 2012 14:39
To:
'John F Hall'; '[hidden email]'
Subject:
RE: In support of CTABLES


John,
� � � � � � � � I agree with you that new students need to learn how to code logic into SPSS. � It’s important to understand what these programs are doing. � As long as students understand that in the real world, if using SPSS, they will likely use a canned module within the program to do these same functions, then learning the logic that underlies it is fine (just as learning to hand write a regression and solve).

� � � � � � � � However, I know you have considerably more experience with both SPSS and coding than I do, but I learned MRSETs in a matter of 30 minutes or so, and had a working understanding of CTables in probably the same time. � I’ve only been working with the two actively for about 2 years now, but find them supremely easy to use. � While I frequently make my CTables through the interface, instead of syntax, I can write my CTables via syntax without issue (it’s just much quicker to let SPSS do it for me). � In terms of MRsets, I always write this in syntax, and it doesn’t take me long at all. �
� � � � � � � �
� � � � � � � � If nothing else, its very easy to make mistakes in long and complicated code, but the code for CTables and MRsets is not long and complicated unless your needs are long and complicated. � Debugging this is a non-issue. � I really don’t understand why it took you so long to learn, why you are so resistant to them, and why you continue to post these disparaging remarks. � I happen to love Ctables and MRsets in SPSS because I find they have made my life much easier. � I was honestly shocked to find someone disagree with that. � Maybe the issue is that we are each used to different things, and as a result what I am finding “time saving” you are finding “complicated.”

� � � � � � � � I would be surprised if, in time, you didn’t find Ctables to be a giant improvement over the old tables system, in terms of flexibility. � While memorizing all of the possible code is daunting (I certainly have not myself) I find it easy to figure out. �

Matthew J Poes
Research Data Specialist
Center for Prevention Research and Development
University of Illinois
510 Devonshire Dr.
Champaign, IL 61820
Phone: 217-265-4576
email: [hidden email]


From: SPSSX(r) Discussion [[hidden email]] On Behalf Of John F Hall
Sent:
Friday, March 16, 2012 12:27 AM
To:
[hidden email]
Subject:
Re: In support of CTABLES

Jon

You made no mention of the MRSETS command.

It took me well over an hour to sort this out, and I know my way round SPSS reasonably well. � Beginning students would clearly take much longer or give up altogether. � To prepare a new tutorial for such students would take an unconscionably long time. �

Much of my time was spent wading throught the CSR where nothing in CTABLES explaining MRSETS and it doesn’t refer you to the separate MRSETS command. � I discovered this by trying to run Analyze > � Mult Response > Define … before being pointed to Data > � Define MR sets. (it didn’t help that Mult Resp is buried at the bottom of the Analyze list.) � I used PASTE from Data > Define MR sets to see the syntax generated.

MRSETS
� /MCGROUP NAME=$prej VARIABLES=v608 v610 v612
� /DISPLAY NAME=[$prej].

. .and ran your syntax substituting my own vars.

CTABLES /TABLE $prej BY v575.

Q.70e: � � How [prejudiced] would you describe yourself?

Very prejudiced

A little prejudiced

Not prejudiced

Count

Count

Count

$prej

Asians

25

148

0

Blacks

15

66

0

Coloureds

12

41

0

Pakistanis

24

105

0

Indians

9

42

0

Sikhs

1

3

0

West Indians

14

84

0

Africans

4

24

0

Other specified

8

36

0

Against all races

44

529

0



This proves the late Professor Sir Roger Jowell’s contention that, “The verb to be prejudiced has no first person singular!” � This was actually because V575 was a filter question and the question about groups prejudiced against was not asked of people who claimed not to be prejudiced. � In cases like this it is sometimes useful to display the data in descending order of frequencies: can that be done in MR?

Being curious I then went into CTables to see what syntax was generated � (Nice surprise to see mock-up tables to indicate what the output would contain!) . . to get the same table, but the generated syntax would, like the spider, have frightened Miss Muffitt and my students away. �

CTABLES
� /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT
� /TABLE $prej [COUNT F40.0] BY v575
� /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE EMPTY=INCLUDE MISSING=EXCLUDE.

Anyway, thanks for the tip about shortened syntax for CTABLES. � Some of the possibilities in the CSR seem promising. � I’ll play around with the format and contents to see if I can produce the kind of tables I used to recommend to students, but which couldn’t be produced by SPSS. � These would include tables with row % and a single base N on the same row (ie not two rows as in crosstabs) and tables to illustrate Lazarsfeldian elaboration as per Rosenberg.

John (with an h) Hall

Email: � � [hidden email]
Website: www.surveyresearch.weebly.com
Skype: � surveyresearcher1
Phone: � � (+33) (0) 2.33.45.91.47







From: SPSSX(r) Discussion [hidden email] On Behalf Of Jon K Peck
Sent:
15 March 2012 21:43
To:
[hidden email]
Subject:
Re: In support of CTABLES

CTABLES has elaborate, although logical, syntax for complicated things. � For simple things, it's as simple as it gets:
CTABLES /TABLE x BY y.


And for an MR set,

CTABLES /TABLE $x BY y.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621

===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

David Marso
Administrator
"Also I often edit the syntax produced by the GUI to reduce lists of variables. (Just cut out all but the first and last variable and insert "to".)
� This is related to my readability soapbox."

OTOH: With TABLES and CTABLES TO is *not* always an option.
You get things like:
Blah blah blah / TABLE = (A+B+C+D)>(E+F+G+H) BY blah blah blah.....
TO Just doesn't slice so well!
-------
Art Kendall wrote
it is a time-saving practice in the long run to be
      sure that meaning names and labels, level of measurement, separate
      missing value labels, etc are all completed in the data view
      before doing anything with the data.�  I make it practice since
      about 1974 to have all of the team understand the labeling etc
      very early in a project.
     
      Short names may reduce typing but longer names help keep the
      substantive meaning of variables in mind.
     
      I find <utilities> <variables> useful while
    drafting syntax.
   
    Also I often edit the syntax produced by the GUI to reduce lists of
    variables. (Just cut out all but the first and last variable and
    insert "to".)
    � This is related to my readability soapbox.
   
   
   
      Reordering
          target variable lists
      Variables appear on dialog box target lists in the
        order in which
        they are selected from the source list. If you want to change
        the
        order of variables on a target list—but you don't want to
        deselect
        all of the variables and reselect them in the new order—you
        can move variables up and down on the target list using the Ctrl
        key
        (Macintosh: Command key) with the up and down arrow keys. You
        can
        move multiple variables simultaneously if they are contiguous
        (grouped
        together). You cannot move noncontiguous groups of variables.
   
   
    using MATCH FILES specifying only 1 file and putting "all" at the
    end of the list is another way of making life easier.
   
    Even before there were PC's�  one could always cut-and paste from
    other syntax.
    Art Kendall
    Social Research Consultants
   
    On 3/16/2012 4:41 PM, Poes, Matthew Joseph wrote:
   
     
     
     
     
     
        Thanks
            Jon,
        � � � � � � � � � � � � � � �
            I was actually aware of that ability (though stumbled upon
            it by accident).�  I often need to include a measurement
            level ([C]) since a lot of my data will get used in multiple
            ways, and I use that syntax to adjust how I report it.�  For
            me, the increased speed through the GUI actually comes from
            the variables themselves.�  It’s just easier to grab a group
            of variables and drag it onto the table, rather than to type
            out each one.�  Not everyone is nice to me with short easy
            variable names.�
           
        �
        Matthew
              J Poes
        Research
            Data Specialist
        Center
            for Prevention Research and Development
        University
            of Illinois
        510
            Devonshire Dr.
        Champaign,
            IL 61820
        Phone:� 217-265-4576
        email:
            [hidden email] 
        �
        �
        From:
            Jon K Peck [ mailto:[hidden email] ]
           
            Sent: Friday, March 16, 2012 3:31 PM
            To: Poes, Matthew Joseph; [hidden email] 
            Subject: Re: [SPSSX-L] In support of CTABLES
        �
        One
            of the less well-known features of CTABLES syntax is that
            you can factor out the statistics list when it is the same
            for a batch of variables. � The gui does not do this, leading
            people to think you have to write out the statistics for
            each variable.
         
         
          For
            example, the gui might generate this TABLE subcommand with
            two variables in the rows:
         
          � /TABLE
            jobcat [C][COUNT F40.0, ROWPCT.COUNT PCT40.1] + educ
            [C][COUNT F40.0, ROWPCT.COUNT
         
          �
            �  PCT40.1] BY gender [C]
         
          but
            it can be simplified like this:
         
          � /TABLE
            (jobcat [C] + educ [C])[COUNT F40.0, ROWPCT.COUNT PCT40.1]
            BY gender [C]
         
         
          Further,
            if the measurement levels are set correctly and you use
            default formats, it can be further simplified to
         
          � /TABLE
            (jobcat + educ)[COUNT ROWPCT.COUNT] BY gender
         
         
          Regards,
            Jon Peck (no "h") aka Kim
            Senior Software Engineer, IBM
            [hidden email] 
            new phone: 720-342-5621
         
         
         
         
          From:
            �  �  �  � "Poes,
            Matthew Joseph" < [hidden email] >
         
          To:
            �  �  �  � [hidden email] 
         
          Date:
            �  �  �  � 03/16/2012
            11:03 AM
         
          Subject:
            �  �  �  � Re:
            [SPSSX-L] In support of CTABLES
         
          Sent
            by: �  �  �  � "SPSSX(r)
            Discussion" < [hidden email] >
         
       
         
       
       
         
         
          In
            case this is of use to others. � I’ve experienced occasional
            resistance to the idea of using the drop down interface, as
            opposed to code. � Saving everything you do in code is, of
            course, always important. � However, with Ctables, I often
            need to show large groups of variables (such as the
            component variables of a scale), and typing this out (as
            many as 3 separate times) can become tedious. � I often use
            the drop down menu to create the table, then paste out the
            syntax to save myself time. �  
          �
         
          Matthew
              J Poes
         
          Research
            Data Specialist
         
          Center
            for Prevention Research and Development
         
          University
            of Illinois
         
          510
            Devonshire Dr.
         
          Champaign,
            IL 61820
         
          Phone:
            217-265-4576
         
          email:
          [hidden email] 
         
          �
         
          �
         
          From:
            John F Hall [ mailto:[hidden email] ]
           
              Sent: Friday, March 16, 2012 10:47 AM
              To: Poes, Matthew Joseph; [hidden email] 
              Cc: 'Bruce Weaver'
              Subject: RE: In support of CTABLES
          �  
          Matthew
         
          �
         
          I
            think you may have missed a later exchange with Jon which
            may address your concerns.
         
          �
         
          I
            totally agree with you, but I always put myself in the place
            of a naïve user seeing something for the first time. � At 4
            o’clock this morning I was possibly a little slower than
            usual but the route I took with the GUI was probably typical
            of student beginners in social and political sciences.
         
          �
         
          I’ve
            nothing against the GUI and I use it to save time when it’s
            quicker (which isn’t often for basic operations and
            analysis) but the CT syntax generated that way for MR was
            daunting to me, let alone the sort of students I used to
            teach. � If I’ve forgotten the exact syntax I open the CSR
            (and sometimes leave it open during SPSS sessions). �
         
          �
         
          The
            pedagogic approach adopted in my courses must have had some
            merit as many students still write in appreciation 20 or
            more years after I retired: seven of them are now full
            Professors in UK universities and many others occupy senior
            research positions. � However this may have more to do with
            being taught by practicing researchers than being exposed to
            SPSS syntax (GUI didn’t exist in those days).
         
          �
         
          I
            have continued this approach in updating and converting the
            courses for SPSS for Windows. � I do this because, whilst
            there are many survey methods courses around using SPSS as a
            basis, they tend to be oriented more to sampling error,
            � mathematical statistics and statistical modelling than to
            the actual substance of the research and the logic and
            process of addressing substantive research questions using
            data from questionnaire surveys. � As John Tukey once said,
            “All the statistics in the world won’t save you if you asked
            the wrong question in the first place.” � And as my old boss
            Mark Abrams used to say, “If it’s worth saying, it’s worth
            saying in percentages.” However I suspect he would have been
            just as happy, if not more, with the graphics now available.
         
          �
         
          If
            I can fit CT into this approach I certainly will, but it
            will take many steps and many screenshots to explain the
            journey and the resulting syntax. � Meanwhile I still have
            around half of the course materials to convert and update.
            � When I have finished using survey data from the 1970s and
            1980s, I can begin to think about more recent material from
            the BSA, the ESS and ONS well-being surveys as well as the
            GSS.
         
          �
         
          What
            would be interesting would be to see what beginning students
            and researchers actually do (keystrokes, mouse movements and
            viewer output) and how long it takes them, when they use
            SPSS to perform a set of standard exercises. � We did
            something like this in the 1970s when we got ULCC to pin a
            questionnaire to all SPSS output in which errors had
            occurred. � This was to check whether SPSS had accurately
            identified the source of any errors, and what the actual
            error was. � I don’t have a copy of the report, but there was
            a short article in the ULCC Newsletter by Cathie Marsh and
            John Utting which might be interesting to compare with
            today’s much improved and less confusing, mostly
            user-friendly error messages.
          �
         
          Finally,
            perhaps you should actually have a look at some of my
            tutorials, starting with page:
         
          �
         
          http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html 
            and then by having a look at http://surveyresearch.weebly.com/old-dog-old-tricks.html 
            � The first slideshow is quite fun and not covered in the
            main presentation. � I’d appreciate your comments and
            suggestions.
         
          �
         
          All
            my materials are available for free download. � Also I’m
            working on my own with no institutional affiliation or
            support, and on a fractional pension. � Some of my closest
            professional colleagues have recently passed away: I hope
            that, before my own time comes, my site can help share with
            others something of the knowledge and skills I have
            acquired, and of the thrills I have enjoyed, as a survey
            researcher since 1965.
         
          �
         
          Incidentally,
            although I’ve been using SPSS since 1972, on dozens if not
            hundreds of data sets, I’ve never written any code except
            for a suite of survey analysis programs in Algol in the
            1960’s (input and output on 8-hole paper tape).
          �
         
          Meanwhile,
            I have a large garden to prepare for planting, a building
            extension to finish and a backlog of 400+ films recorded
            from (UK) TV to catch � up on. � Who said retirement was
            boring?
          �
         
          Cheers
         
          �
         
          John
            Hall
         
          �
         
          Email:
            �  �
          [hidden email] 
         
          Website:
          www.surveyresearch.weebly.com
         
          Skype:
            �  surveyresearcher1
         
          Phone:
            �  � (+33) (0) 2.33.45.91.47
         
          �
         
          PS
            �
         
          �
         
          �
         
          �
         
          From:
            Poes, Matthew Joseph
          [mailto:[hidden email]]
           
              Sent: 16 March 2012 14:39
              To: 'John F Hall'; ' [hidden email] '
              Subject: RE: In support of CTABLES
          �  
          John,
         
          �
            �  �  �  �  �  �  �  I agree with you that new students need to
            learn how to code logic into SPSS. � It’s important to
            understand what these programs are doing. � As long as
            students understand that in the real world, if using SPSS,
            they will likely use a canned module within the program to
            do these same functions, then learning the logic that
            underlies it is fine (just as learning to hand write a
            regression and solve).
         
          �
         
          �
            �  �  �  �  �  �  �  However, I know you have considerably more
            experience with both SPSS and coding than I do, but I
            learned MRSETs in a matter of 30 minutes or so, and had a
            working understanding of CTables in probably the same time.
            � I’ve only been working with the two actively for about 2
            years now, but find them supremely easy to use. � While I
            frequently make my CTables through the interface, instead of
            syntax, I can write my CTables via syntax without issue
            (it’s just much quicker to let SPSS do it for me). � In terms
            of MRsets, I always write this in syntax, and it doesn’t
            take me long at all. �
         
          �
            �  �  �  �  �  �  �
         
          �
            �  �  �  �  �  �  �  If nothing else, its very easy to make
            mistakes in long and complicated code, but the code for
            CTables and MRsets is not long and complicated unless your
            needs are long and complicated. � Debugging this is a
            non-issue. � I really don’t understand why it took you so
            long to learn, why you are so resistant to them, and why you
            continue to post these disparaging remarks. � I happen to
            love Ctables and MRsets in SPSS because I find they have
            made my life much easier. � I was honestly shocked to find
            someone disagree with that. � Maybe the issue is that we are
            each used to different things, and as a result what I am
            finding “time saving” you are finding “complicated.”
         
          �
         
          �
            �  �  �  �  �  �  �  I would be surprised if, in time, you didn’t
            find Ctables to be a giant improvement over the old tables
            system, in terms of flexibility. � While memorizing all of
            the possible code is daunting (I certainly have not myself)
            I find it easy to figure out. �
         
          �
         
          Matthew
              J Poes
         
          Research
            Data Specialist
         
          Center
            for Prevention Research and Development
         
          University
            of Illinois
         
          510
            Devonshire Dr.
         
          Champaign,
            IL 61820
         
          Phone:
            217-265-4576
         
          email:
          [hidden email] 
         
          �
         
          �
         
          From:
            SPSSX(r) Discussion [ mailto:[hidden email] ]
            On Behalf Of John F Hall
              Sent: Friday, March 16, 2012 12:27 AM
              To: [hidden email] 
              Subject:
            Re: In support of CTABLES
         
          �  
          Jon
         
          �
         
          You
            made no mention of the MRSETS command.
         
          �
         
          It
            took me well over an hour to sort this out, and I know my
            way round SPSS reasonably well. � Beginning students would
            clearly take much longer or give up altogether. � To prepare
            a new tutorial for such students would take an
            unconscionably long time. �
         
          �
         
          Much
            of my time was spent wading throught the CSR where nothing
            in CTABLES explaining MRSETS and it doesn’t refer you to the
            separate MRSETS command. � I discovered this by trying to run
            Analyze > � Mult Response > Define … before being
            pointed to Data > � Define MR sets. (it didn’t help that
            Mult Resp is buried at the bottom of the Analyze list.) � I
            used PASTE from Data > Define MR sets to see the syntax
            generated.
         
          �
         
          MRSETS
         
          �
            /MCGROUP NAME=$prej VARIABLES=v608 v610 v612
         
          �
            /DISPLAY NAME=[$prej].
         
          �
         
          .
            .and ran your syntax substituting my own vars.
         
          �
         
          CTABLES
            /TABLE $prej BY v575.
         
          �
         
          �  
       
         
           
             
                �
             
             
                Q.70e:
                    �  � How [prejudiced] would you describe yourself?
             
           
           
             
                Very
                    prejudiced
             
             
                A
                    little prejudiced
             
             
                Not
                    prejudiced
             
           
           
             
                Count
             
             
                Count
             
             
                Count
             
           
           
             
                $prej
                 
             
             
                Asians
                 
             
             
                25
             
             
                148
             
             
                0
             
           
           
             
                Blacks
                 
             
             
                15
             
             
                66
             
             
                0
             
           
           
             
                Coloureds
                 
             
             
                12
             
             
                41
             
             
                0
             
           
           
             
                Pakistanis
                 
             
             
                24
             
             
                105
             
             
                0
             
           
           
             
                Indians
                 
             
             
                9
             
             
                42
             
             
                0
             
           
           
             
                Sikhs
                 
             
             
                1
             
             
                3
             
             
                0
             
           
           
             
                West
                    Indians
                 
             
             
                14
             
             
                84
             
             
                0
             
           
           
             
                Africans
                 
             
             
                4
             
             
                24
             
             
                0
             
           
           
             
                Other
                    specified
                 
             
             
                8
             
             
                36
             
             
                0
             
           
           
             
                Against
                    all races
                 
             
             
                44
             
             
                529
             
             
                0
             
           
         
       
       
          �  
          This proves the late Professor Sir Roger Jowell’s contention
          that, “The verb to be prejudiced has no first person
          singular!” � This was actually because V575 was a filter
          question and the question about groups prejudiced against was
          not asked of people who claimed not to be prejudiced. � In
          cases like this it is sometimes useful to display the data in
          descending order of frequencies: can that be done in MR?
         
          �  
          Being curious I then went into CTables to see what syntax was
          generated � (Nice surprise to see mock-up tables to indicate
          what the output would contain!) . . to get the same table, but
          the generated syntax would, like the spider, have frightened
          Miss Muffitt and my students away. �  
          �  
          CTABLES
          �  /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT
          �  /TABLE $prej [COUNT F40.0] BY v575
          �  /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE
          EMPTY=INCLUDE MISSING=EXCLUDE.
         
          �  
          Anyway, thanks for the tip about shortened syntax for CTABLES.
          � Some of the possibilities in the CSR seem promising. � I’ll
          play around with the format and contents to see if I can
          produce the kind of tables I used to recommend to students,
          but which couldn’t be produced by SPSS. � These would include
          tables with row % and a single base N on the same row (ie not
          two rows as in crosstabs) and tables to illustrate
          Lazarsfeldian elaboration as per Rosenberg.
         
          �  
          John (with an h) Hall
          �
         
          Email:
            �  �
          [hidden email] 
         
          Website:
          www.surveyresearch.weebly.com
         
          Skype:
            �  surveyresearcher1
         
          Phone:
            �  � (+33) (0) 2.33.45.91.47
         
          �
         
          �
         
          �  
          �  
          �  
          �
         
          �
         
          From:
            SPSSX(r) Discussion
          [mailto:[hidden email]]
            On Behalf Of Jon K Peck
              Sent: 15 March 2012 21:43
              To: [hidden email] 
              Subject:
            Re: In support of CTABLES
         
          �  
          CTABLES
            has elaborate, although logical, syntax for complicated
            things. � For simple things, it's as simple as it gets:
         
            CTABLES /TABLE x BY y.
         
            And for an MR set,
            CTABLES /TABLE $x BY y.
           
            Jon Peck (no "h") aka Kim
            Senior Software Engineer, IBM
              [hidden email] 
            new phone: 720-342-5621
     
   
 


=====================
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
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Jon K Peck
But, the SPSSINC SELECT VARIABLES extension command, which defines a macro for a set of variables selected based on the metadata, including names. has an option to separate the names with + so that they will work for CTABLES.

If you go to Utilities >Define Variable Macro, you get a dialog box that can select variables based on names, wildcards (e.g., *age* to select all variable names containing "age"), type, measurement level, custom attributes etc.  So if you paste that syntax, you can reduce clutter and make the syntax more readable.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        David Marso <[hidden email]>
To:        [hidden email]
Date:        03/16/2012 07:38 PM
Subject:        Re: [SPSSX-L] In support of CTABLES
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




"Also I often edit the syntax produced by the GUI to reduce lists of
variables. (Just cut out all but the first and last variable and insert
"to".)
� This is related to my readability soapbox."

OTOH: With TABLES and CTABLES TO is *not* always an option.
You get things like:
Blah blah blah / TABLE = (A+B+C+D)>(E+F+G+H) BY blah blah blah.....
TO Just doesn't slice so well!
-------

Art Kendall wrote
>
> it is a time-saving practice in the long run to be
>       sure that meaning names and labels, level of measurement, separate
>       missing value labels, etc are all completed in the data view
>       before doing anything with the data.�  I make it practice since
>       about 1974 to have all of the team understand the labeling etc
>       very early in a project.
>
>       Short names may reduce typing but longer names help keep the
>       substantive meaning of variables in mind.
>
>       I find &lt;utilities&gt; &lt;variables&gt; useful while
>     drafting syntax.
>
>     Also I often edit the syntax produced by the GUI to reduce lists of
>     variables. (Just cut out all but the first and last variable and
>     insert "to".)
>     � This is related to my readability soapbox.
>
>
>
>       Reordering
>           target variable lists
>       Variables appear on dialog box target lists in the
>         order in which
>         they are selected from the source list. If you want to change
>         the
>         order of variables on a target list—but you don't want to
>         deselect
>         all of the variables and reselect them in the new order—you
>         can move variables up and down on the target list using the Ctrl
>         key
>         (Macintosh: Command key) with the up and down arrow keys. You
>         can
>         move multiple variables simultaneously if they are contiguous
>         (grouped
>         together). You cannot move noncontiguous groups of variables.
>
>
>     using MATCH FILES specifying only 1 file and putting "all" at the
>     end of the list is another way of making life easier.
>
>     Even before there were PC's�  one could always cut-and paste from
>     other syntax.
>     Art Kendall
>     Social Research Consultants
>
>     On 3/16/2012 4:41 PM, Poes, Matthew Joseph wrote:
>
>
>
>
>
>
>         Thanks
>             Jon,
>         � � � � � � � � � � � � � � �
>             I was actually aware of that ability (though stumbled upon
>             it by accident).�  I often need to include a measurement
>             level ([C]) since a lot of my data will get used in multiple
>             ways, and I use that syntax to adjust how I report it.�  For
>             me, the increased speed through the GUI actually comes from
>             the variables themselves.�  It’s just easier to grab a group
>             of variables and drag it onto the table, rather than to type
>             out each one.�  Not everyone is nice to me with short easy
>             variable names.�
>
>         �
>         Matthew
>               J Poes
>         Research
>             Data Specialist
>         Center
>             for Prevention Research and Development
>         University
>             of Illinois
>         510
>             Devonshire Dr.
>         Champaign,
>             IL 61820
>         Phone:� 217-265-4576
>         email:
>             mpoes@
>         �
>         �
>         From:
>             Jon K Peck [
mailto:peck@.ibm ]
>
>             Sent: Friday, March 16, 2012 3:31 PM
>             To: Poes, Matthew Joseph; spssx-l@.uga
>             Subject: Re: [SPSSX-L] In support of CTABLES
>         �
>         One
>             of the less well-known features of CTABLES syntax is that
>             you can factor out the statistics list when it is the same
>             for a batch of variables. � The gui does not do this, leading
>             people to think you have to write out the statistics for
>             each variable.
>
>
>           For
>             example, the gui might generate this TABLE subcommand with
>             two variables in the rows:
>
>           � /TABLE
>             jobcat [C][COUNT F40.0, ROWPCT.COUNT PCT40.1] + educ
>             [C][COUNT F40.0, ROWPCT.COUNT
>
>           �
>             �  PCT40.1] BY gender [C]
>
>           but
>             it can be simplified like this:
>
>           � /TABLE
>             (jobcat [C] + educ [C])[COUNT F40.0, ROWPCT.COUNT PCT40.1]
>             BY gender [C]
>
>
>           Further,
>             if the measurement levels are set correctly and you use
>             default formats, it can be further simplified to
>
>           � /TABLE
>             (jobcat + educ)[COUNT ROWPCT.COUNT] BY gender
>
>
>           Regards,
>             Jon Peck (no "h") aka Kim
>             Senior Software Engineer, IBM
>             peck@.ibm
>             new phone: 720-342-5621
>
>
>
>
>           From:
>             �  �  �  � "Poes,
>             Matthew Joseph" &lt; mpoes@ &gt;
>
>           To:
>             �  �  �  � SPSSX-L@.uga
>
>           Date:
>             �  �  �  � 03/16/2012
>             11:03 AM
>
>           Subject:
>             �  �  �  � Re:
>             [SPSSX-L] In support of CTABLES
>
>           Sent
>             by: �  �  �  � "SPSSX(r)
>             Discussion" &lt; SPSSX-L@.uga &gt;
>
>
>
>
>
>
>
>           In
>             case this is of use to others. � I’ve experienced occasional
>             resistance to the idea of using the drop down interface, as
>             opposed to code. � Saving everything you do in code is, of
>             course, always important. � However, with Ctables, I often
>             need to show large groups of variables (such as the
>             component variables of a scale), and typing this out (as
>             many as 3 separate times) can become tedious. � I often use
>             the drop down menu to create the table, then paste out the
>             syntax to save myself time. �
>           �
>
>           Matthew
>               J Poes
>
>           Research
>             Data Specialist
>
>           Center
>             for Prevention Research and Development
>
>           University
>             of Illinois
>
>           510
>             Devonshire Dr.
>
>           Champaign,
>             IL 61820
>
>           Phone:
>             217-265-4576
>
>           email:
>           mpoes@
>
>           �
>
>           �
>
>           From:
>             John F Hall [
mailto:johnfhall@ ]
>
>               Sent: Friday, March 16, 2012 10:47 AM
>               To: Poes, Matthew Joseph; SPSSX-L@.UGA
>               Cc: 'Bruce Weaver'
>               Subject: RE: In support of CTABLES
>           �
>           Matthew
>
>           �
>
>           I
>             think you may have missed a later exchange with Jon which
>             may address your concerns.
>
>           �
>
>           I
>             totally agree with you, but I always put myself in the place
>             of a naïve user seeing something for the first time. � At 4
>             o’clock this morning I was possibly a little slower than
>             usual but the route I took with the GUI was probably typical
>             of student beginners in social and political sciences.
>
>           �
>
>           I’ve
>             nothing against the GUI and I use it to save time when it’s
>             quicker (which isn’t often for basic operations and
>             analysis) but the CT syntax generated that way for MR was
>             daunting to me, let alone the sort of students I used to
>             teach. � If I’ve forgotten the exact syntax I open the CSR
>             (and sometimes leave it open during SPSS sessions). �
>
>           �
>
>           The
>             pedagogic approach adopted in my courses must have had some
>             merit as many students still write in appreciation 20 or
>             more years after I retired: seven of them are now full
>             Professors in UK universities and many others occupy senior
>             research positions. � However this may have more to do with
>             being taught by practicing researchers than being exposed to
>             SPSS syntax (GUI didn’t exist in those days).
>
>           �
>
>           I
>             have continued this approach in updating and converting the
>             courses for SPSS for Windows. � I do this because, whilst
>             there are many survey methods courses around using SPSS as a
>             basis, they tend to be oriented more to sampling error,
>             � mathematical statistics and statistical modelling than to
>             the actual substance of the research and the logic and
>             process of addressing substantive research questions using
>             data from questionnaire surveys. � As John Tukey once said,
>             “All the statistics in the world won’t save you if you asked
>             the wrong question in the first place.” � And as my old boss
>             Mark Abrams used to say, “If it’s worth saying, it’s worth
>             saying in percentages.” However I suspect he would have been
>             just as happy, if not more, with the graphics now available.
>
>           �
>
>           If
>             I can fit CT into this approach I certainly will, but it
>             will take many steps and many screenshots to explain the
>             journey and the resulting syntax. � Meanwhile I still have
>             around half of the course materials to convert and update.
>             � When I have finished using survey data from the 1970s and
>             1980s, I can begin to think about more recent material from
>             the BSA, the ESS and ONS well-being surveys as well as the
>             GSS.
>
>           �
>
>           What
>             would be interesting would be to see what beginning students
>             and researchers actually do (keystrokes, mouse movements and
>             viewer output) and how long it takes them, when they use
>             SPSS to perform a set of standard exercises. � We did
>             something like this in the 1970s when we got ULCC to pin a
>             questionnaire to all SPSS output in which errors had
>             occurred. � This was to check whether SPSS had accurately
>             identified the source of any errors, and what the actual
>             error was. � I don’t have a copy of the report, but there was
>             a short article in the ULCC Newsletter by Cathie Marsh and
>             John Utting which might be interesting to compare with
>             today’s much improved and less confusing, mostly
>             user-friendly error messages.
>           �
>
>           Finally,
>             perhaps you should actually have a look at some of my
>             tutorials, starting with page:
>
>           �
>
>
>
http://surveyresearch.weebly.com/summary-guide-to-spss-tutorials.html
>             and then by having a look at
>
http://surveyresearch.weebly.com/old-dog-old-tricks.html
>             � The first slideshow is quite fun and not covered in the
>             main presentation. � I’d appreciate your comments and
>             suggestions.
>
>           �
>
>           All
>             my materials are available for free download. � Also I’m
>             working on my own with no institutional affiliation or
>             support, and on a fractional pension. � Some of my closest
>             professional colleagues have recently passed away: I hope
>             that, before my own time comes, my site can help share with
>             others something of the knowledge and skills I have
>             acquired, and of the thrills I have enjoyed, as a survey
>             researcher since 1965.
>
>           �
>
>           Incidentally,
>             although I’ve been using SPSS since 1972, on dozens if not
>             hundreds of data sets, I’ve never written any code except
>             for a suite of survey analysis programs in Algol in the
>             1960’s (input and output on 8-hole paper tape).
>           �
>
>           Meanwhile,
>             I have a large garden to prepare for planting, a building
>             extension to finish and a backlog of 400+ films recorded
>             from (UK) TV to catch � up on. � Who said retirement was
>             boring?
>           �
>
>           Cheers
>
>           �
>
>           John
>             Hall
>
>           �
>
>           Email:
>             �  �
>           johnfhall@
>
>           Website:
>          
www.surveyresearch.weebly.com
>
>           Skype:
>             �  surveyresearcher1
>
>           Phone:
>             �  � (+33) (0) 2.33.45.91.47
>
>           �
>
>           PS
>             �
>
>           �
>
>           �
>
>           �
>
>           From:
>             Poes, Matthew Joseph
>           [
mailto:mpoes@]
>
>               Sent: 16 March 2012 14:39
>               To: 'John F Hall'; ' SPSSX-L@.UGA '
>               Subject: RE: In support of CTABLES
>           �
>           John,
>
>           �
>             �  �  �  �  �  �  �  I agree with you that new students need
> to
>             learn how to code logic into SPSS. � It’s important to
>             understand what these programs are doing. � As long as
>             students understand that in the real world, if using SPSS,
>             they will likely use a canned module within the program to
>             do these same functions, then learning the logic that
>             underlies it is fine (just as learning to hand write a
>             regression and solve).
>
>           �
>
>           �
>             �  �  �  �  �  �  �  However, I know you have considerably
> more
>             experience with both SPSS and coding than I do, but I
>             learned MRSETs in a matter of 30 minutes or so, and had a
>             working understanding of CTables in probably the same time.
>             � I’ve only been working with the two actively for about 2
>             years now, but find them supremely easy to use. � While I
>             frequently make my CTables through the interface, instead of
>             syntax, I can write my CTables via syntax without issue
>             (it’s just much quicker to let SPSS do it for me). � In terms
>             of MRsets, I always write this in syntax, and it doesn’t
>             take me long at all. �
>
>           �
>             �  �  �  �  �  �  �
>
>           �
>             �  �  �  �  �  �  �  If nothing else, its very easy to make
>             mistakes in long and complicated code, but the code for
>             CTables and MRsets is not long and complicated unless your
>             needs are long and complicated. � Debugging this is a
>             non-issue. � I really don’t understand why it took you so
>             long to learn, why you are so resistant to them, and why you
>             continue to post these disparaging remarks. � I happen to
>             love Ctables and MRsets in SPSS because I find they have
>             made my life much easier. � I was honestly shocked to find
>             someone disagree with that. � Maybe the issue is that we are
>             each used to different things, and as a result what I am
>             finding “time saving” you are finding “complicated.”
>
>           �
>
>           �
>             �  �  �  �  �  �  �  I would be surprised if, in time, you
> didn’t
>             find Ctables to be a giant improvement over the old tables
>             system, in terms of flexibility. � While memorizing all of
>             the possible code is daunting (I certainly have not myself)
>             I find it easy to figure out. �
>
>           �
>
>           Matthew
>               J Poes
>
>           Research
>             Data Specialist
>
>           Center
>             for Prevention Research and Development
>
>           University
>             of Illinois
>
>           510
>             Devonshire Dr.
>
>           Champaign,
>             IL 61820
>
>           Phone:
>             217-265-4576
>
>           email:
>           mpoes@
>
>           �
>
>           �
>
>           From:
>             SPSSX(r) Discussion [
[hidden email] ]
>             On Behalf Of John F Hall
>               Sent: Friday, March 16, 2012 12:27 AM
>               To: SPSSX-L@.UGA
>               Subject:
>             Re: In support of CTABLES
>
>           �
>           Jon
>
>           �
>
>           You
>             made no mention of the MRSETS command.
>
>           �
>
>           It
>             took me well over an hour to sort this out, and I know my
>             way round SPSS reasonably well. � Beginning students would
>             clearly take much longer or give up altogether. � To prepare
>             a new tutorial for such students would take an
>             unconscionably long time. �
>
>           �
>
>           Much
>             of my time was spent wading throught the CSR where nothing
>             in CTABLES explaining MRSETS and it doesn’t refer you to the
>             separate MRSETS command. � I discovered this by trying to run
>             Analyze &gt; � Mult Response &gt; Define … before being
>             pointed to Data &gt; � Define MR sets. (it didn’t help that
>             Mult Resp is buried at the bottom of the Analyze list.) � I
>             used PASTE from Data &gt; Define MR sets to see the syntax
>             generated.
>
>           �
>
>           MRSETS
>
>           �
>             /MCGROUP NAME=$prej VARIABLES=v608 v610 v612
>
>           �
>             /DISPLAY NAME=[$prej].
>
>           �
>
>           .
>             .and ran your syntax substituting my own vars.
>
>           �
>
>           CTABLES
>             /TABLE $prej BY v575.
>
>           �
>
>           �
>
>
>
>
>                 �
>
>
>                 Q.70e:
>                     �  � How [prejudiced] would you describe yourself?
>
>
>
>
>                 Very
>                     prejudiced
>
>
>                 A
>                     little prejudiced
>
>
>                 Not
>                     prejudiced
>
>
>
>
>                 Count
>
>
>                 Count
>
>
>                 Count
>
>
>
>
>                 $prej
>
>
>
>                 Asians
>
>
>
>                 25
>
>
>                 148
>
>
>                 0
>
>
>
>
>                 Blacks
>
>
>
>                 15
>
>
>                 66

>
>
>                 0
>
>
>
>
>                 Coloureds
>
>
>
>                 12
>
>
>                 41
>
>
>                 0
>
>
>
>
>                 Pakistanis
>
>
>
>                 24
>
>
>                 105
>
>
>                 0
>
>
>
>
>                 Indians
>
>
>
>                 9
>
>
>                 42
>
>
>                 0
>
>
>
>
>                 Sikhs
>
>
>
>                 1
>
>
>                 3
>
>
>                 0
>
>
>
>
>                 West
>                     Indians
>
>
>
>                 14
>
>
>                 84
>
>
>                 0
>
>
>
>
>                 Africans
>
>
>
>                 4
>
>
>                 24
>
>
>                 0
>
>
>
>
>                 Other
>                     specified
>
>
>
>                 8
>
>
>                 36
>
>
>                 0
>
>
>
>
>                 Against
>                     all races
>
>
>
>                 44
>
>
>                 529
>
>
>                 0
>
>
>
>
>
>           �
>           This proves the late Professor Sir Roger Jowell’s contention
>           that, “The verb to be prejudiced has no first person
>           singular!” � This was actually because V575 was a filter
>           question and the question about groups prejudiced against was
>           not asked of people who claimed not to be prejudiced. � In
>           cases like this it is sometimes useful to display the data in
>           descending order of frequencies: can that be done in MR?
>
>           �
>           Being curious I then went into CTables to see what syntax was
>           generated � (Nice surprise to see mock-up tables to indicate
>           what the output would contain!) . . to get the same table, but
>           the generated syntax would, like the spider, have frightened
>           Miss Muffitt and my students away. �
>           �
>           CTABLES
>           �  /VLABELS VARIABLES=$prej v575 DISPLAY=DEFAULT
>           �  /TABLE $prej [COUNT F40.0] BY v575
>           �  /CATEGORIES VARIABLES=$prej v575 ORDER=A KEY=VALUE
>           EMPTY=INCLUDE MISSING=EXCLUDE.
>
>           �
>           Anyway, thanks for the tip about shortened syntax for CTABLES.
>           � Some of the possibilities in the CSR seem promising. � I’ll
>           play around with the format and contents to see if I can
>           produce the kind of tables I used to recommend to students,
>           but which couldn’t be produced by SPSS. � These would include
>           tables with row % and a single base N on the same row (ie not
>           two rows as in crosstabs) and tables to illustrate
>           Lazarsfeldian elaboration as per Rosenberg.
>
>           �
>           John (with an h) Hall
>           �
>
>           Email:
>             �  �
>           johnfhall@
>
>           Website:
>          
www.surveyresearch.weebly.com
>
>           Skype:
>             �  surveyresearcher1
>
>           Phone:
>             �  � (+33) (0) 2.33.45.91.47
>
>           �
>
>           �
>
>           �
>           �
>           �
>           �
>
>           �
>
>           From:
>             SPSSX(r) Discussion
>           [
[hidden email]]
>             On Behalf Of Jon K Peck
>               Sent: 15 March 2012 21:43
>               To: SPSSX-L@.UGA
>               Subject:
>             Re: In support of CTABLES
>
>           �
>           CTABLES
>             has elaborate, although logical, syntax for complicated
>             things. � For simple things, it's as simple as it gets:
>
>             CTABLES /TABLE x BY y.
>
>             And for an MR set,
>             CTABLES /TABLE $x BY y.
>
>             Jon Peck (no "h") aka Kim
>             Senior Software Engineer, IBM
>               peck@.ibm
>             new phone: 720-342-5621
>
>
>
>
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> LISTSERV@.UGA (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
>


--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/In-support-of-CTABLES-tp5565479p5572898.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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: In support of CTABLES

John F Hall
In reply to this post by ViAnn Beadle

This exchange (and pouring rain) has prompted me to explore CTABLES with some of the examples in my tutorials.  The CSR, whilst thorough in listing everything CT can do, is less than helpful for working out how to do what the user wants: the Help tutorials for CT inside SPSS are uninformative and sparse. 

 

Looks like 1972 all over again when Jim Ring and I had to write a series of new handouts (effectively a manual to the manual) for researchers who came to SSRC Survey Unit for advice and assistance.   These detailed, in simple language, the various stages of survey data capture, file management and statistical analysis and explained how to do this with SPSS.  We even joked about writing a “Clod’s Guide to Survey Analysis Using SPSS”  They formed the basis for teaching notes on our Summer Schools in Survey Methods (1970-76) and, eventually, for  my Survey Analysis Workshop (1976 – 92) at the then Polytechnic of North London.  Apart from workshop exercises and supplementary explanations, we used Maria Norusis wonderful book from 1987 onwards (bought in bulk and sold at cost to students).

 

Unless I can find a downloadable CT explanation and workthrough for the kind of tables I need, it seems I’ll have to write something myself.  I’ve been playing with CT on some of my course data and noted that it is very, very fast.  What I need to do now is work backwards from the output I used to get using  BREAKDOWN (always caused a laugh from my students when it was first mentioned). . . /CROSSBREAK (now superceded) to see if CT can produce it.   I’m looking for a way to get this table:

 

sexism2  * sex * ethnic

 

sexism2

sex

ethnic

 

White

Other

Total

 

Mean

N

Mean

N

Mean

N

Boys

13.41

22

11.90

20

12.69

42

Girls

9.17

30

8.64

14

9.00

44

Total

10.96

52

10.56

34

10.80

86

 

 

 

 

 

 

 

 

Into a format which matches this blank table:

 

 

Sexism

Mean

(n)

 

 

All

 

White

 

Other

All

 

 

(     )   

 

 

(     )   

 

 

(     )   

Boys

 

 

(     )   

 

 

(     )   

 

 

(     )   

Girls

 

 

 

(     )   

 

 

(     )   

 

 

(     )   

 

 

[This one is for means, but it applies equally to percentages for elaboration.]

 

A quick search for SPSS CROSSBREAK produced this 2009 correspondence from Jon Peck:

http://listserv.uga.edu/cgi-bin/wa?A2=ind0909&L=spssx-l&P=24774 from which I hope to be able to produce:

 

 

Sexism

Mean

(n)

 

 

All

 

White

 

Other

All

10.8

(86)

11.0

(52)

10.6

(34)

Boys

12.7

(42)

13.4

(22)

11.9

(20)

Girls

 

9.0

(44)

9.2

(30)

8.6

(14)

 

The main point about such tables is that the sample statistic appears top left, first order statistics in the 1st row/ column and second order statistics in the 2nd and 3rd rows/columns:  right-to-left language users may prefer the table to be flipped horizontally.  I would normally do this with percentages, following on from CROSSTABS, as it is a relatively simple way of demonstrating analysis by breaking down a statistic into constituent parts, forcing students to think about explanations for the emerging pattern and about other variables which might be introduced as 3rd order controls.  Once the concept of a mean is introduced and understood, using similar summary tables, students can progress to further statistical tests.

 

There are three international rugby matches on BBC this afternoon, so I’ve got less than two hours to modify Jon’s syntax and see what I come up with (and fit a sandwich in for lunch: just like being back at work!).

 

John Hall

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

 

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

David Marso
Administrator
I suspect as close as you will get is something like this:
If you wish to have multiple stats in a single cell arrayed top-left/bottom right you are very much SOL!
It just doesn't work that way!

COMPUTE X=1.
VARIABLE LEVEL X (NOMINAL).
VAR LABELS X " ".
VALUE LABELS X 1 "All".

* Custom Tables.
CTABLES
  /VLABELS VARIABLES=x race sibs sex DISPLAY=DEFAULT
  /TABLE x > age [MEAN F8.3 'Mean' COUNT 'N'] + sex > age [MEAN F8.3 'Mean' COUNT 'N'] BY x + race
  /CATEGORIES VARIABLES=x ORDER=A KEY=VALUE EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=race sex ORDER=A KEY=VALUE EMPTY=INCLUDE.

Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

Jon K Peck
In reply to this post by John F Hall
Using employee data.sav

This produces almost the table you want (labelling suppressed as in your example)
CTABLES
 /VLABELS VARIABLES=salary DISPLAY=NONE
  /TABLE gender > salary [MEAN, COUNT PAREN40.0] BY minority
  /SLABELS POSITION=ROW VISIBLE=NO
  /CATEGORIES VARIABLES=gender minority TOTAL=YES POSITION=BEFORE.

If you want to align the counts right, you can select those cells in the table editor and change the alignment.  This could be automated with the SPSSINC MODIFY TABLES extension command.  You could also add striping every other row via a tableLook or preference setting.

Alternatively, put the counts in adjacent cells like this.
CTABLES
   /VLABELS VARIABLES=salary DISPLAY=NONE
  /TABLE gender [C] > salary [S][MEAN, COUNT PAREN40.0] BY minority [C]
  /SLABELS VISIBLE=NO
  /CATEGORIES VARIABLES=gender minority TOTAL=YES POSITION=BEFORE .



Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        John F Hall <[hidden email]>
To:        [hidden email]
Date:        03/17/2012 04:38 AM
Subject:        Re: [SPSSX-L] In support of CTABLES
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




This exchange (and pouring rain) has prompted me to explore CTABLES with some of the examples in my tutorials.  The CSR, whilst thorough in listing everything CT can do, is less than helpful for working out how to do what the user wants: the Help tutorials for CT inside SPSS are uninformative and sparse.  
 
Looks like 1972 all over again when Jim Ring and I had to write a series of new handouts (effectively a manual to the manual) for researchers who came to SSRC Survey Unit for advice and assistance.   These detailed, in simple language, the various stages of survey data capture, file management and statistical analysis and explained how to do this with SPSS.  We even joked about writing a “Clod’s Guide to Survey Analysis Using SPSS”  They formed the basis for teaching notes on our Summer Schools in Survey Methods (1970-76) and, eventually, for  my Survey Analysis Workshop (1976 – 92) at the then Polytechnic of North London.  Apart from workshop exercises and supplementary explanations, we used Maria Norusis wonderful book from 1987 onwards (bought in bulk and sold at cost to students).
 
Unless I can find a downloadable CT explanation and workthrough for the kind of tables I need, it seems I’ll have to write something myself.  I’ve been playing with CT on some of my course data and noted that it is very, very fast.  What I need to do now is work backwards from the output I used to get using  BREAKDOWN (always caused a laugh from my students when it was first mentioned). . . /CROSSBREAK (now superceded) to see if CT can produce it.   I’m looking for a way to get this table:
 
sexism2  * sex * ethnic
 
sexism2

sex
ethnic
 
White
Other
Total
 
Mean
N
Mean
N
Mean
N
Boys
13.41
22
11.90
20
12.69
42
Girls
9.17
30
8.64
14
9.00
44
Total
10.96
52
10.56
34
10.80
86
 
 
 
 
 
 
 

 
Into a format which matches this blank table:
 

 

Sexism

Mean

(n)

 
 
All
 
White
 
Other
All
 
 
(     )    
 
 
(     )    
 
 
(     )    
Boys
 
 
(     )    
 
 
(     )    
 
 
(     )    
Girls
 
 
 
(     )    
 
 
(     )    
 
 
(     )    

 

 
[This one is for means, but it applies equally to percentages for elaboration.]
 
A quick search for SPSS CROSSBREAK produced this 2009 correspondence from Jon Peck:
http://listserv.uga.edu/cgi-bin/wa?A2=ind0909&L=spssx-l&P=24774 from which I hope to be able to produce:
 

 

Sexism

Mean

(n)

 
 
All
 
White
 
Other
All
10.8

(86)
11.0

(52)
10.6

(34)
Boys
12.7

(42)
13.4

(22)
11.9

(20)
Girls
 
9.0

(44)
9.2

(30)
8.6

(14)

 
The main point about such tables is that the sample statistic appears top left, first order statistics in the 1st row/ column and second order statistics in the 2nd and 3rd rows/columns:  right-to-left language users may prefer the table to be flipped horizontally.  I would normally do this with percentages, following on from CROSSTABS, as it is a relatively simple way of demonstrating analysis by breaking down a statistic into constituent parts, forcing students to think about explanations for the emerging pattern and about other variables which might be introduced as 3rd order controls.  Once the concept of a mean is introduced and understood, using similar summary tables, students can progress to further statistical tests.
 
There are three international rugby matches on BBC this afternoon, so I’ve got less than two hours to modify Jon’s syntax and see what I come up with (and fit a sandwich in for lunch: just like being back at work!).
 
John Hall
 
Email:     johnfhall@...
Website: www.surveyresearch.weebly.com
Skype:   surveyresearcher1
Phone:    (+33) (0) 2.33.45.91.47
 
 
 
 
 
Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

John F Hall

Jon

 

Thanks for this and apologies for the lengthy reply.  I’ve not tried David’s solution yet, but that’s on my to do list. 

 

I’ve spent the last couple of days experimenting with CTABLES on a larger data set (my 1975 Quality of Life in Britain) as I’m more familiar with it and the variables are a close match for the example in the CSR (sex, marital status feeling very, fairly or not at all happy).  I’ve done this for “happy” using %% both in marital by happy by sex format using CROSSTABS and also my elaboration summary table format which involves recoding to 0,100 and using MEANS.  I’ve then attempted to repeat the analysis using CTABLES.

 

As it happens I use almost  the same example in tutorial 3.1.3 to introduce the simultaneous tabulation of two variables.  This is the first time in the course that students will come across joint frequency distributions.

 

[Extract from tutorial]


 

We'll be using data from this survey to explore the relationship:

 

Marital status  →  Feeling happy

 

. . . or is it the other way round?  

 

Is this the true story, or are there any other variables, (related or unrelated to marital status) which might influence feeling happy?  What might they be?  How do they affect the relationship between marital status and feeling happy?  Thus as well as dependent and independent variables, we also need to think of test variables to examine the initial relationship between marital status and feeling happy by controlling for the test variables.  Does marital status affect feeling happy at all?  These are the kind of questions which make survey research so interesting.


 

The following examples use CROSSTABS and are from the SSRC Survey Unit Quality of Life in Britain survey, 1975] 

 

Exercise 1:  The sequence followed in class would produce output like this:

Q.53 How [happy] are you these days? * Marital status of respondent Crosstabulation

Count

 

Marital status of respondent

Total

Single

Married

Widowed

Divorced or separated

Q.53 How [happy] are you these days?

Not too happy

7

29

17

4

57

Fairly Happy

105

337

58

16

516

Very happy

38

283

23

9

353

Total

150

649

98

29

926

 

 

Q.53 How [happy] are you these days? * Marital status of respondent Crosstabulation

 

Marital status of respondent

Total

Single

Married

Widowed

Divorced or separated

Q.53 How [happy] are you these days?

Not too happy

Count

7

29

17

4

57

% within Marital status of respondent

4.7%

4.5%

17.3%

13.8%

6.2%

Fairly Happy

Count

105

337

58

16

516

% within Marital status of respondent

70.0%

51.9%

59.2%

55.2%

55.7%

Very happy

Count

38

283

23

9

353

% within Marital status of respondent

25.3%

43.6%

23.5%

31.0%

38.1%

Total

Count

150

649

98

29

926

% within Marital status of respondent

100.0%

100.0%

100.0%

100.0%

100.0%

 

This is a bit cluttered, so just use col%:

 

Q.53 How [happy] are you these days? * Marital status of respondent Crosstabulation

% within Marital status of respondent

 

Marital status of respondent

Total

Single

Married

Widowed

Divorced or separated

Q.53 How [happy] are you these days?

Not too happy

4.7%

4.5%

17.3%

13.8%

6.2%

Fairly Happy

70.0%

51.9%

59.2%

55.2%

55.7%

Very happy

25.3%

43.6%

23.5%

31.0%

38.1%

Total

100.0%

100.0%

100.0%

100.0%

100.0%

 

. . . but it's much easier to compare figures visually down columns rather than across rows.

 

I  prefer to have the dependent variable across the top of the table and the independent variable(s) down the side, viz:

 

marital * happy Crosstabulation

% within marital

 

happy

Total

Not too happy

Fairly happy

Very happy

marital

Married or cohabiting

6.5%

68.6%

24.8%

100.0%

Single

3.2%

46.9%

49.9%

100.0%

Widowed

11.7%

62.8%

25.5%

100.0%

Separated or divorced

35.3%

55.9%

8.8%

100.0%

Total

5.7%

52.2%

42.1%

100.0%

 

 

This table is easier to interpret, but we have lost the base for percentaging at the end of each row.  Without special programming beyond the scope of this tutorial, SPSS cannot produce a table with n instead of 100%.   A more useful table would look like this:

 

marital * happy Crosstabulation

% within marital

 

happy

N = 100%

Not too happy

Fairly happy

Very happy

marital

Married or cohabiting

6.5%

68.6%

24.8%

150

Single

3.2%

46.9%

49.9%

649

Widowed

11.7%

62.8%

25.5%

98

Separated or divorced

35.3%

55.9%

8.8%

29

Total

5.7%

52.2%

42.1%

926

 

The 3-way table for elaboration:

 

Marital status of respondent * Q.53 How [happy] are you these days? * Sex of Respondent Crosstabulation

% within Marital status of respondent

Sex of Respondent

Q.53 How [happy] are you these days?

Total

Not too happy

Fairly Happy

Very happy

Men

Marital status of respondent

Single

5.3%

75.0%

19.7%

100.0%

Married

5.2%

55.6%

39.2%

100.0%

Widowed

26.7%

60.0%

13.3%

100.0%

Divorced or separated

16.7%

66.7%

16.7%

100.0%

Total

6.2%

59.7%

34.0%

100.0%

Women

Marital status of respondent

Single

4.1%

64.9%

31.1%

100.0%

Married

3.9%

49.0%

47.1%

100.0%

Widowed

15.7%

59.0%

25.3%

100.0%

Divorced or separated

13.0%

52.2%

34.8%

100.0%

Total

6.1%

52.9%

41.0%

100.0%

Total

Marital status of respondent

Single

4.7%

70.0%

25.3%

100.0%

Married

4.5%

51.9%

43.6%

100.0%

Widowed

17.3%

59.2%

23.5%

100.0%

Divorced or separated

13.8%

55.2%

31.0%

100.0%

Total

6.2%

55.7%

38.1%

100.0%

 

Again, it would be more useful if it looked like this:

 

Sex of Respondent * Q.53 How [happy] are you these days? * Marital status of respondent Crosstabulation

% within Sex of Respondent

Marital status of respondent

Q.53 How [happy] are you these days?

N = 1000%

Not too happy

Fairly Happy

Very happy

Single

Sex of Respondent

Men

5.3%

75.0%

19.7%

76

Women

4.1%

64.9%

31.1%

74

Total

4.7%

70.0%

25.3%

150

Married

Sex of Respondent

Men

5.2%

55.6%

39.2%

288

Women

3.9%

49.0%

47.1%

361

Total

4.5%

51.9%

43.6%

649

Widowed

Sex of Respondent

Men

26.7%

60.0%

13.3%

15

Women

15.7%

59.0%

25.3%

83

Total

17.3%

59.2%

23.5%

98

Divorced or separated

Sex of Respondent

Men

16.7%

66.7%

16.7%

93

Women

13.0%

52.2%

34.8%

15

Total

13.8%

55.2%

31.0%

29

Total

Sex of Respondent

Men

6.2%

59.7%

34.0%

385

Women

6.1%

52.9%

41.0%

541

Total

6.2%

55.7%

38.1%

926

 

This my starting point for CTABLES.

 

I’ve replicated the above exercises using CTABLES, but it took me a very long time to get used to the displays and routing.  I’m beginning to get the hang of it, but I still think it’s far too complicated for the kind of students I taught and the timetable constraints they (and I) faced.  Full-time postgrads and early career research staff have fewer constraints on their time.  I took many a wrong path on the way, as would many of my students.  This was one reason we abandoned a teaching experiment using SPSS PC+ on PCs: the students finished up all over the place and we reverted to SPSS-X on the mainframe using syntax on VDUs.

 

That said I have started on a draft tutorial for CTABLES with much more explanation than the CSR or the on-line help, and with the addition of step-by-step screenshots.  On the way I discovered some really nice features, such as the table layout previews, especially the ability to drag variables around from these to rows or columns to see what the table would look like.  I found it irritating that the display reverted to the top of the file when starting a new analysis rather than going back to where I left off.

 

I have yet to work out how to get row and column totals (and %%) into tables.

 

 

CTABLES

  /VLABELS VARIABLES=marital sex happy DISPLAY=DEFAULT

  /TABLE marital > sex BY happy [C] [rowpct f3.1]

  /CATEGORIES VARIABLES=marital sex happy ORDER=A KEY=VALUE EMPTY=INCLUDE.

 

 

 

Q.53 How [happy] are you these days?

Not too happy

Fairly Happy

Very happy

Row N %

Row N %

Row N %

Marital status of respondent

Single

Sex of Respondent

Men

5.3

75.0

19.7

Women

4.1

64.9

31.1

Married

Sex of Respondent

Men

5.2

55.6

39.2

Women

3.9

49.0

47.1

Widowed

Sex of Respondent

Men

26.7

60.0

13.3

Women

15.7

59.0

25.3

Divorced or separated

Sex of Respondent

Men

16.7

66.7

16.7

Women

13.0

52.2

34.8

 

This table needs an additional column giving base N for % in each row, which I can do by hand, but I’ll try to do it in CTABLES

 

Example 2: Summary table

 

recode happy (3 = 100) (1,2 =0)(else = sysmis) into happy2.

var level happy2 (scale).

 

 

* Custom Tables.

CTABLES

  /VLABELS VARIABLES=sex marital happy2 DISPLAY=DEFAULT

  /TABLE sex [C] BY marital [C] > happy2 [S][MEAN]

  /CATEGORIES VARIABLES=sex [1, 2, OTHERNM] EMPTY=INCLUDE

  /CATEGORIES VARIABLES=marital [1, 2, 3, 4, OTHERNM] EMPTY=INCLUDE.

 

 

Marital status of respondent

Single

Married

Widowed

Divorced or separated

happy2

happy2

happy2

happy2

Mean

Mean

Mean

Mean

Sex of Respondent

Men

19.74

39.24

13.33

16.67

Women

31.08

47.09

25.30

34.78

 

So far, so good, but I want a table that looks something like this (edited rather clumsily in Word):

 

 

 

 

 

Marital status of respondent

 

 

 

 

All

Single

Married

Widowed

Divorced or separated

 

All

%

38.12

25.33

43.61

23.47

31.03

 

n=100%

926

150

649

98

29

 

 

 

 

Sex of Respondent

 

 

Men

 

%

34.03

19.74

39.24

13.33

16.67

 

 

n=100%

385

76

288

15

6

 

 

Women

%

41.04

31.08

47.09

25.30

34.78

 

 

 

n=100%

541

74

361

83

23

 

I’d prefer % as f3.1                                                                      

From this table we can calculate epsilons

-7.0

-11.3

-7.9

-12.0

-18.1

 

. . and begin to discuss how to interpret these figures and what other variables might be included.

A much better example is the difference in earnings between men and women at zero order and when controlling for other variables such as qualifications, full-time or part-time, employee or self-employed etc., bu that is a lot of work.

 

Like I said, sorry for the length of this, but it gives you a better idea of what I’m trying to do.

 

John

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of Jon K Peck
Sent: 17 March 2012 14:39
To: [hidden email]
Subject: Re: In support of CTABLES

 

Using employee data.sav

This produces almost the table you want (labelling suppressed as in your example)
CTABLES
 /VLABELS VARIABLES=salary DISPLAY=NONE
  /TABLE gender > salary [MEAN, COUNT PAREN40.0] BY minority
  /SLABELS POSITION=ROW VISIBLE=NO
  /CATEGORIES VARIABLES=gender minority TOTAL=YES POSITION=BEFORE.

If you want to align the counts right, you can select those cells in the table editor and change the alignment.  This could be automated with the SPSSINC MODIFY TABLES extension command.  You could also add striping every other row via a tableLook or preference setting.

Alternatively, put the counts in adjacent cells like this.
CTABLES
   /VLABELS VARIABLES=salary DISPLAY=NONE
  /TABLE gender [C] > salary [S][MEAN, COUNT PAREN40.0] BY minority [C]
  /SLABELS VISIBLE=NO
  /CATEGORIES VARIABLES=gender minority TOTAL=YES POSITION=BEFORE .



Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        John F Hall <[hidden email]>
To:        [hidden email]
Date:        03/17/2012 04:38 AM
Subject:        Re: [SPSSX-L] In support of CTABLES
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





This exchange (and pouring rain) has prompted me to explore CTABLES with some of the examples in my tutorials.  The CSR, whilst thorough in listing everything CT can do, is less than helpful for working out how to do what the user wants: the Help tutorials for CT inside SPSS are uninformative and sparse.  
 
Looks like 1972 all over again when Jim Ring and I had to write a series of new handouts (effectively a manual to the manual) for researchers who came to SSRC Survey Unit for advice and assistance.   These detailed, in simple language, the various stages of survey data capture, file management and statistical analysis and explained how to do this with SPSS.  We even joked about writing a “Clod’s Guide to Survey Analysis Using SPSS”  They formed the basis for teaching notes on our Summer Schools in Survey Methods (1970-76) and, eventually, for  my Survey Analysis Workshop (1976 – 92) at the then Polytechnic of North London.  Apart from workshop exercises and supplementary explanations, we used Maria Norusis wonderful book from 1987 onwards (bought in bulk and sold at cost to students).
 
Unless I can find a downloadable CT explanation and workthrough for the kind of tables I need, it seems I’ll have to write something myself.  I’ve been playing with CT on some of my course data and noted that it is very, very fast.  What I need to do now is work backwards from the output I used to get using  BREAKDOWN (always caused a laugh from my students when it was first mentioned). . . /CROSSBREAK (now superceded) to see if CT can produce it.   I’m looking for a way to get this table:
 
sexism2  * sex * ethnic
 
sexism2

sex

ethnic

 
White

Other

Total

 
Mean

N

Mean

N

Mean

N

Boys

13.41

22

11.90

20

12.69

42

Girls

9.17

30

8.64

14

9.00

44

Total

10.96

52

10.56

34

10.80

86

 

 

 

 

 

 

 


 
Into a format which matches this blank table:
 

 


Sexism


Mean


(n)


 

 
All

 
White

 
Other

All

 
 
(     )    

 
 
(     )    

 
 
(     )    

Boys

 
 
(     )    

 
 
(     )    

 
 
(     )    

Girls
 

 
 
(     )    

 
 
(     )    

 
 
(     )    


 


 
[This one is for means, but it applies equally to percentages for elaboration.]
 
A quick search for SPSS CROSSBREAK produced this 2009 correspondence from Jon Peck:
http://listserv.uga.edu/cgi-bin/wa?A2=ind0909&L=spssx-l&P=24774 from which I hope to be able to produce:
 

 


Sexism


Mean


(n)


 

 
All

 
White

 
Other

All

10.8


(86)

11.0


(52)

10.6


(34)

Boys

12.7


(42)

13.4


(22)

11.9


(20)

Girls
 

9.0


(44)

9.2


(30)

8.6


(14)


 
The main point about such tables is that the sample statistic appears top left, first order statistics in the 1st row/ column and second order statistics in the 2nd and 3rd rows/columns:  right-to-left language users may prefer the table to be flipped horizontally.  I would normally do this with percentages, following on from CROSSTABS, as it is a relatively simple way of demonstrating analysis by breaking down a statistic into constituent parts, forcing students to think about explanations for the emerging pattern and about other variables which might be introduced as 3rd order controls.  Once the concept of a mean is introduced and understood, using similar summary tables, students can progress to further statistical tests.
 
There are three international rugby matches on BBC this afternoon, so I’ve got less than two hours to modify Jon’s syntax and see what I come up with (and fit a sandwich in for lunch: just like being back at work!).
 
John Hall
 
Email:     [hidden email]
Website: www.surveyresearch.weebly.com
Skype:   surveyresearcher1
Phone:    (+33) (0) 2.33.45.91.47
 
 
 
 
 

Reply | Threaded
Open this post in threaded view
|

Re: In support of CTABLES

John F Hall

Jon

 

Waking up at 4:15 am, it was a delight to find your mail.  This is brilliant.  I’ve modified your syntax to suit my data set, but I need to work out how to get the syntax from the GUI since that’s what students will use.  Here are the tables (and syntax) I produced:

 

 

1: Zero order

 

ctables

   /tables by happy [c] [ROWPCT.COUNT TOTALS[COUNT]]

   /CATEGORIES VARIABLES=happy TOTAL=YES POSITION=AFTER .

 

 

Q.53 How [happy] are you these days?

Not too happy

Fairly Happy

Very happy

Total

Row N %

Row N %

Row N %

Count

6.2%

55.7%

38.1%

926

 

 

2: First order

 

CTABLES

  /TABLE marital [C] BY happy [C][ROWPCT.COUNT TOTALS[COUNT]]

  /CATEGORIES VARIABLES= marital happy TOTAL=YES POSITION=AFTER .

 

 

 

Q.53 How [happy] are you these days?

Not too happy

Fairly Happy

Very happy

Total

Row N %

Row N %

Row N %

Count

Marital status of respondent

Single

4.7%

70.0%

25.3%

150

Married

4.5%

51.9%

43.6%

649

Widowed

17.3%

59.2%

23.5%

98

Divorced or separated

13.8%

55.2%

31.0%

29

Total

6.2%

55.7%

38.1%

926

 

 

 

Q.53 How [happy] are you these days?

Not too happy

Fairly Happy

Very happy

Total

Row N %

Row N %

Row N %

Count

Sex of Respondent

Men

6.2%

59.7%

34.0%

385

Women

6.1%

52.9%

41.0%

541

Total

6.2%

55.7%

38.1%

926

 

The format of these tables is exactly what I want for earlier tutorials (and for reports): it’s a shame I can’t get them using CROSSTABS. 

 

3: Second order

 

CTABLES

  /TABLE marital [C] BY happy [C][ROWPCT.COUNT TOTALS[COUNT]]

  /CATEGORIES VARIABLES= marital happy TOTAL=YES POSITION=AFTER .

 

Q.53 How [happy] are you these days? Total

 

Sex of Respondent

Total

Men

Women

Count

Count

Count

Marital status of respondent

Total

926

385

541

Single

150

76

74

Married

649

288

361

Widowed

98

15

83

Divorced or separated

29

6

23

 

 

OOPS!! 

 

45 year old Algol programming instinct made me try:

 

CTABLES

  /TABLE marital [C] > sex [c] by happy [C][ROWPCT.COUNT TOTALS[COUNT]]

  /CATEGORIES VARIABLES= marital sex happy TOTAL=YES POSITION=after .

 

 

 

Q.53 How [happy] are you these days?

Not too happy

Fairly Happy

Very happy

Total

Row N %

Row N %

Row N %

Count

Marital status of respondent

Single

Sex of Respondent

Men

5.3%

75.0%

19.7%

76

Women

4.1%

64.9%

31.1%

74

Total

4.7%

70.0%

25.3%

150

Married

Sex of Respondent

Men

5.2%

55.6%

39.2%

288

Women

3.9%

49.0%

47.1%

361

Total

4.5%

51.9%

43.6%

649

Widowed

Sex of Respondent

Men

26.7%

60.0%

13.3%

15

Women

15.7%

59.0%

25.3%

83

Total

17.3%

59.2%

23.5%

98

Divorced or separated

Sex of Respondent

Men

16.7%

66.7%

16.7%

6

Women

13.0%

52.2%

34.8%

23

Total

13.8%

55.2%

31.0%

29

Total

Sex of Respondent

Men

6.2%

59.7%

34.0%

385

Women

6.1%

52.9%

41.0%

541

Total

6.2%

55.7%

38.1%

926

 

 

CTABLES

  /TABLE  sex [c] >  marital [C] by happy [C] [ROWPCT.COUNT TOTALS[COUNT]]

  /CATEGORIES VARIABLES= marital sex happy TOTAL=YES POSITION=after .

 

 

 

Q.53 How [happy] are you these days?

Not too happy

Fairly Happy

Very happy

Total

Row N %

Row N %

Row N %

Count

Sex of Respondent

Men

Marital status of respondent

Single

5.3%

75.0%

19.7%

76

Married

5.2%

55.6%

39.2%

288

Widowed

26.7%

60.0%

13.3%

15

Divorced or separated

16.7%

66.7%

16.7%

6

Total

6.2%

59.7%

34.0%

385

Women

Marital status of respondent

Single

4.1%

64.9%

31.1%

74

Married

3.9%

49.0%

47.1%

361

Widowed

15.7%

59.0%

25.3%

83

Divorced or separated

13.0%

52.2%

34.8%

23

Total

6.1%

52.9%

41.0%

541

Total

Marital status of respondent

Single

4.7%

70.0%

25.3%

150

Married

4.5%

51.9%

43.6%

649

Widowed

17.3%

59.2%

23.5%

98

Divorced or separated

13.8%

55.2%

31.0%

29

Total

6.2%

55.7%

38.1%

926

 

There’s rather too much data in these tables: they might be more informative if the Total rows were dropped, leaving just the Total column as below, but tidier:

 

 

 

Q.53 How [happy] are you these days?

 

Not too happy

Fairly Happy

Very happy

Total

 

Row N %

Row N %

Row N %

Count

Total  

6.2%

55.7%

38.1%

926

 

 

Sex of respondent

 

Men

6.2%

59.7%

34.0%

385

 

Women

6.1%

52.9%

41.0%

541

 

 

 

 

 

 

 

 

Marital status of respondent

 

Single

Men

5.3%

75.0%

19.7%

76

 

Women

4.1%

64.9%

31.1%

74

 

 

 

 

 

 

 

 

Married

Men

5.2%

55.6%

39.2%

288

 

Women

3.9%

49.0%

47.1%

361

 

 

 

 

 

 

 

 

Widowed

Men

26.7%

60.0%

13.3%

15

 

Women

15.7%

59.0%

25.3%

83

 

 

 

 

 

 

 

 

Divorced or separated

Men

16.7%

66.7%

16.7%

6

 

Women

13.0%

52.2%

34.8%

23

 

. . . or perhaps analyse only one category at a time to generate smaller tables.

 

The next step would be to take a criterion value for the dependent variable, ie value 1 (Not too happy) or value 3 (Very happy) and produce a summary table as in my earlier mail.  In that, I used “Very happy”, but being happy is normative, so I suspect it would be more interesting to pursue the “Not too happy” category.

 

I still need to check out David’s syntax, but now that I’ve been let loose with a new toy, preparation of and planting in the vegetable garden will be a less attractive proposition: the next few days are going to be fun.

Cordialement

John

 

Email:     [hidden email]

Website: www.surveyresearch.weebly.com

Skype:   surveyresearcher1

Phone:    (+33) (0) 2.33.45.91.47

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

From: Jon K Peck [mailto:[hidden email]]
Sent: 18 March 2012 23:35
To: John F Hall
Subject: RE: In support of CTABLES

 

One comment jumps out at me

"This table is easier to interpret, but we have lost the base for percentaging at the end of each row.  Without special programming beyond the scope of this tutorial, SPSS cannot produce a table with n instead of 100%.   A more useful table would look like this:"

In the Summary Statistics subdialog (and, of course, in the TABLE subcommand), you can choose different statistics for totals from the items tabulated.

For example,
CTABLES
  /TABLE gender [C] BY jobcat [C][ROWPCT.COUNT TOTALS[COUNT]]
  /CATEGORIES VARIABLES=gender jobcat TOTAL=YES POSITION=AFTER .

gives you percents on the non-total cells and counts for the totals cells.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621


12