question about syntaxis

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

question about syntaxis

Rodrigo Briceño
Dear members of the list.

I want to know how can I generate a new variable with an specific format and
level of measurement. In the procedure that I’m executing I’m calculating
the mean of a variable attending to their particular groups (departments)
and after that I’m making a table with the % of cases that are considered
outliers (more than 2 standard deviations from the mean). The problem is
that the variable constructed is a scale variable and I need it to be
Nominal in order to allow to use the custom tables procedure. Thanks.

 

* Outliers.

SORT CASES BY serviced .

SPLIT FILE

  SEPARATE BY serviced .

DESCRIPTIVES

  VARIABLES=lengthof  /SAVE.

SPLIT FILE

  OFF.

IF (Zlengthof > 2) outlier = 1 .

EXECUTE .

RECODE

  outlier  (MISSING=2)  .

EXECUTE .

Value labels

outlier

1 Outlier

2 Normal.

Execute.

* Custom Tables.

CTABLES

  /VLABELS VARIABLES=outlier serviced DISPLAY=DEFAULT

  /TABLE serviced [COUNT F40.0] BY outlier [N]

  /CATEGORIES VARIABLES=outlier ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES

  POSITION=AFTER

  /CATEGORIES VARIABLES=serviced ORDER=A KEY=VALUE EMPTY=EXCLUDE TOTAL=YES

  POSITION=AFTER.

 

 

___________________________
Rodrigo Briceño
Project Manager
 <http://www.sanigest.com> www.sanigest.com
Costa Rica Cell: (506) 886-1177
Office: 291-1200, ext.129
MSN:  <mailto:[hidden email]> [hidden email]
SKYPE: rbriceno1087
____________________________
Reply | Threaded
Open this post in threaded view
|

Re: question about syntaxis

Edward Boadi
Change the third line to read :

/TABLE serviced[C] [COUNT F40.0] BY outlier [N]


Regards.
Edward.
-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of
Rodrigo Briceno
Sent: Monday, April 30, 2007 4:01 PM
To: [hidden email]
Subject: question about syntaxis


Dear members of the list.

I want to know how can I generate a new variable with an specific format and
level of measurement. In the procedure that I'm executing I'm calculating
the mean of a variable attending to their particular groups (departments)
and after that I'm making a table with the % of cases that are considered
outliers (more than 2 standard deviations from the mean). The problem is
that the variable constructed is a scale variable and I need it to be
Nominal in order to allow to use the custom tables procedure. Thanks.



* Outliers.

SORT CASES BY serviced .

SPLIT FILE

  SEPARATE BY serviced .

DESCRIPTIVES

  VARIABLES=lengthof  /SAVE.

SPLIT FILE

  OFF.

IF (Zlengthof > 2) outlier = 1 .

EXECUTE .

RECODE

  outlier  (MISSING=2)  .

EXECUTE .

Value labels

outlier

1 Outlier

2 Normal.

Execute.

* Custom Tables.

CTABLES

  /VLABELS VARIABLES=outlier serviced DISPLAY=DEFAULT

  /TABLE serviced [COUNT F40.0] BY outlier [N]

  /CATEGORIES VARIABLES=outlier ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES

  POSITION=AFTER

  /CATEGORIES VARIABLES=serviced ORDER=A KEY=VALUE EMPTY=EXCLUDE TOTAL=YES

  POSITION=AFTER.





___________________________
Rodrigo Briceño
Project Manager
 <http://www.sanigest.com> www.sanigest.com
Costa Rica Cell: (506) 886-1177
Office: 291-1200, ext.129
MSN:  <mailto:[hidden email]> [hidden email]
SKYPE: rbriceno1087
____________________________