Announcement

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

  • Plot an Inverted U-shaped Curve for different sub-groups

    Hi all,

    This is the dataex of my dataset. I am working on the impact of drinking alcohol on earnings with the following variables:

    Code:
    input float drink_intensity byte educgrp float ln_earnings
      4 1  8.517193
     .5 3  9.903487
     .5 3  10.08581
      1 4 11.523855
     12 3  9.305651
     30 3 10.308952
    • drink_intensity: numbers of drinking units per week (continuous data)
    • drink_intensity_sq: square of drink_intensity
    • educgrp: education level
    • ln_earnings: log of earnings
    • Other control variables
    I run a regression with ln_earnings as the dependent variables, drink_intensity and its square as the independent variables, and other controls (education, polynomial of age, dummy var whether their health prevent them from working, dummy var whether their health limit their working). And I run 2 separated regression on males and females. An expected result is inverse U-shaped curve.


    Code:
    regress ln_earnings age age_2 age_3 age_4 bmi limited_work_health unable_work_health i.educgrp drink_intensity drink_intensity_sq if female==0
    
    regress ln_earnings age age_2 age_3 age_4 bmi limited_work_health unable_work_health i.educgrp drink_intensity drink_intensity_sq if female==1

    This is the result table for Males, which confirms the Inverse U-shaped curve:
    Click image for larger version

Name:	Males regress model 1.png
Views:	1
Size:	36.0 KB
ID:	1658687



    From these coefficients, I can calculate the turning point -b/2a. However, I would do the following things as well:

    1. How to imply the percentage of wage increase between a person who drink 10 units per week vs a person who does not drink at all? Where should I plug in the 10 units? (Wanna do this because I found a paper did exactly the same model with me, and had this interpretation).

    2. How can I plot an U-shaped curve for males and females separately? I use the following code but seem like it plots the curve for the whole population, not just for mens. if command doesn't work.

    Code:
    regress ln_earnings age age_2 age_3 age_4 bmi limited_work_health unable_work_health i.educgrp drink_intensity drink_intensity_sq if female==0
    margins, at(drink_intensity = (0(1)90))
    marginsplot
    This is the result (which is not an U-curved at all and apprently on the whole population, not on males only):
    Click image for larger version

Name:	Plot U.png
Views:	1
Size:	40.9 KB
ID:	1658688




    3. I also tested U-shape using the -utest- command and they are all significant. But again, it is on the whole population, not specifically on females or males.
    Click image for larger version

Name:	Example.png
Views:	1
Size:	12.2 KB
ID:	1658685





    THANK YOU SO MUCH!!
    Last edited by Anh Quynh Nguyen; 08 Apr 2022, 09:55.

  • #2
    A graph like

    Code:
    twoway function 0.003834 * x - 0.0000708 * x^2, ra(-50 100) xli(0)
    may help here.

    Comment


    • #3
      Originally posted by Nick Cox View Post
      A graph like

      Code:
      twoway function 0.003834 * x - 0.0000708 * x^2, ra(-50 100) xli(0)
      may help here.
      Hi Nick,

      Thanks for your response. The graph looks good. I am wondering if I should plug in the constant -12.78465 into the code, otherwise the graph will intersect (0;0). If yes, can you give me the code? Thanks a lot!!

      Comment


      • #4
        The intercept is irrelevant to the position of the turning point.

        Comment

        Working...
        X