How to calculate mean score in summary tables

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

How to calculate mean score in summary tables

Satish
Hi There

Can someone help me to calculate mean score for attached table named "Mean
score placement" cell highlighted in yellow. I am able to calculate %
successfully but not able to calculate means. Here is syntax for your
reference.

Thanks in advance

Test.sav
<http://spssx-discussion.1045642.n5.nabble.com/file/t341630/Test.sav>  

Mean_score_placement.xlsx
<http://spssx-discussion.1045642.n5.nabble.com/file/t341630/Mean_score_placement.xlsx>  


CTABLES
    /VLABELS VARIABLES=T_Q32_1 T_Q32_2 T_Q32_3 T_Q32_4 T_Q32_5 T_Q32_6
DISPLAY=DEFAULT
    /PCOMPUTE &T2B= EXPR([4]+[5])
    /PCOMPUTE &B2B= EXPR([1]+[2])
    /PCOMPUTE &M3B= EXPR([3])
    /PPROPERTIES &T2B LABEL = "T2B"
    /PPROPERTIES &B2B LABEL = "B2B"
    /PPROPERTIES &M3B LABEL = "Rest Scale"
    /TABLE BY
(T_Q32_1[C]+T_Q32_2[C]+T_Q32_3[C]+T_Q32_4[C]+T_Q32_5[C]+T_Q32_6[C])
[COLPCT.COUNT F4.0 "%",TOTALS[COUNT"Base" F40.0]]
    /CLABELS COLLABELS=OPPOSITE
    /SLABELS POSITION=ROW
    /CATEGORIES VARIABLES=T_Q32_1 T_Q32_2 T_Q32_3 T_Q32_4 T_Q32_5 T_Q32_6
[1,2,3,4,5,&T2B,&B2B,&M3B] TOTAL=YES LABEL='Total' POSITION=BEFORE
    /TITLES
   TITLES="Summary Tables".





--
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
Reply | Threaded
Open this post in threaded view
|

Re: How to calculate mean score in summary tables

Jon Peck
Here's a start on this.  I didn't worry about the post computes.  I generated this from the CTABLES canvas, so it isn't as compact as it could be.
The trick is in the SLABELS and CLABELS subcommands.

CTABLES
  /TABLE BY T_Q32_1 [C][COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + T_Q32_2 [C][COUNT F40.0, 
    TOTALS[COUNT F40.0, MEAN F40.2]] + T_Q32_3 [C][COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + 
    T_Q32_4 [C][COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]] + T_Q32_5 [C][COUNT F40.0, TOTALS[COUNT 
    F40.0, MEAN F40.2]] + T_Q32_6 [C][COUNT F40.0, TOTALS[COUNT F40.0, MEAN F40.2]]
  /SLABELS POSITION=ROW
  /CLABELS COLLABELS=OPPOSITE
  /CATEGORIES VARIABLES=T_Q32_1 T_Q32_2 T_Q32_3 T_Q32_4 T_Q32_5 T_Q32_6 ORDER=A KEY=VALUE 
    EMPTY=INCLUDE TOTAL=YES POSITION=BEFORE.

On Mon, Apr 19, 2021 at 12:09 PM Satish <[hidden email]> wrote:
Hi There

Can someone help me to calculate mean score for attached table named "Mean
score placement" cell highlighted in yellow. I am able to calculate %
successfully but not able to calculate means. Here is syntax for your
reference.

Thanks in advance

Test.sav
<http://spssx-discussion.1045642.n5.nabble.com/file/t341630/Test.sav

Mean_score_placement.xlsx
<http://spssx-discussion.1045642.n5.nabble.com/file/t341630/Mean_score_placement.xlsx


CTABLES
    /VLABELS VARIABLES=T_Q32_1 T_Q32_2 T_Q32_3 T_Q32_4 T_Q32_5 T_Q32_6
DISPLAY=DEFAULT
    /PCOMPUTE &T2B= EXPR([4]+[5])
    /PCOMPUTE &B2B= EXPR([1]+[2])
    /PCOMPUTE &M3B= EXPR([3])
    /PPROPERTIES &T2B LABEL = "T2B"
    /PPROPERTIES &B2B LABEL = "B2B"
    /PPROPERTIES &M3B LABEL = "Rest Scale"
    /TABLE BY
(T_Q32_1[C]+T_Q32_2[C]+T_Q32_3[C]+T_Q32_4[C]+T_Q32_5[C]+T_Q32_6[C])
[COLPCT.COUNT F4.0 "%",TOTALS[COUNT"Base" F40.0]]
    /CLABELS COLLABELS=OPPOSITE
    /SLABELS POSITION=ROW
    /CATEGORIES VARIABLES=T_Q32_1 T_Q32_2 T_Q32_3 T_Q32_4 T_Q32_5 T_Q32_6
[1,2,3,4,5,&T2B,&B2B,&M3B] TOTAL=YES LABEL='Total' POSITION=BEFORE
    /TITLES
   TITLES="Summary Tables".





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


--
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: How to calculate mean score in summary tables

Satish
Hi Jon,

Thanks for your suggestion. Yes, it can be one of the solution. But insights
team would required mean score along with PCOMPUTE TOP 2 BOX AND BOTTOM 2
BOX.

Please update if you will be able to get syntax along with PCOMPUTE.

Thanks & Regards





--
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
Reply | Threaded
Open this post in threaded view
|

Re: How to calculate mean score in summary tables

Muthukkumaran
HI,

The same summary tables along with top break (Banner) is also needed many times.

Thanks and Regards
Muthu

-----Original Message-----
From: SPSSX(r) Discussion <[hidden email]> On Behalf Of Satish
Sent: 21 April 2021 10:47
To: [hidden email]
Subject: Re: How to calculate mean score in summary tables

Hi Jon,

Thanks for your suggestion. Yes, it can be one of the solution. But insights team would required mean score along with PCOMPUTE TOP 2 BOX AND BOTTOM 2 BOX.

Please update if you will be able to get syntax along with PCOMPUTE.

Thanks & Regards





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

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