Announcement

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

  • Marge to data

    Dear Sir, I am trying to marge two data in Stata 14, individual with household data based on household id. The individual data has 2650 variables and household data has 7618 variables. I used many to many variables for merging but it is showing unruled. I used Longitudinal Ageing Study in India (LASI).
    Can you help me out of this.

  • #2
    Originally posted by Kinkar Mandal View Post
    I used many to many variables for merging but it is showing unruled.
    Use a many-to-one merge, with individual dataset on the many side and household dataset on the one side. Because it is longitudinal study, both household and individual might be monitored over time. If so, then both household ID and the time variable would be declared as merging variables.

    Comment


    • #3
      Dear Sir, As per your suggestion I did marge of two datasets, individual dataset with household dataset. I marge on the many side of individual dataset and household on the one side with both household ID. But it is sawing 2212 are not matched.
      I attached a photo copy.
      Please help me out of this
      Attached Files

      Comment


      • #4
        Dear Sir, I used both the ways (Many to one and many to many) to merge the data but it is sowing the same results.
        I attached a photo copy of that
        Please help me out of this it will very help for me.
        Thanking you
        Kinkar
        Attached Files

        Comment


        • #5
          Dear Sir, I used 'aweight' in my data set for analyzing, but only the internal number is changing. If it is so, how can rural female become urban female after using 'aweight'? I did not understanding this internal changing of number. If this is correct then why total number is not changing?
          I attached a photo copy of that
          Please help me out of this it will very help for me.
          Thanking you
          Kinkar
          Attached Files

          Comment


          • #6
            I suggest you read the sections of the PDF manuals that are installed with your Stata on both weights and weighted estimation. In addition to learning about the four types of weights and what they are appropriately used for, you will learn that when -aweights- are used in most commands, Stata rescales them to sum to 1. That explains why your grand total is unchanged.

            That said, if you understand what aweights are you will see that it is almost impossible for their application to variables denoting sex and residence to be appropraite. Where does this variable indiaindividualweight come from? How was it created by whoever created it? My guess would be that it is more likely a pweight or an fweight.

            Comment


            • #7
              Dear Sir, I was using CHARLS Wave 4 data for my analysis. In the data I was unable to get the age data. Data is organized in a years of birth. It has organize like person took birth in 1960, total frequency, 506.
              Therefore, I was unable to get years of age of 506 people. How I will be overcome of this problems? How I can generate a variable from this data?

              I have attached the variable.

              Thanking you
              Kinkar Mandal

              Year of
              Birth Freq. Percent Cum.

              1900 1 0.01 0.01
              1910 1 0.01 0.01
              1912 1 0.01 0.02
              1920 1 0.01 0.02
              1921 8 0.04 0.06
              1922 5 0.03 0.09
              1923 8 0.04 0.13
              1924 12 0.06 0.19
              1925 8 0.04 0.23
              1926 15 0.08 0.31
              1927 14 0.07 0.38
              1928 24 0.12 0.50
              1929 42 0.22 0.72
              1930 40 0.21 0.92
              1931 65 0.33 1.26
              1932 63 0.32 1.58
              1933 92 0.47 2.05
              1934 100 0.51 2.56
              1935 109 0.56 3.12
              1936 170 0.87 4.00
              1937 164 0.84 4.84
              1938 184 0.94 5.78
              1939 191 0.98 6.76
              1940 215 1.10 7.86
              1941 307 1.57 9.44
              1942 275 1.41 10.85
              1943 300 1.54 12.39
              1944 308 1.58 13.97
              1945 343 1.76 15.73
              1946 394 2.02 17.75
              1947 431 2.21 19.96
              1948 455 2.33 22.29
              1949 594 3.05 25.34
              1950 575 2.95 28.29
              1951 586 3.01 31.30
              1952 730 3.74 35.04
              1953 647 3.32 38.36
              1954 743 3.81 42.17
              1955 703 3.61 45.78
              1956 674 3.46 49.24
              1957 637 3.27 52.50
              1958 583 2.99 55.49
              1959 458 2.35 57.84
              1960 506 2.60 60.44
              1961 411 2.11 62.55
              1962 743 3.81 66.36
              1963 894 4.59 70.94
              1964 770 3.95 74.89
              1965 730 3.74 78.64
              1966 730 3.74 82.38
              1967 588 3.02 85.40
              1968 697 3.58 88.98
              1969 554 2.84 91.82
              1970 550 2.82 94.64
              1971 431 2.21 96.85
              1972 258 1.32 98.17
              1973 124 0.64 98.81
              1974 76 0.39 99.20
              1975 36 0.18 99.38
              1976 32 0.16 99.55
              1977 29 0.15 99.70
              1978 12 0.06 99.76
              1979 12 0.06 99.82
              1980 5 0.03 99.85
              1981 3 0.02 99.86
              1982 4 0.02 99.88
              1983 2 0.01 99.89
              1984 3 0.02 99.91
              1985 1 0.01 99.91
              1986 1 0.01 99.92
              1987 2 0.01 99.93
              1988 1 0.01 99.93
              1989 2 0.01 99.94
              1990 1 0.01 99.95
              1991 1 0.01 99.95
              1992 1 0.01 99.96
              1994 2 0.01 99.97
              1996 1 0.01 99.97
              1997 1 0.01 99.98
              1998 1 0.01 99.98
              1999 1 0.01 99.99
              2000 2 0.01 100.00

              Total 19,494 100.00

              .



              Comment


              • #8
                I don't understand what you want to do here. If you just want the current age corresponding to each year of birth, just -gen age = 2022 - birth_year-. Or if you are interested in their age at some other year, perhaps the year in which the survey was carried out, then if that year is, for example, 2015, it's -gen age = 2015 - birth_year-. But I suspect you have something else in mind that involves the survey data itself. But as you do not show any example data, nothing can be said about it that would be helpful. To get more concrete advice, you will need to post back with a clearer question, example data (using -dataex-) and a clear indication of what you want to get from that data.

                If you are running version 17, 16 or a fully updated version 15.1 or 14.2, -dataex- is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.



                When asking for help with code, always show example data. When showing example data, always use -dataex-.

                Comment

                Working...
                X