SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
Expand all | Collapse all

error when merging two dataset

  • 1.  error when merging two dataset

    Posted Tue November 24, 2020 03:45 PM

    When I try to merge two dataset on ID number as Key variable the resulting merged file do not add the new variable in the same row but instead make two rows with the same ID number with the variable from dataset 1 in the first row and the variables from the second dataset in the second row. WhaT do I do wrong?






    #SPSSStatistics
    #Support
    #SupportMigration


  • 2.  RE: error when merging two dataset

    Posted Tue November 24, 2020 10:56 PM

    Which procedure are you using: ADD VARIABLES, ADD FILES, or STAR JOIN? It sounds like you are using ADDVARIABLES. From the CSR

    BY specifies one or more key variables that determine the order of cases in the resulting file. When BY is

    specified, cases from the input files are interleaved according to their values for the key variables.

    Cases in the resulting file are ordered by the values of the key variables. All cases from the first file with

    the first value for the key variable are first, followed by all cases from the second file with the same

    value, followed by all cases from the third file with the same value, and so forth. These cases are

    followed by all cases from the first file with the next value for the key variable, and so on.

    Perhaps you need to use ADD VARIABLES (Data > Merge Files > Add Variables






    #SPSSStatistics
    #Support
    #SupportMigration