Merging datasets for different countries on SPSS [message #17446] |
Tue, 19 March 2019 20:40 |
nicolegray1
Messages: 1 Registered: February 2019
|
Member |
|
|
I'm analysing secondary sex ratio trends in 14 different African countries using DHS data and chi-square tests of association for 8 variables for each . However the results are very inconsistent and this may be because the sample size is too small for individual countries; it must supposedly be at least 1 million births. Therefore, as I've seen other studies do, I wanted to combine the data for the 14 countries and rerun my chi-square tests on the same variables, to see what associations hold when the data is aggregated. Does anyone know how I can merge these different datasets so that they are in one dataset- copy and pasting the data just crashes my laptop as the files are too large.
Thanks in advance.
|
|
|
|
Re: Merging datasets for different countries on SPSS [message #17581 is a reply to message #17446] |
Fri, 19 April 2019 16:55 |
boyle014
Messages: 78 Registered: December 2015 Location: Minneapolis
|
Senior Member |
|
|
Dr. Pullman is correct that it may not be necessary to append all these files to accomplish your goals. However, if you do decide that you want to append many files, while retaining just a few variables, you should think about using IPUMS DHS. IPUMS DHS allows you to select the samples and variables that interest you, and download a single, fully harmonized and integrated data file. Here is the online user guide to help you get started. Since you are using SPSS, be sure to change the data format to SPSS when you are checking out.
Professor Elizabeth Boyle
Sociology & Law, University of Minnesota, USA
Principal Investigator, IPUMS-DHS
|
|
|
Re: Merging datasets for different countries on SPSS [message #28724 is a reply to message #17446] |
Thu, 29 February 2024 07:18 |
deng222
Messages: 1 Registered: February 2024 Location: New York
|
Member |
|
|
Hello,
Here is how to achieve this.
Open Your Main Dataset: Start SPSS and open one of the datasets you want to merge.
Merge Files:
Go to the Data menu, select Merge Files, and then choose Add Cases... if you want to append the datasets (i.e., add rows/cases).
If instead, you are looking to add variables (i.e., add columns) from another dataset that matches cases on some identifier, you would select Add Variables....
Select the File to Merge:
For Add Cases, a dialog box will prompt you to select the file you want to append to the currently opened dataset. Navigate to the file, select it, and click Open.
For Add Variables, you will also need to specify the matching variable(s) in both datasets (the variable that identifies the same cases in both files).
Review and Adjust:
Add Cases: You'll have the opportunity to review the cases to be added. SPSS will attempt to match variables by name. Ensure that the variables intended to match between the datasets are correctly aligned.
Add Variables: You must ensure that the matching variables correctly align between your datasets and review how SPSS proposes to merge the additional variables.
Execute the Merge:
Follow through the dialog boxes, adjusting options as necessary. For appending cases, you might not need to do much more. For adding variables, ensure you've correctly identified the matching variables.
Finalize the merge process. SPSS will then append the dataset or add the variables as specified.
Save the Merged Dataset:
It's a good practice to save the merged dataset as a new file to avoid overwriting your original data.
[Updated on: Fri, 01 March 2024 08:07] by Moderator Report message to a moderator
|
|
|