struggling with OMS

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

struggling with OMS

Dominic Lusinchi
Dear colleagues,

I am having a difficult time with OMS. I am new to this feature of SPSS. I scanned through the Syntax Reference guide and the list serve archives but without success.

My issue. I am conducting a Friedman test and want to export the Ranks table to a *.sav file such that the variable names in the aforementioned table will be the variable names in the new data file and the mean ranks will be the values. Ideally I want to export more than one table such that each table will be a case in the new data file.

Currently I used this syntax for just one table:
OMS
  /SELECT TABLES
  /IF COMMANDS=['NPar Tests'] SUBTYPES=['Friedman Ranks'] LABELS =['Mean Rank']
  /DESTINATION FORMAT=SAV
   OUTFILE='C:\myfolder\myfile.sav'
  /COLUMNS SEQUENCE=[RALL CALL LALL].
OMSEND.

All this syntax provides is a data file with "Command_", "Subtype_" and "Label_" as variables but no data.

I assume that the OMS command reads the output (SPSS Viewer) currently open - that is where the results of the Friedman test are located.
The "[RALL CALL LALL]" puts all dimensions in a single row. That might be a problem since the Ranks table has two columns: one with the variables and the other with the ranks. I tried using DIMNAMES but without success. Perhaps I need to transpose rows and columns in the original table in Viewer?

Any suggestions would be much appreciated. Thanks in advance.

Best regards,
Dominic

Dominic Lusinchi
Far West Research
Statistical Consulting
San Francisco, California
415-664-3032
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: struggling with OMS

Pierre Tourigny
Hi Domonic,

OMS does not work on existing output like OUTPUT EXPORT. It's a new output stream.
You must put your table-producing procedure between the OMS and OMSEND commands.

Good luck,
Pierre Tourigny

On 2/20/2012 3:04 AM, Dominic Lusinchi wrote:
Dear colleagues,

I am having a difficult time with OMS. I am new to this feature of SPSS. I scanned through the Syntax Reference guide and the list serve archives but without success.

My issue. I am conducting a Friedman test and want to export the Ranks table to a *.sav file such that the variable names in the aforementioned table will be the variable names in the new data file and the mean ranks will be the values. Ideally I want to export more than one table such that each table will be a case in the new data file.

Currently I used this syntax for just one table:
OMS
� /SELECT TABLES
� /IF COMMANDS=['NPar Tests'] SUBTYPES=['Friedman Ranks'] LABELS =['Mean Rank']
� /DESTINATION FORMAT=SAV
� � OUTFILE='C:\myfolder\myfile.sav'
� /COLUMNS SEQUENCE=[RALL CALL LALL].
OMSEND.

All this syntax provides is a data file with "Command_", "Subtype_" and "Label_" as variables but no data.

I assume that the OMS command reads the output (SPSS Viewer) currently open - that is where the results of the Friedman test are located.
The "[RALL CALL LALL]" puts all dimensions in a single row. That might be a problem since the Ranks table has two columns: one with the variables and the other with the ranks. I tried using DIMNAMES but without success. Perhaps I need to transpose rows and columns in the original table in Viewer?

Any suggestions would be much appreciated. Thanks in advance.

Best regards,
Dominic

Dominic Lusinchi
Far West Research
Statistical Consulting
San Francisco, California
415-664-3032
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: struggling with OMS

Jon K Peck
As Pierre says, OMS listens for output generated after you start it.  It captures it upstream from the Viewer.  You can pivot tables in the OMS capture, but OMS provides no control over variable naming.

If you need to capture the output exactly in the Viewer format, it would require custom scripting in Python or Basic.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Pierre Tourigny <[hidden email]>
To:        [hidden email]
Date:        02/20/2012 04:48 AM
Subject:        Re: [SPSSX-L] struggling with OMS
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi Domonic,

OMS does not work on existing output like OUTPUT EXPORT. It's a new output stream.
You must put your table-producing procedure between the OMS and OMSEND commands.

Good luck,
Pierre Tourigny

On 2/20/2012 3:04 AM, Dominic Lusinchi wrote:

Dear colleagues,

I am having a difficult time with OMS. I am new to this feature of SPSS. I scanned through the Syntax Reference guide and the list serve archives but without success.

My issue. I am conducting a Friedman test and want to export the Ranks table to a *.sav file such that the variable names in the aforementioned table will be the variable names in the new data file and the mean ranks will be the values. Ideally I want to export more than one table such that each table will be a case in the new data file.

Currently I used this syntax for just one table:
OMS
/SELECT TABLES
/IF COMMANDS=['NPar Tests'] SUBTYPES=['Friedman Ranks'] LABELS =['Mean Rank']
/DESTINATION FORMAT=SAV
OUTFILE='C:\myfolder\myfile.sav'
/COLUMNS SEQUENCE=[RALL CALL LALL].
OMSEND.

All this syntax provides is a data file with "Command_", "Subtype_" and "Label_" as variables but no data.

I assume that the OMS command reads the output (SPSS Viewer) currently open - that is where the results of the Friedman test are located.
The "[RALL CALL LALL]" puts all dimensions in a single row. That might be a problem since the Ranks table has two columns: one with the variables and the other with the ranks. I tried using DIMNAMES but without success. Perhaps I need to transpose rows and columns in the original table in Viewer?

Any suggestions would be much appreciated. Thanks in advance.

Best regards,
Dominic

Dominic Lusinchi
Far West Research
Statistical Consulting
San Francisco, California
415-664-3032

dominic@...
Reply | Threaded
Open this post in threaded view
|

Re: struggling with OMS

Salbod
In reply to this post by Dominic Lusinchi

Hi Dominic,

 

I played around with the problem you posed and I came up with the start of a possible solution:

 

DATA LIST LIST / a1 a2 a3 .

BEGIN DATA

3.0          4.0          7.0

6.0          5.0          8.0

3.0          3.0          6.0

2.0          3.0          6.0

2.0          3.0          6.0

END DATA.

 

OMS

  /SELECT TABLES

  /IF COMMANDS = ['NPar Tests']

       SUBTYPES = [ 'Friedman Ranks' ]

    /DESTINATION FORMAT =SAV

       OUTFILE ='C:\myfolder\myfile.sav' .

NPAR TESTS /FRIEDMAN=a1 a2 a3.

NPAR TESTS /FRIEDMAN=a1 a2 a3.

OMSEND.

 

GET FILE = 'C:\myfolder\myfile.sav' .

RECODE Var1 ('a1' = 1)('a2' = 2) ('a3' = 3) INTO varA .

EXECUTE.

DELETE VARIABLES Command_ Subtype_ Label_  Var1.

EXECUTE,

 

* Insert a case variable to indicate rows that go together This probably can be automated.

 

CASESTOVARS

/ID = case

/INDEX = VarA .

LIST.

 

I hope this gives you some ideas.

 

Good luck,

 

Stephen Salbod, Pace University, NYC

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Dominic Lusinchi
Sent: Monday, February 20, 2012 3:05 AM
To: [hidden email]
Subject: struggling with OMS

 

Dear colleagues,

I am having a difficult time with OMS. I am new to this feature of SPSS. I scanned through the Syntax Reference guide and the list serve archives but without success.

My issue. I am conducting a Friedman test and want to export the Ranks table to a *.sav file such that the variable names in the aforementioned table will be the variable names in the new data file and the mean ranks will be the values. Ideally I want to export more than one table such that each table will be a case in the new data file.

Currently I used this syntax for just one table:
OMS
  /SELECT TABLES
  /IF COMMANDS=['NPar Tests'] SUBTYPES=['Friedman Ranks'] LABELS =['Mean Rank']
  /DESTINATION FORMAT=SAV
   OUTFILE='C:\myfolder\myfile.sav'
  /COLUMNS SEQUENCE=[RALL CALL LALL].
OMSEND.

All this syntax provides is a data file with "Command_", "Subtype_" and "Label_" as variables but no data.

I assume that the OMS command reads the output (SPSS Viewer) currently open - that is where the results of the Friedman test are located.
The "[RALL CALL LALL]" puts all dimensions in a single row. That might be a problem since the Ranks table has two columns: one with the variables and the other with the ranks. I tried using DIMNAMES but without success. Perhaps I need to transpose rows and columns in the original table in Viewer?

Any suggestions would be much appreciated. Thanks in advance.

Best regards,
Dominic

Dominic Lusinchi
Far West Research
Statistical Consulting
San Francisco, California
415-664-3032
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: struggling with OMS

Dominic Lusinchi

Thank you, Stephen, for your efforts.

 

If I read your syntax correctly, it appears that OMS in itself cannot do what I am looking for: i.e. to have a1, a2, and a2 as variables and mean ranks as values for each variable. I thought the subcommand COLUMNS was used for that purpose (?).

 

Also, it would seem that my assumption (“the OMS command reads the output (SPSS Viewer) currently open”) is incorrect. The procedure that generates the output of interest (in this case Friedman’s test) has to be embedded within the OMS-OMSEND structure (?). In other word, one can’t just run the procedure and obtain an output and then run OMS with that output open and expect OMS to read that output (?).

 

Good of you to take the time.

 

Best regards,

Dominic

 

Dominic Lusinchi

 

Far West Research

Statistical Consulting

San Francisco, California

T/F 415-664-3032

www.farwestresearch.com

 

Instructor, UC Berkeley Extension:
http://extension.berkeley.edu/cat/course2392.html


From: Salbod, Mr. Stephen [mailto:[hidden email]]
Sent: Monday, February 20, 2012 1:00 PM
To: [hidden email]; [hidden email]
Subject: RE: struggling with OMS

 

Hi Dominic,

 

I played around with the problem you posed and I came up with the start of a possible solution:

 

DATA LIST LIST / a1 a2 a3 .

BEGIN DATA

3.0          4.0          7.0

6.0          5.0          8.0

3.0          3.0          6.0

2.0          3.0          6.0

2.0          3.0          6.0

END DATA.

 

OMS

  /SELECT TABLES

  /IF COMMANDS = ['NPar Tests']

       SUBTYPES = [ 'Friedman Ranks' ]

    /DESTINATION FORMAT =SAV

       OUTFILE ='C:\myfolder\myfile.sav' .

NPAR TESTS /FRIEDMAN=a1 a2 a3.

NPAR TESTS /FRIEDMAN=a1 a2 a3.

OMSEND.

 

GET FILE = 'C:\myfolder\myfile.sav' .

RECODE Var1 ('a1' = 1)('a2' = 2) ('a3' = 3) INTO varA .

EXECUTE.

DELETE VARIABLES Command_ Subtype_ Label_  Var1.

EXECUTE,

 

* Insert a case variable to indicate rows that go together This probably can be automated.

 

CASESTOVARS

/ID = case

/INDEX = VarA .

LIST.

 

I hope this gives you some ideas.

 

Good luck,

 

Stephen Salbod, Pace University, NYC

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Dominic Lusinchi
Sent: Monday, February 20, 2012 3:05 AM
To: [hidden email]
Subject: struggling with OMS

 

Dear colleagues,

I am having a difficult time with OMS. I am new to this feature of SPSS. I scanned through the Syntax Reference guide and the list serve archives but without success.

My issue. I am conducting a Friedman test and want to export the Ranks table to a *.sav file such that the variable names in the aforementioned table will be the variable names in the new data file and the mean ranks will be the values. Ideally I want to export more than one table such that each table will be a case in the new data file.

Currently I used this syntax for just one table:
OMS
  /SELECT TABLES
  /IF COMMANDS=['NPar Tests'] SUBTYPES=['Friedman Ranks'] LABELS =['Mean Rank']
  /DESTINATION FORMAT=SAV
   OUTFILE='C:\myfolder\myfile.sav'
  /COLUMNS SEQUENCE=[RALL CALL LALL].
OMSEND.

All this syntax provides is a data file with "Command_", "Subtype_" and "Label_" as variables but no data.

I assume that the OMS command reads the output (SPSS Viewer) currently open - that is where the results of the Friedman test are located.
The "[RALL CALL LALL]" puts all dimensions in a single row. That might be a problem since the Ranks table has two columns: one with the variables and the other with the ranks. I tried using DIMNAMES but without success. Perhaps I need to transpose rows and columns in the original table in Viewer?

Any suggestions would be much appreciated. Thanks in advance.

Best regards,
Dominic

Dominic Lusinchi
Far West Research
Statistical Consulting
San Francisco, California
415-664-3032
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: struggling with OMS

Dominic Lusinchi
In reply to this post by Dominic Lusinchi

Thanks, Jon (and Pierre). Based on Stephen’s response I understand now the “listening” part: the procedure of interest must be embedded into OMS.

 

Using Stephen’s data, I get what I want with this syntax:

 

OMS

/SELECT TABLES

/IF COMMANDS=['NPar Tests'] SUBTYPES=['Friedman Ranks']

/DESTINATION FORMAT=SAV

OUTFILE='C:\myfolder\myfile.sav'

/COLUMNS SEQUENCE=[RALL CALL LALL].

NPAR TESTS /FRIEDMAN=a1 a2 a3.

OMSEND.

 

Thank you all.

 

Dominic Lusinchi

 

Far West Research

Statistical Consulting

San Francisco, California

T/F 415-664-3032

www.farwestresearch.com

 

Instructor, UC Berkeley Extension:
http://extension.berkeley.edu/cat/course2392.html


From: Jon K Peck [mailto:[hidden email]]
Sent: Monday, February 20, 2012 5:53 AM
Subject: Re: struggling with OMS

 

As Pierre says, OMS listens for output generated after you start it.  It captures it upstream from the Viewer.  You can pivot tables in the OMS capture, but OMS provides no control over variable naming.

If you need to capture the output exactly in the Viewer format, it would require custom scripting in Python or Basic.

Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Pierre Tourigny <[hidden email]>
To:        [hidden email]
Date:        02/20/2012 04:48 AM
Subject:        Re: [SPSSX-L] struggling with OMS
Sent by:        "SPSSX(r) Discussion" <[hidden email]>





Hi Domonic,

OMS does not work on existing output like OUTPUT EXPORT. It's a new output stream.
You must put your table-producing procedure between the OMS and OMSEND commands.

Good luck,
Pierre Tourigny

On 2/20/2012 3:04 AM, Dominic Lusinchi wrote:
Dear colleagues,

I am having a difficult time with OMS. I am new to this feature of SPSS. I scanned through the Syntax Reference guide and the list serve archives but without success.

My issue. I am conducting a Friedman test and want to export the Ranks table to a *.sav file such that the variable names in the aforementioned table will be the variable names in the new data file and the mean ranks will be the values. Ideally I want to export more than one table such that each table will be a case in the new data file.

Currently I used this syntax for just one table:
OMS
/SELECT TABLES
/IF COMMANDS=['NPar Tests'] SUBTYPES=['Friedman Ranks'] LABELS =['Mean Rank']
/DESTINATION FORMAT=SAV
OUTFILE='C:\myfolder\myfile.sav'
/COLUMNS SEQUENCE=[RALL CALL LALL].
OMSEND.

All this syntax provides is a data file with "Command_", "Subtype_" and "Label_" as variables but no data.

I assume that the OMS command reads the output (SPSS Viewer) currently open - that is where the results of the Friedman test are located.
The "[RALL CALL LALL]" puts all dimensions in a single row. That might be a problem since the Ranks table has two columns: one with the variables and the other with the ranks. I tried using DIMNAMES but without success. Perhaps I need to transpose rows and columns in the original table in Viewer?

Any suggestions would be much appreciated. Thanks in advance.

Best regards,
Dominic

Dominic Lusinchi
Far West Research
Statistical Consulting
San Francisco, California
415-664-3032
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Automatic reply: struggling with OMS

Chih-Hung Chang

Out of office 2/21-2/22.