Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Appending data

    I have data that was collected in three waves, In each waves the same respondents were surveyed along with new respondents, the questions asked also increased. Meaning new questions were added to the existing ones in each subsequent wave. My question is that when I am appending this data the number of observations is increasing but the additional questions are being dropped. what should I do about it? And if I want to make my data in such a way that I want data for same respondents to appear together what should I do?

  • #2
    Typically, the data that you are describing should not have a problem in appending.
    Code:
     clear
            input w id q1 q2
            1 1 1 5
            1 2 4 1
            end
            save "wave1.dta" , replace 
            
    clear
            input w id q1 q2 q3
            2 1 1 4 5
            2 2 4 1 4
            2 3 5 2 3
            end
    append using "wave1.dta"

    Comment


    • #3
      Please show an example of the datasets - it can be a toy example -, and the commands you really typed.

      You may use - dataex - for that matter.
      Best regards,

      Marcos

      Comment


      • #4
        Click image for larger version

Name:	sta.PNG
Views:	1
Size:	67.5 KB
ID:	1447450
        This is the data from first and second wave
        Attached Files

        Comment


        • #5
          These are snapshots. Please read the FAQ. There you'll find information about sharing data/command/output in the Forum.

          That said, it seems the variable - childidcode - was stored as numeric in the first data and as a categorical variable in the second.

          To - append -, we need both to be of the same type. Hopefully that helps.
          Best regards,

          Marcos

          Comment


          • #6
            Yes, it helped thanks

            Comment

            Working...
            X