I have two data files I’m trying to fuse
together. But, I’m in a paper bag and can’t find my way out. I have
tried to break the task down to simplify it but that’s not working for
me. Well, anything I’ve tried hasn’t been working. Below I describe
the two files and provide a picture of the desired resulting file. Thank you as
always.
Desired Result File
Sydelle
Raffe Management
Analyst Office
of Data Management Information
Services Division 510-271-9174
(29174) I'm not an outlier; I just haven't found my distribution yet! --
Ronan M. Conroy, Lecturer in Biostatistics, |
You have to treat your “case file” as a keyed table, so that the data for each “case” are copied into each transaction record in the “transaction file”. SYNTAX (substitute the proper pathname for each file): GET FILE ‘transaction file’. SORT CASES BY case_id. SAVE OUTFILE ‘transaction file’. GET FILE ‘case file’. SORT CASES BY case_id. SAVE OUTFILE ‘case file’. MATCH FILES / FILE = ‘transaction file’ / TABLE = ‘case file’ / BY case_id. You can achieve the same via menu, of course. Hector De: SPSSX(r) Discussion [mailto:[hidden email]] En nombre de Raffe, Sydelle, SSA I have two data files I’m trying to fuse together. But, I’m in a paper bag and can’t find my way out. I have tried to break the task down to simplify it but that’s not working for me. Well, anything I’ve tried hasn’t been working. Below I describe the two files and provide a picture of the desired resulting file. Thank you as always.
Desired Result File
Sydelle Raffe Management Analyst Office of Data Management Information Services Division 510-271-9174 (29174) I'm not an outlier; I just haven't found my distribution yet! -- Ronan M. Conroy, Lecturer in Biostatistics, Royal College of Surgeons of Ireland |
Thank you. It runs perfectly creating all the variables in
one file. Unfortunately, all the data are missing! At least that’s a new
outcome! I think I’ll try again tomorrow. From:
Hector Maletta [mailto:[hidden email]] You have to treat
your “case file” as a keyed table, so that the data for each “case” are copied
into each transaction record in the “transaction file”. SYNTAX (substitute
the proper pathname for each file): GET FILE
‘transaction file’. SORT CASES BY
case_id. SAVE OUTFILE
‘transaction file’. GET FILE ‘case
file’. SORT CASES BY
case_id. SAVE OUTFILE ‘case
file’. MATCH FILES / FILE =
‘transaction file’ / TABLE = ‘case file’ / BY case_id. You can achieve the
same via menu, of course. Hector De:
SPSSX(r) Discussion [mailto:[hidden email]] En nombre de Raffe, Sydelle, SSA I have two data files I’m trying to fuse together.
But, I’m in a paper bag and can’t find my way out. I have tried to break the
task down to simplify it but that’s not working for me. Well, anything I’ve
tried hasn’t been working. Below I describe the two files and provide a picture
of the desired resulting file. Thank you as always.
Desired Result File
Sydelle
Raffe Management
Analyst Office
of Data Management Information
Services Division 510-271-9174
(29174) I'm not an outlier; I just haven't found my distribution yet! --
Ronan M. Conroy, Lecturer in Biostatistics, |
I do not believe all the data are missing. MATCH FILES is a transformation command, and as such, it takes effect only after been executed. Among SPSS options you may have established that transformation commands are executed as they are issued, or held unexecuted until the next command that requires reading the data (or until you order the execution of pending transformations). If you have established the option that transformations are not immediately executed, issuing a MATCH FILES command would create the new file with all its variables, but data will not be read; as a result, all variables will be blank until the transformation is actually executed. You can execute pending transformation by issuing the command EXECUTE, or clicking “Run pending transformations” in the Transform menu option, or posing your cursor in the MATCH FILES command and clicking on the arrow point in the toolbar of your syntax file. I expect this would produce the “miracle” of populating the new file with data. If that is so, SAVE the new file under a different name, e.g. ‘new combined file’, in order to preserve the original files along with the new one. Hope this helps. Hector De: Raffe, Sydelle, SSA [mailto:[hidden email]] Thank you. It runs perfectly creating all the variables in one file. Unfortunately, all the data are missing! At least that’s a new outcome! I think I’ll try again tomorrow. From: Hector Maletta [[hidden email]] You have to treat your “case file” as a keyed table, so that the data for each “case” are copied into each transaction record in the “transaction file”. SYNTAX (substitute the proper pathname for each file): GET FILE ‘transaction file’. SORT CASES BY case_id. SAVE OUTFILE ‘transaction file’. GET FILE ‘case file’. SORT CASES BY case_id. SAVE OUTFILE ‘case file’. MATCH FILES / FILE = ‘transaction file’ / TABLE = ‘case file’ / BY case_id. You can achieve the same via menu, of course. Hector De: SPSSX(r) Discussion [[hidden email]] En nombre de Raffe, Sydelle, SSA I have two data files I’m trying to fuse together. But, I’m in a paper bag and can’t find my way out. I have tried to break the task down to simplify it but that’s not working for me. Well, anything I’ve tried hasn’t been working. Below I describe the two files and provide a picture of the desired resulting file. Thank you as always.
Desired Result File
Sydelle Raffe Management Analyst Office of Data Management Information Services Division 510-271-9174 (29174) I'm not an outlier; I just haven't found my distribution yet! -- Ronan M. Conroy, Lecturer in Biostatistics, Royal College of Surgeons of Ireland |
It’s embarrassing. I’ve worked with SPSS since 7.5 and I
managed to forget the exe (as well as a few other things). I can’t thank you
enough for seeing my issues so clearly and solving them. I waited much too long
to ask for help. From:
Hector Maletta [mailto:[hidden email]] I do not believe all
the data are missing. MATCH FILES is a transformation command, and as such, it
takes effect only after been executed. Among SPSS options you may have
established that transformation commands are executed as they are issued, or
held unexecuted until the next command that requires reading the data (or until
you order the execution of pending transformations). If you have established
the option that transformations are not immediately executed, issuing a MATCH
FILES command would create the new file with all its variables, but data will
not be read; as a result, all variables will be blank until the transformation
is actually executed. You can execute
pending transformation by issuing the command EXECUTE, or clicking “Run pending
transformations” in the Transform menu option, or posing your cursor in the
MATCH FILES command and clicking on the arrow point in the toolbar of your
syntax file. I expect this would
produce the “miracle” of populating the new file with data. If that is so, SAVE
the new file under a different name, e.g. ‘new combined file’, in order to
preserve the original files along with the new one. Hope this helps. Hector De:
Raffe, Sydelle, SSA [mailto:[hidden email]] Thank you. It runs perfectly creating all the variables in
one file. Unfortunately, all the data are missing! At least that’s a new
outcome! I think I’ll try again tomorrow. From:
Hector Maletta [[hidden email]]
You have to treat
your “case file” as a keyed table, so that the data for each “case” are copied
into each transaction record in the “transaction file”. SYNTAX (substitute
the proper pathname for each file): GET FILE
‘transaction file’. SORT CASES BY
case_id. SAVE OUTFILE
‘transaction file’. GET FILE ‘case
file’. SORT CASES BY
case_id. SAVE OUTFILE ‘case
file’. MATCH FILES / FILE =
‘transaction file’ / TABLE = ‘case file’ / BY case_id. You can achieve the
same via menu, of course. Hector De:
SPSSX(r) Discussion [[hidden email]]
En nombre de Raffe, Sydelle, SSA I have two data files I’m trying to fuse together.
But, I’m in a paper bag and can’t find my way out. I have tried to break the
task down to simplify it but that’s not working for me. Well, anything I’ve
tried hasn’t been working. Below I describe the two files and provide a picture
of the desired resulting file. Thank you as always.
Desired Result File
Sydelle
Raffe Management
Analyst Office
of Data Management Information
Services Division 510-271-9174
(29174) I'm not an outlier; I just haven't found my distribution yet! --
Ronan M. Conroy, Lecturer in Biostatistics, |
Free forum by Nabble | Edit this page |