Announcement

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

  • merging or append data files

    I have employment data of household members having household id and for each household, every member has different member id. data is collected for several times in a year. and there is a separate data file for each year. I want to do analyze the behavior of data with time for each household and also for each member. some data variables are string and others are numerical. so to analyze data what I have to do? merging of data or append different data files.

  • #2
    From your description it is most likely that -append- is the helpful approach. You don't say what analyses you have in mind, so I cannot answer you with 100% confidence, but since the vast majority of analysis and data management commands in Stata work with long data layouts, -append- would be the proper approach. There are a few exceptions, however.

    Comment


    • #3
      i want to do random effect and fixed effect analysis to find the dependence of working days on other variables of data for each household and member

      Comment


      • #4
        So, yes, for this, you should definitely -append- these data sets.

        Let me anticipate a problem you may run into: when you have a series of data sets like this, you often find inconsistencies between them that makes simple -append-ing difficult. The same variable may have different names in different data sets. Or a variable that is numeric in one may be string in another. These inconsistencies can be maddening--and they will cause whatever code you use to try to mass append them all into a single file to break. So before you start appending, go through each of the data sets and inspect them to make sure they are all consistent with each other, and if not, fix the inconsistencies first.

        Comment


        • #5
          i have tried once in the same way you have explained but when i sorted data with wrt Household id and member id then a large number of observations missed in the final master data set. so can you please explain the reason behind this

          Comment


          • #6
            I'm sorry, but I don't understand what you are saying in #4. I do not know, from that description, what you did, nor what happened as a result. Please show example data (use -dataex-) the code you tried (use code delimiters), the output that Stata gave (also use code delimiters), an example of the results you got (again, use -dataex-) and, unless it is obvious, explain why the results are not what you need.

            Comment

            Working...
            X