First of all, to match two files with different variables, it is imperative to have one common variable in the files.
1) Sort the files to be matched on the basis of index variable.
SORT CASES BY variable_name.
2) save the sorted files.
3) The join command in SPSS syntax:
MATCH FILES
/FILE ='FILE_A_NAME_WITH_PATH.sav'
/FILE ='FILE_B_NAME_WITH_PATH.sav'
/BY index variable(s).
ANOTHER NOTE: I think we should TURN OFF Weights before this command.
**If one of the files has different unit of analysis, for example a household file, or a community file and the other is a individual level file, then the household/community file should be written like the following:
/TABLE ='FILE_A_NAME_WITH_PATH.sav'
** If one of the data files is already open in the SPSS, then only a asterik can be used instead of full path and file name:
/TABLE=*
OR
/FILE=*
4) the resultant file is a new matched file, save with a new name.
Important Note:
If the files to be matched have variables with similar names but different information, such as FileA may have q9 which is respondent's residency status, while FileB also has q9 which is about No. of courses they are taking. The file match command would choose the first files values only without giving you a choice. In order to deal with the problem, you can utilize the RENAME variable sub-command option:
You can rename the variables in the MATCH FILES command (which renames the variables before doing the matching). This allows you to select variable names that do not conflict with each other, as illustrated below.
(Source: http://www.ats.ucla.edu/stat/spss/modules/merge.htm)MATCH FILES FILE="FILEA.sav" /RENAME=(inc98 = dadinc98)
/FILE="FILEB.sav" /RENAME=(inc96 inc97 inc98 = faminc96 faminc97 faminc98)
/BY id.
TIPS:
****GET THE FILES AND DROP USELESS VARS****.
***FIRST SORT THE FILES TO MATCH ****.
**** IF REQ. SAVE AS NEW FILES****.
2 comments:
supreme hoodie
supreme hoodie
air max 97
jordan shoes
nike air max
nike sneakers
balenciaga speed
goyard handbags
supreme clothing
air max 2019
over at this website replica bags online best site replica louis vuitton bags read bags replica ysl
Post a Comment