Re: Creating a new file for a subset of cases/IDs

Posted by Alejandro González Heras on
URL: http://spssx-discussion.165.s1.nabble.com/Creating-a-new-file-for-a-subset-of-cases-IDs-tp5740376p5740378.html

Hi Oliver,

I don't fully understand why you try to add variables after creating the subset that is of your interest. Could you please elaborate that? Consider that you are subsetting cases and then you are trying to add variables (and not cases)

What you need is to create a subset based on some criteria, is this correct?

Have you tried the SELECT IF command? I believe that is the name for the command that selects cases based on any variable criteria and deletes the non selected cases. Through the menu, you could go to "filter cases by" and click on "delete non selected cases", if I'm remembering it correctly


All the best,
A


El 5 abr. 2021 20:09, Oliver <[hidden email]> escribió:
Hi everyone,

I have a dataset (Dataset 1) with 3000 different cases (i.e., IDs) and let's
say, two variables (y1, y2). I would like to create a new dataset (Dataset
2) that includes data for y1 and y2, but only for a subset of IDs from
Dataset 1.  I've created Dataset 2 with only the subset (i.e., n = 1500) of
IDs of interest and then tried to use the "Merge file-->Add variables", but
the newly created dataset (i.e., Dataset 2) always generates 3000 cases, not
just the 1500 that I need.

Any assistance would be greatly appreciated.
Thanks in advance.
O.



--
Sent from: http://spssx-discussion.1045642.n5.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

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