Announcement

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

  • Finding a critical point in a regression analysis

    Hello fellow Statalists,

    I am currently performing an analysis of the effect of female participation in a specific programme on domestic violence rates.

    My data is setup in a district-level panel data with 45 districts over 15 years. I have a column for number of days that women have worked for the programme in that district(for each district each year), and a corresponding column for reported levels of crime in that district each year as well aka district panel data...

    I've done regressions and IV etc and can see that there is clearly a casual impact, but wanted to take it a step further by finding of there is some sort of critical number of days a women has to work in a specific district in order to see a statistically significant effect on there reported levels of crime.

    Ive considered threshold regression but this seems to mean having to manually test specific numbers for each district (by setting that number as a threshold).

    Would love to hear any advice for y'all about any smarter ways to go about finding this critical point!

    Thanks
    Rishi

  • #2
    Rishi:
    -margins- might be an option:
    Code:
    . use "C:\Program Files\Stata17\ado\base\a\auto.dta"
    (1978 automobile data)
    
    . reg price mpg
    
          Source |       SS           df       MS      Number of obs   =        74
    -------------+----------------------------------   F(1, 72)        =     20.26
           Model |   139449474         1   139449474   Prob > F        =    0.0000
        Residual |   495615923        72  6883554.48   R-squared       =    0.2196
    -------------+----------------------------------   Adj R-squared   =    0.2087
           Total |   635065396        73  8699525.97   Root MSE        =    2623.7
    
    ------------------------------------------------------------------------------
           price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             mpg |  -238.8943   53.07669    -4.50   0.000    -344.7008   -133.0879
           _cons |   11253.06   1170.813     9.61   0.000     8919.088    13587.03
    ------------------------------------------------------------------------------
    
    . margins, at( mpg =(10 20 30 40))
    
    Adjusted predictions                                        Number of obs = 74
    Model VCE: OLS
    
    Expression: Linear prediction, predict()
    1._at: mpg = 10
    2._at: mpg = 20
    3._at: mpg = 30
    4._at: mpg = 40
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |     Margin   std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             _at |
              1  |   8864.117   672.7324    13.18   0.000      7523.05    10205.18
              2  |   6475.174   312.6695    20.71   0.000     5851.879    7098.469
              3  |    4086.23   553.5182     7.38   0.000     2982.812    5189.649
              4  |   1697.287   1038.475     1.63   0.107    -372.8746    3767.448
    ------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thank you for your reply Carlo.

      I don't seem to understand why it is that for my data, at all margins across the scale I am getting a significant value P=0.00.

      Could you perhaps explain what this margins command does and if possible provide an alternative approach?

      Comment


      • #4
        to note additionally, if I do for example reg yvar xvar if xvar<=value then I do start to see insignificant values at those lower parts, but this isn't shown when I use the margins command.

        Thank you for help

        Comment


        • #5
          Rishi:
          1) in my previous reply, -margins- fixed -age- at the values provided between brackets. I see that, in all likelihood, this is not what you're looking for;
          2) the results of your last code are probaly conditional on a limited within panel variation. That said, I'd not switch from -xtreg- to -regress- with panel data;
          3) if a (fuzzy?) RDD is out of debate, perhaps you can challenge yourself with -lincom-.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment

          Working...
          X