/DESTINATION

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

/DESTINATION

pspangler1
I am attempting to save a custom table as an sav file. I want to group cases on the email (string) variable and have columns with month(nominal) and gmv (scale). I am working with syntax from the from the ucla site (http://www.ats.ucla.edu/stat/spss/faq/oms.htm).

I have a very large dataset of 14M cases in long format. I want to create a new dataset with the sum of variable 'gmv' with 'month' as a new in wide format. Can I save a custom table as a new dataset?

oms  select tables
 /DESTINATION FORMAT = sav outfile = "C:\11 Main\Vendio\output_table.sav"
 /if commands = ['ctables'].
CTABLES
  /VLABELS VARIABLES=email gmv month DISPLAY=LABEL
  /TABLE email > gmv [SUM] BY month
  /CATEGORIES VARIABLES=email ORDER=A KEY=VALUE EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=month ORDER=A KEY=VALUE EMPTY=INCLUDE.
omsend.

This email may contain confidential information for the sole use of the intended recipient(s). If you are not an intended recipient, please notify the sender and delete all copies immediately.
Reply | Threaded
Open this post in threaded view
|

Re: /DESTINATION

Rick Oliver-3
I cannot tell if the CTABLES syntax will give you want you want. I would suggest trying it on a small sample to see if it looks like what you want.

The OMS should work fine as is, although just to make sure, I might use:

/if commands=['ctables'] subtypes=['Custom Table']

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]




From:        Peter Spangler <[hidden email]>
To:        [hidden email],
Date:        06/16/2014 09:35 AM
Subject:        /DESTINATION
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I am attempting to save a custom table as an sav file. I want to group cases on the email (string) variable and have columns with month(nominal) and gmv (scale). I am working with syntax from the from the ucla site (http://www.ats.ucla.edu/stat/spss/faq/oms.htm).

I have a very large dataset of 14M cases in long format. I want to create a new dataset with the sum of variable 'gmv' with 'month' as a new in wide format. Can I save a custom table as a new dataset?

oms  select tables
 /DESTINATION FORMAT = sav outfile = "C:\11 Main\Vendio\output_table.sav"
 /if commands = ['ctables'].
CTABLES
  /VLABELS VARIABLES=email gmv month DISPLAY=LABEL
  /TABLE email > gmv [SUM] BY month
  /CATEGORIES VARIABLES=email ORDER=A KEY=VALUE EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=month ORDER=A KEY=VALUE EMPTY=INCLUDE.
omsend.

This email may contain confidential information for the sole use of the intended recipient(s). If you are not an intended recipient, please notify the sender and delete all copies immediately.

Reply | Threaded
Open this post in threaded view
|

Re: /DESTINATION

David Marso
Administrator
In reply to this post by pspangler1

I believe AGGREGATE +CASESTOVARS would be much more efficient and would not require any OMS.
--
Peter Spangler-2 wrote
I am attempting to save a custom table as an sav file. I want to group
cases on the email (string) variable and have columns with month(nominal)
and gmv (scale). I am working with syntax from the from the ucla site (
http://www.ats.ucla.edu/stat/spss/faq/oms.htm).

I have a very large dataset of 14M cases in long format. I want to create a
new dataset with the sum of variable 'gmv' with 'month' as a new in wide
format. Can I save a custom table as a new dataset?

oms  select tables
 /DESTINATION FORMAT = sav outfile = "C:\11 Main\Vendio\output_table.sav"
 /if commands = ['ctables'].
CTABLES
  /VLABELS VARIABLES=email gmv month DISPLAY=LABEL
  /TABLE email > gmv [SUM] BY month
  /CATEGORIES VARIABLES=email ORDER=A KEY=VALUE EMPTY=EXCLUDE
  /CATEGORIES VARIABLES=month ORDER=A KEY=VALUE EMPTY=INCLUDE.
omsend.

--
This email may contain confidential information for the sole use of the
intended recipient(s). If you are not an intended recipient, please notify
the sender and delete all copies immediately.
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?"