SPSS CTABLE syntax - plz correct the code

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

SPSS CTABLE syntax - plz correct the code

jagadishpchary
Dear All,

My query is: I need to run a table in SPSS using the Ctable syntax in the
same format as stated in the below screen shot.
<http://spssx-discussion.1045642.n5.nabble.com/file/t340698/Table_format.jpg>
Also, I am attaching the SPSS code and data set which I am referring too.
Data.sav
<http://spssx-discussion.1045642.n5.nabble.com/file/t340698/Data.sav>  
Table_syntax.sps
<http://spssx-discussion.1045642.n5.nabble.com/file/t340698/Table_syntax.sps>  

Note that, I am able to successfully generate the table in the required
format however the results populated from SPSS using the attached syntax are
wrong.

Could anyone please correct the SPSS code so that the correct numbers are
populated.

FYI, attached the screen shot of the required table with correct results.
<http://spssx-discussion.1045642.n5.nabble.com/file/t340698/Table_output.jpg>

Many thanks for the help in advance.

Regards,
Jagadish




--
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: SPSS CTABLE syntax - plz correct the code

Jon Peck
Why do you think the results are wrong?  The PCOMPUTES, at least, look right to me.

On Sat, Jul 25, 2020 at 5:48 AM jagadishpchary <[hidden email]> wrote:
Dear All,

My query is: I need to run a table in SPSS using the Ctable syntax in the
same format as stated in the below screen shot.
<http://spssx-discussion.1045642.n5.nabble.com/file/t340698/Table_format.jpg>
Also, I am attaching the SPSS code and data set which I am referring too.
Data.sav
<http://spssx-discussion.1045642.n5.nabble.com/file/t340698/Data.sav
Table_syntax.sps
<http://spssx-discussion.1045642.n5.nabble.com/file/t340698/Table_syntax.sps

Note that, I am able to successfully generate the table in the required
format however the results populated from SPSS using the attached syntax are
wrong.

Could anyone please correct the SPSS code so that the correct numbers are
populated.

FYI, attached the screen shot of the required table with correct results.
<http://spssx-discussion.1045642.n5.nabble.com/file/t340698/Table_output.jpg>

Many thanks for the help in advance.

Regards,
Jagadish




--
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: SPSS CTABLE syntax - plz correct the code

jagadishpchary
The results are wrong - since the values across the each statement should add
to base value.



--
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: SPSS CTABLE syntax - plz correct the code

spss.giesel@yahoo.de
Hi. Your "Required Output" example looks weird. This is probably what you should get:

CTABLES
    /VLABELS VARIABLES=Q1r1 Q1r2 Q1r3 Q1r4 Q1r5 Q1r6 Q1r7 DISPLAY=NONE
    /PCOMPUTE &x1= EXPR([1]+[2])
    /PCOMPUTE &x2= EXPR([3]+[4]+[5])
    /PCOMPUTE &x3= EXPR([6]+[7])
    /PPROPERTIES &x1 LABEL = "B2B (NET)"
    /PPROPERTIES &x2 LABEL = "M3B (NET)"
    /PPROPERTIES &x3 LABEL = "T2B (NET)"
    /TABLE BY (Q1r1 + Q1r2 + Q1r3 + Q1r4 + Q1r5 + Q1r6 + Q1r7) [COUNT ""]
    /CLABELS COLLABELS=OPPOSITE
    /CATEGORIES VARIABLES=Q1r1 Q1r2 Q1r3 Q1r4 Q1r5 Q1r6 Q1r7 [1,2,3,4,5,6,7,&x3,&x2,&x1] TOTAL=YES POSITION=BEFORE.

Mario
Munich, Germany


Am Sonntag, 26. Juli 2020, 06:45:26 MESZ hat jagadishpchary <[hidden email]> Folgendes geschrieben:


The results are wrong - since the values across the each statement should add
to base value.




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

Re: SPSS CTABLE syntax - plz correct the code

Jon Peck
In reply to this post by jagadishpchary
I'm not clear on what you mean, but remember that multiple response sets can tally count or responses.  In particular, totals will be different.  For statement1, for example, the count statistic is 13 but there are 26 responses.

On Sat, Jul 25, 2020 at 10:44 PM jagadishpchary <[hidden email]> wrote:
The results are wrong - since the values across the each statement should add
to base value.



--
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: SPSS CTABLE syntax - plz correct the code

jagadishpchary
In reply to this post by spss.giesel@yahoo.de
Hi Mario,

Perfect, this worked for me.

Regards,
Jagadish



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