|
Hi everyone,
I have 2 datasets. One dataset is the baseline and one dataset is the follow-up. I would like to merge them for the analysis. The baseline had 29 questions and the follow-up has 73 questions. There were 26 questions that were the same in both questionnaires. There were 895 cases in baseline and 911 cases in follow-up. They are not the same people. In the SPSS help menu, there is an option to add cases or add variables. But what about if you want to add both? Any guidance would be appreciated. Thanks so much, Deepa ===================== 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 |
|
If you have an indicator variable for baseline vs. follow-up, use add cases first, then use CASESTOVARS to go from vertical (tall) to horizontal (long), using that indicator as the index variable.
If you don't have an indicator variable, create one such as wave=1 for baseline, wave=2 for follow-up. Then add cases and use CASESTOVARS. Melissa -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Deepa Bhat Sent: Monday, April 14, 2008 9:41 AM To: [hidden email] Subject: [SPSSX-L] question on merging datasets Hi everyone, I have 2 datasets. One dataset is the baseline and one dataset is the follow-up. I would like to merge them for the analysis. The baseline had 29 questions and the follow-up has 73 questions. There were 26 questions that were the same in both questionnaires. There were 895 cases in baseline and 911 cases in follow-up. They are not the same people. In the SPSS help menu, there is an option to add cases or add variables. But what about if you want to add both? Any guidance would be appreciated. Thanks so much, Deepa ===================== 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 PRIVILEGED AND CONFIDENTIAL INFORMATION This transmittal and any attachments may contain PRIVILEGED AND CONFIDENTIAL information and is intended only for the use of the addressee. If you are not the designated recipient, or an employee or agent authorized to deliver such transmittals to the designated recipient, you are hereby notified that any dissemination, copying or publication of this transmittal is strictly prohibited. If you have received this transmittal in error, please notify us immediately by replying to the sender and delete this copy from your system. You may also call us at (309) 827-6026 for assistance. ===================== 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 |
|
In reply to this post by Deepa Bhat
At 10:41 AM 4/14/2008, Deepa Bhat wrote:
>I have 2 datasets. One dataset is the baseline and one dataset is >the follow-up. I would like to merge them for the analysis. The >baseline had 29 questions and the follow-up has 73 questions. There >were 26 questions that were the same in both questionnaires. In the >SPSS help menu, there is an option to add cases or add variables. >But what about if you want to add both? Melissa's right: use "add cases". The result will have all variables found in either input. Variables will have value system-missing (numeric variables) or blank (string variables) for cases from sources where they don't appear. The SPSS menus do about as well as is reasonable to do, but they don't express the full extent of what the merging commands actually do. Now, however, at 10:46 AM 4/14/2008, Melissa Ives wrote: >If you have an indicator variable for baseline vs. follow-up, use >add cases [...] If you don't have an indicator variable, create one >such as wave=1 for baseline, wave=2 for follow-up. So far so good, except it isn't necessary to create the indicator variable first. On the panel that lists the variables, check "Indicate case source as variable", and give name 'wave', or whatever you choose. That'll give a variable whose value is 1 if the case came from the active dataset, and 0 if it came from the dataset that's merged in with it. If the active dataset is the baseline and you merged is the followup, you can get the coding Melissa suggested by menu Transform > Recode > Into same variables... Select variable 'wave'. Select 'Old and New Values...'; Under "Old Value:", select "Value" and type in value 0; under "New Value:", select "Value" and type in value 2; select "Add". The resulting syntax is RECODE wave (0=2) . Melissa also suggested, >use CASESTOVARS to go from vertical (tall) to horizontal (long), >using the indicator as the index variable. No, not in your case where, as you wrote, >The cases in baseline and in follow-up are not the same people. (BTW, by way of terminology: Using 'long' for horizontal organization may be misleading, as 'long' is commonly used -- by me as well as others -- to mean what's here called 'vertical' or 'tall.' What's called 'horizontal' is also commonly referred to as 'wide'.) ===================== 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 |
| Free forum by Nabble | Edit this page |
