|
Hi all,
I have 2 data sets I need to merge. Data set 1 has a separate rating for 2-3 departments within a given school. The school, the department, and the person who provided the rating are all coded as separate variables. N = 218 for that data set. Data set 2 has ratings for teacher workgroups within each of those departments within a given school. The school, the department and the person who provided the rating are shared variables across the 2 data sets, but this data set has another identifier which is workgroup name. N = 366 for this data set. I'm trying to merge the data sets so that the ratings from Data Set 1 are aligned with the ratings in Data Set 2. Because there are several workgroups nested within the departments, those departmental ratings in Data Set 1 would be repeated in Data Set 2. When I try to merge these data sets, it fails. I've tried this in the past with other multi-level data and have not been able to merge those types of data files. Does anyone know how to do this in SPSS? I've been doing it in R but I'd rather be able to use just one stats package for data management if I can. Thanks in advance for your help, Kathy McKnight ===================== 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 |
|
Try looking at the MATCH FILES command, using dataset 1 as a table lookup file (TABLE subcommand).
-----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Kathy McKnight Sent: Wednesday, November 28, 2007 2:18 PM To: [hidden email] Subject: Merging multiple record data Hi all, I have 2 data sets I need to merge. Data set 1 has a separate rating for 2-3 departments within a given school. The school, the department, and the person who provided the rating are all coded as separate variables. N = 218 for that data set. Data set 2 has ratings for teacher workgroups within each of those departments within a given school. The school, the department and the person who provided the rating are shared variables across the 2 data sets, but this data set has another identifier which is workgroup name. N = 366 for this data set. I'm trying to merge the data sets so that the ratings from Data Set 1 are aligned with the ratings in Data Set 2. Because there are several workgroups nested within the departments, those departmental ratings in Data Set 1 would be repeated in Data Set 2. When I try to merge these data sets, it fails. I've tried this in the past with other multi-level data and have not been able to merge those types of data files. Does anyone know how to do this in SPSS? I've been doing it in R but I'd rather be able to use just one stats package for data management if I can. Thanks in advance for your help, Kathy McKnight ===================== 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 |
|
In reply to this post by Kathy McKnight
Kathy:
I may be misinterpreting what you are trying to do, but I have merged files in SPSS before. Typically, I have one file with teacher level data and another with student level data that I need to merge. Open the two datasets that you want to merge. Make sure that the "key" variables that you will be matching on are formatted the same way in both files. Sort both files the same way: First by school ascending, then by department ascending, then by person ascending. The files must be sorted using the same variables, in the same order, always ascending. Next, click on Data, then Merge Files, then Add Variables. Select the non-active dataset (dataset 2 if you are working in dataset 1) and continue. In the new window, check the box "Match cases on key variables in sorted files." I think that you will want to select "Both files provide cases" so that all cases from both files are included in the merged file, but I could be misunderstanding your situation. Finally, use the arrow to move the variables school, department and person from Excluded Variables to Key Variables and click OK. This should have merged the variables from the non-active dataset into the active dataset. Is this the process you are using, or have I completely misinterpreted your question? ____________________________________ Justin Meyer Rowland Reading Foundation phone: 866-370-7323 fax: 608-204-3846 ____________________________________ -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Kathy McKnight Sent: Wednesday, November 28, 2007 2:18 PM To: [hidden email] Subject: Merging multiple record data Hi all, I have 2 data sets I need to merge. Data set 1 has a separate rating for 2-3 departments within a given school. The school, the department, and the person who provided the rating are all coded as separate variables. N = 218 for that data set. Data set 2 has ratings for teacher workgroups within each of those departments within a given school. The school, the department and the person who provided the rating are shared variables across the 2 data sets, but this data set has another identifier which is workgroup name. N = 366 for this data set. I'm trying to merge the data sets so that the ratings from Data Set 1 are aligned with the ratings in Data Set 2. Because there are several workgroups nested within the departments, those departmental ratings in Data Set 1 would be repeated in Data Set 2. When I try to merge these data sets, it fails. I've tried this in the past with other multi-level data and have not been able to merge those types of data files. Does anyone know how to do this in SPSS? I've been doing it in R but I'd rather be able to use just one stats package for data management if I can. Thanks in advance for your help, Kathy McKnight ===================== 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 |
| Free forum by Nabble | Edit this page |
