Announcement

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

  • curve fitting for non-linear scatterplot?

    Hello everybody,

    I hope this message is not improper, in case please discard or delete.

    I have a two periods (unbalanced) panel made of 1121 groups of individuals. For each period, I have an individual-level output variable, respectively called action_(i,T1) and action_(i,T2). This variable is continuous and bounded between 0 and 1. I am trying to test the effects of group influence at period t1 on the action at period T2.

    My explorative strategy is to perform a simple fractional regression panel at period T1, collect the resulting fixed effects, which would capture the group effect on individual action t1 and regress action_(i,T2) on the fixed effects, in other words, I wanted to do:

    Code:
    xtset groups
    fracreg probit action_t1 age age2 sex i.ethnic group1-group1121, vce(cluster groups)
    I then extract and stored the fixed effects in vector fe_t1 and computed the empirical ECDF to rank them. (an operation that I performed through a different software which I am more familiar with) and plotted

    Code:
    g diff_effect = action_t1 - ecdf_fe_t1
    
    scatter action_t2 diff_effect
    I am enclosing the resulting scatterplot at the following link:

    scatterplot: https://i.ibb.co/LtnvYxp/image.png

    My preliminary interpretation of this, focusing on the orthant x > 0, is that there is a negative (but non linear) relationship between action at time 2 and diff_FE.


    I would like to ask the community if this strategy makes any sense at all, and whether there is an in-built tool in stata to explore the type of possible curve-fitting within a standard OLS setting for this type of non-linear data. I apologize for the question, I am not very familiar with Stata.

    thank you,
    paola


    Last edited by Paola Bertolini; 19 Dec 2023, 19:41.

  • #2
    The big problem does not seem to be one of graphics, but one of how to estimate and interpret models for bounded variables in a panel context. I will ping Jeff Wooldridge here as he is the expert on this topic and may miss it because of the title.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Dear Maarten,

      many thanks for the kind help. Perhaps I can try to adapt my problem to the setting of Papke and Woolridge 2008?

      I understand that group effects even in the context of random assignment (as it is in this case) is tricky because of the reflection problem. I also have another variable in my dataset indicating participation to clubs, but I guess this is heavily plagued by self-selection.

      Perhaps, to explore the existence of peer effects one could start from the following (please don't kill me if it's too naive).

      Using a static setting,

      Code:
       xtset groups action = action_t1 + action_t2
      
      fracreg probit action age age2 sex i.ethnic group1-group1121, vce(cluster groups)
      We then extract the fixed effects given by group1-group1121. If I understand, the fixed effects can be positive or negative depending on the reference group, hence I need to find an objective ranking measurement. I thought that ECDF would be suited, but I would be happy to use a better one, if recommended.

      Then, given this ranking, we draw a plot where each point on the x-axis corresponds to the value of action, and on the y axis we have the average value of the empirical ECDF of group effects computed on all individuals with that level of action.

      I enclose a picture of my (sad) graph at the following link: https://ibb.co/hDQC4rR

      Thanks again for the patience and generous support,
      paola
      Last edited by Paola Bertolini; 20 Dec 2023, 02:23.

      Comment


      • #4
        Jeff lives in a different time zone. Give him time to wake up.
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment

        Working...
        X