Is it possible to create a new variable from the output of the "Frequencies command" ?

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Srdjan
Posts: 7
Joined: Wed Sep 24, 2008 12:23 pm

Is it possible to create a new variable from the output of the "Frequencies command" ?

Postby Srdjan » Sat Feb 06, 2016 6:39 pm

Is it possible to create a new variable from the output of the "Frequencies command" ?

What I want to do is to create a new variable with cases having the values listed in the output of Frequencies command. All other cases in the created variable should have missing values. In other words I would like to assign the output of the Frequencies command as the cases in a new variable.

Also, is it somehow possible to read the number of cases in the active data set (N) and to create a new variable assigning this number (N) to every case ?

For example in the attached data file I want to assign the output of the following command as values of cases in a new variable.

DATASET ACTIVATE DataSet1.
FREQUENCIES VARIABLES=sifragrp
/ORDER=ANALYSIS.
You do not have the required permissions to view the files attached to this post.
statman
Administrator
Posts: 2700
Joined: Tue Jun 12, 2007 12:08 pm
Location: Florida, USA

Re: Is it possible to create a new variable from the output of the "Frequencies command" ?

Postby statman » Sun Feb 07, 2016 1:20 pm

Look into the OMS function but also ............
See the note below

NOTE: Please read the Posting Guidelines and always tell us your OS, the SPSS version and information about your study and data!

Statman
Statistical Services
Srdjan
Posts: 7
Joined: Wed Sep 24, 2008 12:23 pm

Re: Is it possible to create a new variable from the output of the "Frequencies command" ?

Postby Srdjan » Sun Feb 07, 2016 8:39 pm

If that were so easy I wouldn't ask for help ........

SPSS is 23.0.0.2. OS is Windows 10 x64. The attached data file consists of the results of medical examinations of 348 subjects. The values of variable "sifrabol" are theindividual diagnoses according to ICD. The individual diagnoses are then grouped (recoded) in a variable "sifragrp" which values are the appropriate groups of ICD 10.

What I want to achieve is to divide the frequency in each group of "sifragrp" with the number of examined subjects (N).
statman
Administrator
Posts: 2700
Joined: Tue Jun 12, 2007 12:08 pm
Location: Florida, USA

Re: Is it possible to create a new variable from the output of the "Frequencies command" ?

Postby statman » Mon Feb 08, 2016 9:22 pm

See HELP and Cases in SPSS

Who is online

Users browsing this forum: No registered users and 6 guests

cron