Quantcast

There must be something like loops ?

classic Classic list List threaded Threaded
11 messages Options
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

There must be something like loops ?

Rajeshms
Dear All,

I have a some 1000 formula and I need to generate tables for each formula separately. I am able to generate tables and graphs for individual formula using spss syntax repeatedly, but its taking too much time for me to complete all 1000 formula. 

I am sure there is something better solution for doing in one run for all formula, i am still trying to do. 


for example : Below is the sample data, where i need to generate tables for each formula separately. i.e for formula number 1 separate table, like that till formula 4. If anyone can help me with any looping syntax, then it will be great learning for my works. 

formula PT Gender
1 1 1
1 1 2
1 1 1
1 1 1
1 1 1
1 1 2
1 1 2
2 0 1
2 0 1
2 0 1
2 0 2
3 1 1
3 1 2
3 1 1
3 1 2
4 0 1
4 0 1
4 0 2
4 0 1

Thanks. 
Regards,

Rajesh M S




===================== 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
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: There must be something like loops ?

Bruce Weaver
Administrator
Rajesh, you've done well in providing some sample data.  But it would help a lot if you also showed your code to create the first two or three tables so that readers understand the nature of these formulae you're describing.  Maybe then someone will be able to suggest a better approach.


Rajeshms wrote
Dear All,

I have a some 1000 formula and I need to generate tables for each formula
separately. I am able to generate tables and graphs for individual formula
using spss syntax repeatedly, but its taking too much time for me to
complete all 1000 formula.

I am sure there is something better solution for doing in one run for all
formula, i am still trying to do.


for example : Below is the sample data, where i need to generate tables for
each formula separately. i.e for formula number 1 separate table, like that
till formula 4. If anyone can help me with any looping syntax, then it will
be great learning for my works.

formula PT Gender
1 1 1
1 1 2
1 1 1
1 1 1
1 1 1
1 1 2
1 1 2
2 0 1
2 0 1
2 0 1
2 0 2
3 1 1
3 1 2
3 1 1
3 1 2
4 0 1
4 0 1
4 0 2
4 0 1

Thanks.
Regards,

Rajesh M S

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

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: There must be something like loops ?

David Marso
Administrator
In reply to this post by Rajeshms
see DEFINE !ENDDEFINE commands and within that see !DO !DOEND block.
You could also probably utilize SPLIT FILE command.
As Bruce stated you would do well to post your core syntax.

Rajeshms wrote
Dear All,

I have a some 1000 formula and I need to generate tables for each formula
separately. I am able to generate tables and graphs for individual formula
using spss syntax repeatedly, but its taking too much time for me to
complete all 1000 formula.

I am sure there is something better solution for doing in one run for all
formula, i am still trying to do.


for example : Below is the sample data, where i need to generate tables for
each formula separately. i.e for formula number 1 separate table, like that
till formula 4. If anyone can help me with any looping syntax, then it will
be great learning for my works.

formula PT Gender
1 1 1
1 1 2
1 1 1
1 1 1
1 1 1
1 1 2
1 1 2
2 0 1
2 0 1
2 0 1
2 0 2
3 1 1
3 1 2
3 1 1
3 1 2
4 0 1
4 0 1
4 0 2
4 0 1

Thanks.
Regards,

Rajesh M S

=====================
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?"
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: There must be something like loops ?

Rich Ulrich
In reply to this post by Rajeshms

 - "formula" is the name of the variable but it evokes some wrong ideas among

those of us accustomed to writing an equation as a Formula.


If you asked, How do I generate 1000 tables for "experiment", values 1-1000,

the apparent answer would be SPLIT FILES.  Look at HELP to see options for

LAYERED and SEPARATE  to see if either of those fits your needs. 


--

Rich Ulrich


From: SPSSX(r) Discussion <[hidden email]> on behalf of Rajeshms <[hidden email]>
Sent: Tuesday, February 28, 2017 1:38:13 AM
To: [hidden email]
Subject: There must be something like loops ?
 
Dear All,

I have a some 1000 formula and I need to generate tables for each formula separately. I am able to generate tables and graphs for individual formula using spss syntax repeatedly, but its taking too much time for me to complete all 1000 formula. 

I am sure there is something better solution for doing in one run for all formula, i am still trying to do. 


for example : Below is the sample data, where i need to generate tables for each formula separately. i.e for formula number 1 separate table, like that till formula 4. If anyone can help me with any looping syntax, then it will be great learning for my works. 

formula PT Gender
1 1 1
1 1 2
1 1 1
1 1 1
1 1 1
1 1 2
1 1 2
2 0 1
2 0 1
2 0 1
2 0 2
3 1 1
3 1 2
3 1 1
3 1 2
4 0 1
4 0 1
4 0 2
4 0 1

Thanks. 
Regards,

Rajesh M S




===================== 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
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: There must be something like loops ?

David Marso
Administrator
Please note:
"• CTABLES ignores SPLIT FILE requests if layered splits (compare groups in the graphical user interface) are requested. You can compare groups by using the split variables at the highest nesting level for row variables. See the TABLE subcommand for nesting variables."

from within the labyrinth:
https://www.ibm.com/support/knowledgecenter/SSLVMB_21.0.0/com.ibm.spss.statistics.help/syn_ctables_overview.htm

Rich Ulrich wrote
- "formula" is the name of the variable but it evokes some wrong ideas among

those of us accustomed to writing an equation as a Formula.


If you asked, How do I generate 1000 tables for "experiment", values 1-1000,

the apparent answer would be SPLIT FILES.  Look at HELP to see options for

LAYERED and SEPARATE  to see if either of those fits your needs.


--

Rich Ulrich

________________________________
From: SPSSX(r) Discussion <[hidden email]> on behalf of Rajeshms <[hidden email]>
Sent: Tuesday, February 28, 2017 1:38:13 AM
To: [hidden email]
Subject: There must be something like loops ?

Dear All,

I have a some 1000 formula and I need to generate tables for each formula separately. I am able to generate tables and graphs for individual formula using spss syntax repeatedly, but its taking too much time for me to complete all 1000 formula.

I am sure there is something better solution for doing in one run for all formula, i am still trying to do.


for example : Below is the sample data, where i need to generate tables for each formula separately. i.e for formula number 1 separate table, like that till formula 4. If anyone can help me with any looping syntax, then it will be great learning for my works.

formula PT      Gender
1       1       1
1       1       2
1       1       1
1       1       1
1       1       1
1       1       2
1       1       2
2       0       1
2       0       1
2       0       1
2       0       2
3       1       1
3       1       2
3       1       1
3       1       2
4       0       1
4       0       1
4       0       2
4       0       1

Thanks.
Regards,

Rajesh M S




===================== To manage your subscription to SPSSX-L, send a message to [hidden email]<mailto:[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
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?"
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: There must be something like loops ?

Bruce Weaver
Administrator
In reply to this post by Rich Ulrich
Well-spotted, Rich.  I missed that completely!  

Rich Ulrich wrote
- "formula" is the name of the variable but it evokes some wrong ideas among

those of us accustomed to writing an equation as a Formula.


If you asked, How do I generate 1000 tables for "experiment", values 1-1000,

the apparent answer would be SPLIT FILES.  Look at HELP to see options for

LAYERED and SEPARATE  to see if either of those fits your needs.


--

Rich Ulrich

________________________________
From: SPSSX(r) Discussion <[hidden email]> on behalf of Rajeshms <[hidden email]>
Sent: Tuesday, February 28, 2017 1:38:13 AM
To: [hidden email]
Subject: There must be something like loops ?

Dear All,

I have a some 1000 formula and I need to generate tables for each formula separately. I am able to generate tables and graphs for individual formula using spss syntax repeatedly, but its taking too much time for me to complete all 1000 formula.

I am sure there is something better solution for doing in one run for all formula, i am still trying to do.


for example : Below is the sample data, where i need to generate tables for each formula separately. i.e for formula number 1 separate table, like that till formula 4. If anyone can help me with any looping syntax, then it will be great learning for my works.

formula PT      Gender
1       1       1
1       1       2
1       1       1
1       1       1
1       1       1
1       1       2
1       1       2
2       0       1
2       0       1
2       0       1
2       0       2
3       1       1
3       1       2
3       1       1
3       1       2
4       0       1
4       0       1
4       0       2
4       0       1

Thanks.
Regards,

Rajesh M S




===================== To manage your subscription to SPSSX-L, send a message to [hidden email]<mailto:[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
--
Bruce Weaver
bweaver@lakeheadu.ca
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.
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: There must be something like loops ?

Jon Peck
In reply to this post by David Marso
CTABLES ignores SPLIT FILE LAYERED because it is redundant.  You would express this in CTABLES by something like
  /TABLE educ BY gender BY jobcat

Note that the variable measurement levels matter in CTABLES unless overridden but not in SPLIT FILES.

However, a table with 1000 layers is not likely to be very useful.  SPLIT FILE SEPARATE would probably be a better choice.

Note also  that if there are batches of output that need to be grouped, SPLIT FILES won't work, because all the splits for each table will be produced before the next procedure is processed.  The SPSSINC PROCESS FILES extension command, usually used with SPSSINC SPLIT DATASET, can be used to group splits of a set of procedures together in one or separate Viewer files.

On Tue, Feb 28, 2017 at 10:49 AM, David Marso <[hidden email]> wrote:
Please note:
"• CTABLES ignores SPLIT FILE requests if layered splits (compare groups in
the graphical user interface) are requested. You can compare groups by using
the split variables at the highest nesting level for row variables. See the
TABLE subcommand for nesting variables."

from within the labyrinth:
https://www.ibm.com/support/knowledgecenter/SSLVMB_21.0.0/com.ibm.spss.statistics.help/syn_ctables_overview.htm


Rich Ulrich wrote
> - "formula" is the name of the variable but it evokes some wrong ideas
> among
>
> those of us accustomed to writing an equation as a Formula.
>
>
> If you asked, How do I generate 1000 tables for "experiment", values
> 1-1000,
>
> the apparent answer would be SPLIT FILES.  Look at HELP to see options for
>
> LAYERED and SEPARATE  to see if either of those fits your needs.
>
>
> --
>
> Rich Ulrich
>
> ________________________________
> From: SPSSX(r) Discussion &lt;

> SPSSX-L@.UGA

> &gt; on behalf of Rajeshms &lt;

> getrajeshms@

> &gt;
> Sent: Tuesday, February 28, 2017 1:38:13 AM
> To:

> SPSSX-L@.UGA

> Subject: There must be something like loops ?
>
> Dear All,
>
> I have a some 1000 formula and I need to generate tables for each formula
> separately. I am able to generate tables and graphs for individual formula
> using spss syntax repeatedly, but its taking too much time for me to
> complete all 1000 formula.
>
> I am sure there is something better solution for doing in one run for all
> formula, i am still trying to do.
>
>
> for example : Below is the sample data, where i need to generate tables
> for each formula separately. i.e for formula number 1 separate table, like
> that till formula 4. If anyone can help me with any looping syntax, then
> it will be great learning for my works.
>
> formula PT      Gender
> 1       1       1
> 1       1       2
> 1       1       1
> 1       1       1
> 1       1       1
> 1       1       2
> 1       1       2
> 2       0       1
> 2       0       1
> 2       0       1
> 2       0       2
> 3       1       1
> 3       1       2
> 3       1       1
> 3       1       2
> 4       0       1
> 4       0       1
> 4       0       2
> 4       0       1
>
> Thanks.
> Regards,
>
> Rajesh M S
>
>
>
>
> ===================== To manage your subscription to SPSSX-L, send a
> message to

> LISTSERV@.UGA

> &lt;mailto:

> LISTSERV@.UGA

> &gt; (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

> 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?"
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/There-must-be-something-like-loops-tp5733907p5733915.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



--
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
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: There must be something like loops ?

Rajeshms
Hi All,

Thanks a lot for sharing knowledge. I would like to be more clear with following syntax : 

CTABLES
  /VLABELS VARIABLES=Constituents OptivaNo ofSubjectscompletedthetest 
    ofSUBJECTSwithConfirmedallergyinHRIPTtest Product_Type Weight DISPLAY=LABEL
  /TABLE Constituents [C] BY OptivaNo [C][COUNT F40.0] + ofSubjectscompletedthetest [S][SUM] + 
    ofSUBJECTSwithConfirmedallergyinHRIPTtest [S][SUM] + Product_Type [C] > Weight [S][MAXIMUM]
  /CATEGORIES VARIABLES=Constituents Product_Type ORDER=A KEY=VALUE EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=OptivaNo ORDER=A KEY=VALUE EMPTY=EXCLUDE TOTAL=YES POSITION=AFTER
  /TITLES
    TITLE='HRIPT INCI Profile'.

So to be clear my variable "OptivaNo" contains list of cases (max case = 500). The data set look like as follows (showing only first two variables OptivaNo and Constitients) :

OptivaNo  Constituents  .......etc 
FML_123  glycerin
FML_123  water
FML_123  cetyl alcohol
FML_999  water
FMl_999   perfum
FMl_896   BPO
FMl_896   CI12345
FMl_458   glycerin

I was trying to generate tables syntax pasted above for each unique OptivaNo. As split file based on OptivaNo fails, how can we do this ? Since the table generated is huge because it shows all OptivaNo column wise, i did this because i wanted the total count of OptivaNo used for each Constituents.

Kindly help me to get solution. Thanks a lot for all SPSS Gurus. 

Best,
Rajesh M S

Regards,

Rajesh M S





On Tue, Feb 28, 2017 at 11:58 PM, Jon Peck <[hidden email]> wrote:
CTABLES ignores SPLIT FILE LAYERED because it is redundant.  You would express this in CTABLES by something like
  /TABLE educ BY gender BY jobcat

Note that the variable measurement levels matter in CTABLES unless overridden but not in SPLIT FILES.

However, a table with 1000 layers is not likely to be very useful.  SPLIT FILE SEPARATE would probably be a better choice.

Note also  that if there are batches of output that need to be grouped, SPLIT FILES won't work, because all the splits for each table will be produced before the next procedure is processed.  The SPSSINC PROCESS FILES extension command, usually used with SPSSINC SPLIT DATASET, can be used to group splits of a set of procedures together in one or separate Viewer files.

On Tue, Feb 28, 2017 at 10:49 AM, David Marso <[hidden email]> wrote:
Please note:
"• CTABLES ignores SPLIT FILE requests if layered splits (compare groups in
the graphical user interface) are requested. You can compare groups by using
the split variables at the highest nesting level for row variables. See the
TABLE subcommand for nesting variables."

from within the labyrinth:
https://www.ibm.com/support/knowledgecenter/SSLVMB_21.0.0/com.ibm.spss.statistics.help/syn_ctables_overview.htm


Rich Ulrich wrote
> - "formula" is the name of the variable but it evokes some wrong ideas
> among
>
> those of us accustomed to writing an equation as a Formula.
>
>
> If you asked, How do I generate 1000 tables for "experiment", values
> 1-1000,
>
> the apparent answer would be SPLIT FILES.  Look at HELP to see options for
>
> LAYERED and SEPARATE  to see if either of those fits your needs.
>
>
> --
>
> Rich Ulrich
>
> ________________________________
> From: SPSSX(r) Discussion &lt;

> SPSSX-L@.UGA

> &gt; on behalf of Rajeshms &lt;

> getrajeshms@

> &gt;
> Sent: Tuesday, February 28, 2017 1:38:13 AM
> To:

> SPSSX-L@.UGA

> Subject: There must be something like loops ?
>
> Dear All,
>
> I have a some 1000 formula and I need to generate tables for each formula
> separately. I am able to generate tables and graphs for individual formula
> using spss syntax repeatedly, but its taking too much time for me to
> complete all 1000 formula.
>
> I am sure there is something better solution for doing in one run for all
> formula, i am still trying to do.
>
>
> for example : Below is the sample data, where i need to generate tables
> for each formula separately. i.e for formula number 1 separate table, like
> that till formula 4. If anyone can help me with any looping syntax, then
> it will be great learning for my works.
>
> formula PT      Gender
> 1       1       1
> 1       1       2
> 1       1       1
> 1       1       1
> 1       1       1
> 1       1       2
> 1       1       2
> 2       0       1
> 2       0       1
> 2       0       1
> 2       0       2
> 3       1       1
> 3       1       2
> 3       1       1
> 3       1       2
> 4       0       1
> 4       0       1
> 4       0       2
> 4       0       1
>
> Thanks.
> Regards,
>
> Rajesh M S
>
>
>
>
> ===================== To manage your subscription to SPSSX-L, send a
> message to

> LISTSERV@.UGA

> &lt;mailto:

> LISTSERV@.UGA

> &gt; (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

> 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?"
--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/There-must-be-something-like-loops-tp5733907p5733915.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



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

===================== 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
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: There must be something like loops ?

David Marso
Administrator
"As split file based on OptivaNo fails"???
Please elaborate on this statement.
USE SORT CASES BY OptivaNo .
SPLIT FILE BY OptivaNo .
REMOVE OptivaNo  from the CTABLES command.
Presto.
---
Rajeshms wrote
Hi All,

Thanks a lot for sharing knowledge. I would like to be more clear with
following syntax :

*CTABLES*
*  /VLABELS VARIABLES=Constituents OptivaNo ofSubjectscompletedthetest *
*    ofSUBJECTSwithConfirmedallergyinHRIPTtest Product_Type Weight
DISPLAY=LABEL*
*  /TABLE Constituents [C] BY OptivaNo [C][COUNT F40.0] +
ofSubjectscompletedthetest [S][SUM] + *
*    ofSUBJECTSwithConfirmedallergyinHRIPTtest [S][SUM] + Product_Type [C]
> Weight [S][MAXIMUM]*
*  /CATEGORIES VARIABLES=Constituents Product_Type ORDER=A KEY=VALUE
EMPTY=EXCLUDE*
*  /CATEGORIES VARIABLES=OptivaNo ORDER=A KEY=VALUE EMPTY=EXCLUDE TOTAL=YES
POSITION=AFTER*
*  /TITLES*
*    TITLE='HRIPT INCI Profile'.*

So to be clear my variable "OptivaNo" contains list of cases (max case =
500). The data set look like as follows (showing only first two variables
OptivaNo and Constitients) :

OptivaNo  Constituents  .......etc
FML_123  glycerin
FML_123  water
FML_123  cetyl alcohol
FML_999  water
FMl_999   perfum
FMl_896   BPO
FMl_896   CI12345
FMl_458   glycerin

I was trying to generate tables syntax pasted above for each unique
OptivaNo. As split file based on OptivaNo fails, how can we do this ? Since
the table generated is huge because it shows all OptivaNo column wise, i
did this because i wanted the total count of OptivaNo used for each
Constituents.

Kindly help me to get solution. Thanks a lot for all SPSS Gurus.

Best,
Rajesh M S

Regards,

Rajesh M S





On Tue, Feb 28, 2017 at 11:58 PM, Jon Peck <[hidden email]> wrote:

> CTABLES ignores SPLIT FILE LAYERED because it is redundant.  You would
> express this in CTABLES by something like
>   /TABLE educ BY gender BY jobcat
>
> Note that the variable measurement levels matter in CTABLES unless
> overridden but not in SPLIT FILES.
>
> However, a table with 1000 layers is not likely to be very useful.  SPLIT
> FILE SEPARATE would probably be a better choice.
>
> Note also  that if there are batches of output that need to be grouped,
> SPLIT FILES won't work, because all the splits for each table will be
> produced before the next procedure is processed.  The SPSSINC PROCESS FILES
> extension command, usually used with SPSSINC SPLIT DATASET, can be used to
> group splits of a set of procedures together in one or separate Viewer
> files.
>
> On Tue, Feb 28, 2017 at 10:49 AM, David Marso <[hidden email]>
> wrote:
>
>> Please note:
>> "• CTABLES ignores SPLIT FILE requests if layered splits (compare groups
>> in
>> the graphical user interface) are requested. You can compare groups by
>> using
>> the split variables at the highest nesting level for row variables. See
>> the
>> TABLE subcommand for nesting variables."
>>
>> from within the labyrinth:
>> https://www.ibm.com/support/knowledgecenter/SSLVMB_21.0.0/co
>> m.ibm.spss.statistics.help/syn_ctables_overview.htm
>>
>>
>> Rich Ulrich wrote
>> > - "formula" is the name of the variable but it evokes some wrong ideas
>> > among
>> >
>> > those of us accustomed to writing an equation as a Formula.
>> >
>> >
>> > If you asked, How do I generate 1000 tables for "experiment", values
>> > 1-1000,
>> >
>> > the apparent answer would be SPLIT FILES.  Look at HELP to see options
>> for
>> >
>> > LAYERED and SEPARATE  to see if either of those fits your needs.
>> >
>> >
>> > --
>> >
>> > Rich Ulrich
>> >
>> > ________________________________
>> > From: SPSSX(r) Discussion <
>>
>> > SPSSX-L@.UGA
>>
>> > > on behalf of Rajeshms <
>>
>> > getrajeshms@
>>
>> > >
>> > Sent: Tuesday, February 28, 2017 1:38:13 AM
>> > To:
>>
>> > SPSSX-L@.UGA
>>
>> > Subject: There must be something like loops ?
>> >
>> > Dear All,
>> >
>> > I have a some 1000 formula and I need to generate tables for each
>> formula
>> > separately. I am able to generate tables and graphs for individual
>> formula
>> > using spss syntax repeatedly, but its taking too much time for me to
>> > complete all 1000 formula.
>> >
>> > I am sure there is something better solution for doing in one run for
>> all
>> > formula, i am still trying to do.
>> >
>> >
>> > for example : Below is the sample data, where i need to generate tables
>> > for each formula separately. i.e for formula number 1 separate table,
>> like
>> > that till formula 4. If anyone can help me with any looping syntax, then
>> > it will be great learning for my works.
>> >
>> > formula PT      Gender
>> > 1       1       1
>> > 1       1       2
>> > 1       1       1
>> > 1       1       1
>> > 1       1       1
>> > 1       1       2
>> > 1       1       2
>> > 2       0       1
>> > 2       0       1
>> > 2       0       1
>> > 2       0       2
>> > 3       1       1
>> > 3       1       2
>> > 3       1       1
>> > 3       1       2
>> > 4       0       1
>> > 4       0       1
>> > 4       0       2
>> > 4       0       1
>> >
>> > Thanks.
>> > Regards,
>> >
>> > Rajesh M S
>> >
>> >
>> >
>> >
>> > ===================== To manage your subscription to SPSSX-L, send a
>> > message to
>>
>> > LISTSERV@.UGA
>>
>> > <mailto:
>>
>> > 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
>> >
>> > =====================
>> > 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?"
>> --
>> View this message in context: http://spssx-discussion.104564
>> 2.n5.nabble.com/There-must-be-something-like-loops-tp5733907p5733915.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
>>
>
>
>
> --
> 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
>

=====================
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?"
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: There must be something like loops ?

David Marso
Administrator
That should read

SPLIT FILE SEPARATE BY OptivaNo.

IIRC LAYERED is the default.

David Marso wrote
"As split file based on OptivaNo fails"???
Please elaborate on this statement.
USE SORT CASES BY OptivaNo .
SPLIT FILE BY OptivaNo .
REMOVE OptivaNo  from the CTABLES command.
Presto.
---
Rajeshms wrote
Hi All,

Thanks a lot for sharing knowledge. I would like to be more clear with
following syntax :

*CTABLES*
*  /VLABELS VARIABLES=Constituents OptivaNo ofSubjectscompletedthetest *
*    ofSUBJECTSwithConfirmedallergyinHRIPTtest Product_Type Weight
DISPLAY=LABEL*
*  /TABLE Constituents [C] BY OptivaNo [C][COUNT F40.0] +
ofSubjectscompletedthetest [S][SUM] + *
*    ofSUBJECTSwithConfirmedallergyinHRIPTtest [S][SUM] + Product_Type [C]
> Weight [S][MAXIMUM]*
*  /CATEGORIES VARIABLES=Constituents Product_Type ORDER=A KEY=VALUE
EMPTY=EXCLUDE*
*  /CATEGORIES VARIABLES=OptivaNo ORDER=A KEY=VALUE EMPTY=EXCLUDE TOTAL=YES
POSITION=AFTER*
*  /TITLES*
*    TITLE='HRIPT INCI Profile'.*

So to be clear my variable "OptivaNo" contains list of cases (max case =
500). The data set look like as follows (showing only first two variables
OptivaNo and Constitients) :

OptivaNo  Constituents  .......etc
FML_123  glycerin
FML_123  water
FML_123  cetyl alcohol
FML_999  water
FMl_999   perfum
FMl_896   BPO
FMl_896   CI12345
FMl_458   glycerin

I was trying to generate tables syntax pasted above for each unique
OptivaNo. As split file based on OptivaNo fails, how can we do this ? Since
the table generated is huge because it shows all OptivaNo column wise, i
did this because i wanted the total count of OptivaNo used for each
Constituents.

Kindly help me to get solution. Thanks a lot for all SPSS Gurus.

Best,
Rajesh M S

Regards,

Rajesh M S





On Tue, Feb 28, 2017 at 11:58 PM, Jon Peck <[hidden email]> wrote:

> CTABLES ignores SPLIT FILE LAYERED because it is redundant.  You would
> express this in CTABLES by something like
>   /TABLE educ BY gender BY jobcat
>
> Note that the variable measurement levels matter in CTABLES unless
> overridden but not in SPLIT FILES.
>
> However, a table with 1000 layers is not likely to be very useful.  SPLIT
> FILE SEPARATE would probably be a better choice.
>
> Note also  that if there are batches of output that need to be grouped,
> SPLIT FILES won't work, because all the splits for each table will be
> produced before the next procedure is processed.  The SPSSINC PROCESS FILES
> extension command, usually used with SPSSINC SPLIT DATASET, can be used to
> group splits of a set of procedures together in one or separate Viewer
> files.
>
> On Tue, Feb 28, 2017 at 10:49 AM, David Marso <[hidden email]>
> wrote:
>
>> Please note:
>> "• CTABLES ignores SPLIT FILE requests if layered splits (compare groups
>> in
>> the graphical user interface) are requested. You can compare groups by
>> using
>> the split variables at the highest nesting level for row variables. See
>> the
>> TABLE subcommand for nesting variables."
>>
>> from within the labyrinth:
>> https://www.ibm.com/support/knowledgecenter/SSLVMB_21.0.0/co
>> m.ibm.spss.statistics.help/syn_ctables_overview.htm
>>
>>
>> Rich Ulrich wrote
>> > - "formula" is the name of the variable but it evokes some wrong ideas
>> > among
>> >
>> > those of us accustomed to writing an equation as a Formula.
>> >
>> >
>> > If you asked, How do I generate 1000 tables for "experiment", values
>> > 1-1000,
>> >
>> > the apparent answer would be SPLIT FILES.  Look at HELP to see options
>> for
>> >
>> > LAYERED and SEPARATE  to see if either of those fits your needs.
>> >
>> >
>> > --
>> >
>> > Rich Ulrich
>> >
>> > ________________________________
>> > From: SPSSX(r) Discussion <
>>
>> > SPSSX-L@.UGA
>>
>> > > on behalf of Rajeshms <
>>
>> > getrajeshms@
>>
>> > >
>> > Sent: Tuesday, February 28, 2017 1:38:13 AM
>> > To:
>>
>> > SPSSX-L@.UGA
>>
>> > Subject: There must be something like loops ?
>> >
>> > Dear All,
>> >
>> > I have a some 1000 formula and I need to generate tables for each
>> formula
>> > separately. I am able to generate tables and graphs for individual
>> formula
>> > using spss syntax repeatedly, but its taking too much time for me to
>> > complete all 1000 formula.
>> >
>> > I am sure there is something better solution for doing in one run for
>> all
>> > formula, i am still trying to do.
>> >
>> >
>> > for example : Below is the sample data, where i need to generate tables
>> > for each formula separately. i.e for formula number 1 separate table,
>> like
>> > that till formula 4. If anyone can help me with any looping syntax, then
>> > it will be great learning for my works.
>> >
>> > formula PT      Gender
>> > 1       1       1
>> > 1       1       2
>> > 1       1       1
>> > 1       1       1
>> > 1       1       1
>> > 1       1       2
>> > 1       1       2
>> > 2       0       1
>> > 2       0       1
>> > 2       0       1
>> > 2       0       2
>> > 3       1       1
>> > 3       1       2
>> > 3       1       1
>> > 3       1       2
>> > 4       0       1
>> > 4       0       1
>> > 4       0       2
>> > 4       0       1
>> >
>> > Thanks.
>> > Regards,
>> >
>> > Rajesh M S
>> >
>> >
>> >
>> >
>> > ===================== To manage your subscription to SPSSX-L, send a
>> > message to
>>
>> > LISTSERV@.UGA
>>
>> > <mailto:
>>
>> > 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
>> >
>> > =====================
>> > 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?"
>> --
>> View this message in context: http://spssx-discussion.104564
>> 2.n5.nabble.com/There-must-be-something-like-loops-tp5733907p5733915.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
>>
>
>
>
> --
> 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
>

=====================
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?"
Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: There must be something like loops ?

Bruce Weaver
Administrator
Yes, LAYERED is the default.

https://www.ibm.com/support/knowledgecenter/SSLVMB_20.0.0/com.ibm.spss.statistics.help/syn_split_file.htm


David Marso wrote
That should read

SPLIT FILE SEPARATE BY OptivaNo.

IIRC LAYERED is the default.

David Marso wrote
"As split file based on OptivaNo fails"???
Please elaborate on this statement.
USE SORT CASES BY OptivaNo .
SPLIT FILE BY OptivaNo .
REMOVE OptivaNo  from the CTABLES command.
Presto.
---
Rajeshms wrote
Hi All,

Thanks a lot for sharing knowledge. I would like to be more clear with
following syntax :

*CTABLES*
*  /VLABELS VARIABLES=Constituents OptivaNo ofSubjectscompletedthetest *
*    ofSUBJECTSwithConfirmedallergyinHRIPTtest Product_Type Weight
DISPLAY=LABEL*
*  /TABLE Constituents [C] BY OptivaNo [C][COUNT F40.0] +
ofSubjectscompletedthetest [S][SUM] + *
*    ofSUBJECTSwithConfirmedallergyinHRIPTtest [S][SUM] + Product_Type [C]
> Weight [S][MAXIMUM]*
*  /CATEGORIES VARIABLES=Constituents Product_Type ORDER=A KEY=VALUE
EMPTY=EXCLUDE*
*  /CATEGORIES VARIABLES=OptivaNo ORDER=A KEY=VALUE EMPTY=EXCLUDE TOTAL=YES
POSITION=AFTER*
*  /TITLES*
*    TITLE='HRIPT INCI Profile'.*

So to be clear my variable "OptivaNo" contains list of cases (max case =
500). The data set look like as follows (showing only first two variables
OptivaNo and Constitients) :

OptivaNo  Constituents  .......etc
FML_123  glycerin
FML_123  water
FML_123  cetyl alcohol
FML_999  water
FMl_999   perfum
FMl_896   BPO
FMl_896   CI12345
FMl_458   glycerin

I was trying to generate tables syntax pasted above for each unique
OptivaNo. As split file based on OptivaNo fails, how can we do this ? Since
the table generated is huge because it shows all OptivaNo column wise, i
did this because i wanted the total count of OptivaNo used for each
Constituents.

Kindly help me to get solution. Thanks a lot for all SPSS Gurus.

Best,
Rajesh M S

Regards,

Rajesh M S





On Tue, Feb 28, 2017 at 11:58 PM, Jon Peck <[hidden email]> wrote:

> CTABLES ignores SPLIT FILE LAYERED because it is redundant.  You would
> express this in CTABLES by something like
>   /TABLE educ BY gender BY jobcat
>
> Note that the variable measurement levels matter in CTABLES unless
> overridden but not in SPLIT FILES.
>
> However, a table with 1000 layers is not likely to be very useful.  SPLIT
> FILE SEPARATE would probably be a better choice.
>
> Note also  that if there are batches of output that need to be grouped,
> SPLIT FILES won't work, because all the splits for each table will be
> produced before the next procedure is processed.  The SPSSINC PROCESS FILES
> extension command, usually used with SPSSINC SPLIT DATASET, can be used to
> group splits of a set of procedures together in one or separate Viewer
> files.
>
> On Tue, Feb 28, 2017 at 10:49 AM, David Marso <[hidden email]>
> wrote:
>
>> Please note:
>> "• CTABLES ignores SPLIT FILE requests if layered splits (compare groups
>> in
>> the graphical user interface) are requested. You can compare groups by
>> using
>> the split variables at the highest nesting level for row variables. See
>> the
>> TABLE subcommand for nesting variables."
>>
>> from within the labyrinth:
>> https://www.ibm.com/support/knowledgecenter/SSLVMB_21.0.0/co
>> m.ibm.spss.statistics.help/syn_ctables_overview.htm
>>
>>
>> Rich Ulrich wrote
>> > - "formula" is the name of the variable but it evokes some wrong ideas
>> > among
>> >
>> > those of us accustomed to writing an equation as a Formula.
>> >
>> >
>> > If you asked, How do I generate 1000 tables for "experiment", values
>> > 1-1000,
>> >
>> > the apparent answer would be SPLIT FILES.  Look at HELP to see options
>> for
>> >
>> > LAYERED and SEPARATE  to see if either of those fits your needs.
>> >
>> >
>> > --
>> >
>> > Rich Ulrich
>> >
>> > ________________________________
>> > From: SPSSX(r) Discussion <
>>
>> > SPSSX-L@.UGA
>>
>> > > on behalf of Rajeshms <
>>
>> > getrajeshms@
>>
>> > >
>> > Sent: Tuesday, February 28, 2017 1:38:13 AM
>> > To:
>>
>> > SPSSX-L@.UGA
>>
>> > Subject: There must be something like loops ?
>> >
>> > Dear All,
>> >
>> > I have a some 1000 formula and I need to generate tables for each
>> formula
>> > separately. I am able to generate tables and graphs for individual
>> formula
>> > using spss syntax repeatedly, but its taking too much time for me to
>> > complete all 1000 formula.
>> >
>> > I am sure there is something better solution for doing in one run for
>> all
>> > formula, i am still trying to do.
>> >
>> >
>> > for example : Below is the sample data, where i need to generate tables
>> > for each formula separately. i.e for formula number 1 separate table,
>> like
>> > that till formula 4. If anyone can help me with any looping syntax, then
>> > it will be great learning for my works.
>> >
>> > formula PT      Gender
>> > 1       1       1
>> > 1       1       2
>> > 1       1       1
>> > 1       1       1
>> > 1       1       1
>> > 1       1       2
>> > 1       1       2
>> > 2       0       1
>> > 2       0       1
>> > 2       0       1
>> > 2       0       2
>> > 3       1       1
>> > 3       1       2
>> > 3       1       1
>> > 3       1       2
>> > 4       0       1
>> > 4       0       1
>> > 4       0       2
>> > 4       0       1
>> >
>> > Thanks.
>> > Regards,
>> >
>> > Rajesh M S
>> >
>> >
>> >
>> >
>> > ===================== To manage your subscription to SPSSX-L, send a
>> > message to
>>
>> > LISTSERV@.UGA
>>
>> > <mailto:
>>
>> > 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
>> >
>> > =====================
>> > 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?"
>> --
>> View this message in context: http://spssx-discussion.104564
>> 2.n5.nabble.com/There-must-be-something-like-loops-tp5733907p5733915.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
>>
>
>
>
> --
> 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
>

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

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