A table of "Mean scores" for "various categories" of a categorical variable!

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

A table of "Mean scores" for "various categories" of a categorical variable!

Sanjay Seth, MBA, Ph.D.-2

Hello Everybody,

 

I was trying to create a table of several interval scale variables (v1, v2) of mean scores for various categories of a categorial variable (c1, with two categories a, b).

 

Table Option: It always shows counts for 1-5 scale of "interval scale variable" in the Tables option in SPSS.


Crosstabs Option: With
Crosstabs option in descriptive stat, it always treat row and categories as categorical variables hence not able to use that option as well.  

 

How to create such a table in SPSS (an example is shown below)?

 

Categorical variable

C1

A

B

Interval Scale Variables

v1

4.3

3.3

v2

2.3

3.9

 

 

Thanks a lot for any help in advance.

 

Best regards,
Sanjay

from

Tokyo

===================== 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: A table of "Mean scores" for "various categories" of a categorical variable!

David Marso
Administrator
Please post your syntax.


Sanjay Seth, MBA, Ph.D.-2 wrote

> Hello Everybody,
>
>  
>
> I was trying to create a “table” of several interval scale variables (v1,
> v2) of “mean scores” for “various categories” of a categorial variable
> (c1, with two categories a, b).
>
>  
>
> Table Option: It always shows counts for 1-5 scale of "interval scale
> variable" in the “Tables option” in SPSS.
>
>
> Crosstabs Option: With “Crosstabs” option in descriptive stat, it always
> treat row and categories as “categorical variables” hence not able to use
> that option as well.  
>
>  
>
> How to create such a table in SPSS (an example is shown below)?
>
>  
>
>
> Categorical variable
>
>
> C1
>
>
>
> A
>
> B
>
>
>
> Interval Scale Variables
>
> v1
>
> 4.3
>
> 3.3
>
>
>
> v2
>
> 2.3
>
> 3.9
>
>
>
>  
>
>  
>
> Thanks a lot for any help in advance.
>
>  
>
> Best regards,
> Sanjay
>
> from
>
> Tokyo
>
>
> =====================
> 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





-----
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?"
--
Sent from: http://spssx-discussion.1045642.n5.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
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: A table of "Mean scores" for "various categories" of a categorical variable!

Rich Ulrich
In reply to this post by Sanjay Seth, MBA, Ph.D.-2

A procedure to display means is called "MEANS".  

You find it under "compare means".


--

Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of Sanjay Seth, MBA, Ph.D. <[hidden email]>
Sent: Sunday, September 16, 2018 12:40:04 AM
To: [hidden email]
Subject: A table of "Mean scores" for "various categories" of a categorical variable!
 

Hello Everybody,

 

I was trying to create a table of several interval scale variables (v1, v2) of mean scores for various categories of a categorial variable (c1, with two categories a, b).

 

Table Option: It always shows counts for 1-5 scale of "interval scale variable" in the Tables option in SPSS.


Crosstabs Option: With
Crosstabs option in descriptive stat, it always treat row and categories as categorical variables hence not able to use that option as well.  

 

How to create such a table in SPSS (an example is shown below)?

 

Categorical variable

C1

A

B

Interval Scale Variables

v1

4.3

3.3

v2

2.3

3.9

 

 

Thanks a lot for any help in advance.

 

Best regards,
Sanjay

from

Tokyo

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

Re: A table of "Mean scores" for "various categories" of a categorical variable!

Jon Peck
In reply to this post by Sanjay Seth, MBA, Ph.D.-2
CTABLES uses the measurement level of a variable to determine the table structure, so make it scale or specify [S] in the TABLE subcommand.  Or use MEANS or SUMMARIZE.

On Sat, Sep 15, 2018 at 10:42 PM Sanjay Seth, MBA, Ph.D. <[hidden email]> wrote:

Hello Everybody,

 

I was trying to create a table of several interval scale variables (v1, v2) of mean scores for various categories of a categorial variable (c1, with two categories a, b).

 

Table Option: It always shows counts for 1-5 scale of "interval scale variable" in the Tables option in SPSS.


Crosstabs Option: With
Crosstabs option in descriptive stat, it always treat row and categories as categorical variables hence not able to use that option as well.  

 

How to create such a table in SPSS (an example is shown below)?

 

Categorical variable

C1

A

B

Interval Scale Variables

v1

4.3

3.3

v2

2.3

3.9

 

 

Thanks a lot for any help in advance.

 

Best regards,
Sanjay

from

Tokyo

===================== 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
--
Jon K Peck
[hidden email]

===================== 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: A table of "Mean scores" for "various categories" of a categorical variable!

Javier Figueroa
Hello!!!

I hope this helps you, below an example of what I think I want to generate.

* Tablas personalizadas.
CTABLES
  /VLABELS VARIABLES=p32 p33 p34 p35 p36 p37 DISPLAY=DEFAULT
  /TABLE p32 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p33 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p34 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p35 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p36 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p37 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]]
  /CLABELS ROWLABELS=OPPOSITE
  /CATEGORIES VARIABLES=p32 p33 p34 p35 p36 p37 ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=AFTER MISSING=EXCLUDE.


this is the result of the syntax

  (1) Muy insatisfecho (2) (3) (4) (5) Muy satisfecho Total
Recuento Recuento Recuento Recuento Recuento Recuento Media
p32 Estación de comida 11 16 132 178 164 501 3.93
p33 Parqueo 17 30 54 61 269 431 4.24
p34 Acceso a carreteras 20 88 195 167 241 711 3.73
p35 Transporte público 35 62 143 107 58 405 3.22
p36 Facilidades para personas con necesidades especiales 184 97 65 31 39 416 2.14
p37 Servicios de primeros auxilios 29 15 52 35 50 181 3.34

Sincerely,

El dom., 16 sept. 2018 a las 11:55, Jon Peck (<[hidden email]>) escribió:
CTABLES uses the measurement level of a variable to determine the table structure, so make it scale or specify [S] in the TABLE subcommand.  Or use MEANS or SUMMARIZE.

On Sat, Sep 15, 2018 at 10:42 PM Sanjay Seth, MBA, Ph.D. <[hidden email]> wrote:

Hello Everybody,

 

I was trying to create a table of several interval scale variables (v1, v2) of mean scores for various categories of a categorial variable (c1, with two categories a, b).

 

Table Option: It always shows counts for 1-5 scale of "interval scale variable" in the Tables option in SPSS.


Crosstabs Option: With
Crosstabs option in descriptive stat, it always treat row and categories as categorical variables hence not able to use that option as well.  

 

How to create such a table in SPSS (an example is shown below)?

 

Categorical variable

C1

A

B

Interval Scale Variables

v1

4.3

3.3

v2

2.3

3.9

 

 

Thanks a lot for any help in advance.

 

Best regards,
Sanjay

from

Tokyo

===================== 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
--
Jon K Peck
[hidden email]

===================== 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


--
Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184

===================== 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: A table of "Mean scores" for "various categories" of a categorical variable!

Jon Peck
Yes, your syntax generates that table.  You could, BTW, factor out the variables and write it like this.
/table (p32+p33+p34+p35+p36+p37)[count totals[count mean]

If what you want is just count and mean, you can treat these as scale variables like this, removing the CATEGORIES subcommand.
/table (p32+p33+p34+p35+p36+p37)[S][count totals[count mean]  

Your original post had a BY variable that does not appear in this syntax, so I'm not sure what you want, but you could add a BY variable at the end of the TABLE subcommand.



On Mon, Sep 17, 2018 at 10:15 AM Javier Figueroa <[hidden email]> wrote:
Hello!!!

I hope this helps you, below an example of what I think I want to generate.

* Tablas personalizadas.
CTABLES
  /VLABELS VARIABLES=p32 p33 p34 p35 p36 p37 DISPLAY=DEFAULT
  /TABLE p32 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p33 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p34 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p35 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p36 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p37 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]]
  /CLABELS ROWLABELS=OPPOSITE
  /CATEGORIES VARIABLES=p32 p33 p34 p35 p36 p37 ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=AFTER MISSING=EXCLUDE.


this is the result of the syntax

  (1) Muy insatisfecho (2) (3) (4) (5) Muy satisfecho Total
Recuento Recuento Recuento Recuento Recuento Recuento Media
p32 Estación de comida 11 16 132 178 164 501 3.93
p33 Parqueo 17 30 54 61 269 431 4.24
p34 Acceso a carreteras 20 88 195 167 241 711 3.73
p35 Transporte público 35 62 143 107 58 405 3.22
p36 Facilidades para personas con necesidades especiales 184 97 65 31 39 416 2.14
p37 Servicios de primeros auxilios 29 15 52 35 50 181 3.34

Sincerely,

El dom., 16 sept. 2018 a las 11:55, Jon Peck (<[hidden email]>) escribió:
CTABLES uses the measurement level of a variable to determine the table structure, so make it scale or specify [S] in the TABLE subcommand.  Or use MEANS or SUMMARIZE.

On Sat, Sep 15, 2018 at 10:42 PM Sanjay Seth, MBA, Ph.D. <[hidden email]> wrote:

Hello Everybody,

 

I was trying to create a table of several interval scale variables (v1, v2) of mean scores for various categories of a categorial variable (c1, with two categories a, b).

 

Table Option: It always shows counts for 1-5 scale of "interval scale variable" in the Tables option in SPSS.


Crosstabs Option: With
Crosstabs option in descriptive stat, it always treat row and categories as categorical variables hence not able to use that option as well.  

 

How to create such a table in SPSS (an example is shown below)?

 

Categorical variable

C1

A

B

Interval Scale Variables

v1

4.3

3.3

v2

2.3

3.9

 

 

Thanks a lot for any help in advance.

 

Best regards,
Sanjay

from

Tokyo

===================== 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
--
Jon K Peck
[hidden email]

===================== 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


--
Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184



--
Jon K Peck
[hidden email]

===================== 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: A table of "Mean scores" for "various categories" of a categorical variable!

Javier Figueroa
Thanks! 

El lun., 17 sept. 2018 a las 11:53, Jon Peck (<[hidden email]>) escribió:
Yes, your syntax generates that table.  You could, BTW, factor out the variables and write it like this.
/table (p32+p33+p34+p35+p36+p37)[count totals[count mean]

If what you want is just count and mean, you can treat these as scale variables like this, removing the CATEGORIES subcommand.
/table (p32+p33+p34+p35+p36+p37)[S][count totals[count mean]  

Your original post had a BY variable that does not appear in this syntax, so I'm not sure what you want, but you could add a BY variable at the end of the TABLE subcommand.



On Mon, Sep 17, 2018 at 10:15 AM Javier Figueroa <[hidden email]> wrote:
Hello!!!

I hope this helps you, below an example of what I think I want to generate.

* Tablas personalizadas.
CTABLES
  /VLABELS VARIABLES=p32 p33 p34 p35 p36 p37 DISPLAY=DEFAULT
  /TABLE p32 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p33 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p34 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p35 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p36 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
              p37 [COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]]
  /CLABELS ROWLABELS=OPPOSITE
  /CATEGORIES VARIABLES=p32 p33 p34 p35 p36 p37 ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=AFTER MISSING=EXCLUDE.


this is the result of the syntax

  (1) Muy insatisfecho (2) (3) (4) (5) Muy satisfecho Total
Recuento Recuento Recuento Recuento Recuento Recuento Media
p32 Estación de comida 11 16 132 178 164 501 3.93
p33 Parqueo 17 30 54 61 269 431 4.24
p34 Acceso a carreteras 20 88 195 167 241 711 3.73
p35 Transporte público 35 62 143 107 58 405 3.22
p36 Facilidades para personas con necesidades especiales 184 97 65 31 39 416 2.14
p37 Servicios de primeros auxilios 29 15 52 35 50 181 3.34

Sincerely,

El dom., 16 sept. 2018 a las 11:55, Jon Peck (<[hidden email]>) escribió:
CTABLES uses the measurement level of a variable to determine the table structure, so make it scale or specify [S] in the TABLE subcommand.  Or use MEANS or SUMMARIZE.

On Sat, Sep 15, 2018 at 10:42 PM Sanjay Seth, MBA, Ph.D. <[hidden email]> wrote:

Hello Everybody,

 

I was trying to create a table of several interval scale variables (v1, v2) of mean scores for various categories of a categorial variable (c1, with two categories a, b).

 

Table Option: It always shows counts for 1-5 scale of "interval scale variable" in the Tables option in SPSS.


Crosstabs Option: With
Crosstabs option in descriptive stat, it always treat row and categories as categorical variables hence not able to use that option as well.  

 

How to create such a table in SPSS (an example is shown below)?

 

Categorical variable

C1

A

B

Interval Scale Variables

v1

4.3

3.3

v2

2.3

3.9

 

 

Thanks a lot for any help in advance.

 

Best regards,
Sanjay

from

Tokyo

===================== 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
--
Jon K Peck
[hidden email]

===================== 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


--
Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184



--
Jon K Peck
[hidden email]



--
Javier Figueroa
Procesamiento y Análisis de bases de datos
Cel: 5927-4748 / 4970-1940
Casa: 2289-0184

===================== 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: A table of "Mean scores" for "various categories" of a categorical variable!

Bruce Weaver
Administrator
In reply to this post by Jon Peck
I'm not well versed in CTABLES, but I imagine [count totals[count mean] needs
a closing ].  I.e., it should be:

[count totals[count mean]]



Jon Peck wrote

> Yes, your syntax generates that table.  You could, BTW, factor out the
> variables and write it like this.
> /table (p32+p33+p34+p35+p36+p37)[count totals[count mean]
>
> If what you want is just count and mean, you can treat these as scale
> variables like this, removing the CATEGORIES subcommand.
> /table (p32+p33+p34+p35+p36+p37)[S][count totals[count mean]
>
> Your original post had a BY variable that does not appear in this syntax,
> so I'm not sure what you want, but you could add a BY variable at the end
> of the TABLE subcommand.
>
> --- snip ---





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).