Announcement

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

  • Graphing age profile-income (or consumption) relationship

    Dear All,
    I want to see the LCH graph, showing how consumption (or income) has evolved with age. Income on y-axis and age in x-axis. But this
    Code:
    twoway (line income age)
    is not giving me what I'm looking for.

    Any help?

    Thanks,
    Dapel
    Last edited by Zuhumnan Dapel; 07 Feb 2016, 10:01.

  • #2
    There is insufficient information here to determine what exactly you are trying to produce. If you're attempted to use a line graph to show some aggregated function of income by age, then you would want to collapse the data by age first. Keep in mind, the help file for

    Code:
    help twoway line
    States clearly at one point:

    Oneway equivalency of line and scatter

    line is similar to scatter, the differences being that by default the marker symbols are not displayed and the
    points are connected:

    Comment


    • #3
      Thanks. Yes, I want to use a line graph to show some aggregated function of income by age

      Comment


      • #4
        You'd likely want to do something like:

        Code:
        collapse (mean) income, by(age)
        tw line income age, sort
        Like the help file mentions, the twoway line command is built on the scatterplot. This makes it useful if you wanted to do things like create parallel coordinate plots, but makes it a bit more abstracted from creating line graphs of aggregated data.

        Comment


        • #5
          Thank you. I got this (please see attached)
          I was expecting to see a smooth concave relationship or a parabola shape. I don't know why
          Attached Files
          Last edited by Zuhumnan Dapel; 08 Feb 2016, 13:27.

          Comment


          • #6
            I still don't know what LCH means.

            Your age distribution is very spiky. That's quite common in census and survey results. E.g. see the graph on p.3 of http://www.stata.com/manuals14/rspikeplot.pdf

            Given your data, I would do something with the raw data like

            Code:
             
            ssc inst localp 
            localp income age
            It might make more sense to use geometric means, e.g.

            Code:
             
            gen ln_income = ln(income) 
            localp ln_income age, gen(mean_ln_income) 
            gen gmean_income = exp(mean_ln_income) 
            line gmean age, sort
            Don't use the defaults of any smoothing program, but think about smoothing more, and about smoothing less.

            Comment


            • #7
              Thanks a lot. From the attached graph, can one say that income falls with age and starts to rise with it after the age of 60? LCH means Life Cycle Hypothesis
              Attached Files

              Comment


              • #8
                That's trickier. For example, are these data cross-sectional? What selection problems are there? For example, the poor all too often die young in any case.

                Comment


                • #9
                  Thanks.Graph_gmean.gphThey are cohorts constructed from cross-sectional using Deaton(1985). The cohorts are defined by age and locations. For instance, individuals born in 1960 were tracked through time from 1980 to 2010. In 1980 they were 20, years, in 1985, 25, years ... and by 2010 they have aged by 30 years.
                  Attached Files
                  Last edited by Zuhumnan Dapel; 09 Feb 2016, 02:09.

                  Comment


                  • #10
                    Dear Nick,
                    Please see attached a graph (on age and consumption expenditure profiles) I recently produced. I used six rounds of household surveys (not panel, data stacked over years). Can one say consumption rises with age upto aged 21 and then starts to fall? A rise again from about age 50, exhibiting monotonicity?

                    Thanks,
                    Dapel
                    Attached Files

                    Comment


                    • #11
                      The graph makes no obvious sense to me: two spikes and one fairly smooth curve. It is not at all clear what your data are or what you did to get this curve. The rise for older people could just be a quirk of a few data points or it could be well supported. How are we supposed to be able to advise here?

                      After 240 posts now you should know now how the forum works! Please read the FAQ Advice again!

                      Comment


                      • #12
                        How many people aged 80+ are alive, healthy, and trusting enough to answer survey questions? In my experience the number of observations drops very quickly at those higher ages, and as a consequence I would not put much trust in any of those older estimates.
                        ---------------------------------
                        Maarten L. Buis
                        University of Konstanz
                        Department of history and sociology
                        box 40
                        78457 Konstanz
                        Germany
                        http://www.maartenbuis.nl
                        ---------------------------------

                        Comment


                        • #13
                          Zuhunan:
                          apart from gifted tennis or soccer players who can benefit from sky-rocketing disposable income, I find hard to believe (even dating back to the affluent 80's) that those aged 21 reported a spike in consumption. What level of education did they pursue? Were they all employed at 21 years?
                          Kind regards,
                          Carlo
                          (Stata 18.0 SE)

                          Comment


                          • #14
                            My experience with these kinds of graphs (which alludes to Carlo's comment) is that you have to consider how many individuals are represented at each age group. If you have only 3 individuals in the sample at age 21 and 200 individuals at age 50, it does not make much sense to look at the mean of these 3 individuals. You should first tabulate age and number of individuals before drawing any graphs. Usually the tails present the most problems.

                            Comment


                            • #15
                              Thank you all very much. What if I weed off the outliers in age say drop anything 80 and older?

                              Comment

                              Working...
                              X