Announcement

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

  • Negative Predicted Margins

    Hello everyone,

    I hope someone would be able to help me.

    I am trying to predict the probability to switch to manual (this variable is a dummy variable 0,1) which can not be negative. I used the following code

    Code:
        eststo: reghdfe Auto2Man l.sharpe_ratio l.PercentAutoBid l.c.PercentAutoBid#l.c.PercentAutoBid ///
        l.c.sharpe_ratio#l.c.PercentAutoBid l.c.sharpe_ratio#l.c.PercentAutoBid#l.c.PercentAutoBid,a(LenderId hour LoanId) cluster(interaction)
                estadd local LenderId "Yes", replace
                estadd local hour "Yes", replace
                estadd local LoanId "Yes", replace
        est store ManualSwitching
        
        nlcom -_b[l.PercentAutoBid]/(2*_b[l.c.PercentAutoBid#l.c.PercentAutoBid])
        margins,at(l.PercentAutoBid = (0(0.1)1)) saving(file3, replace)
        margins,dydx(l.sharpe_ratio) at(l.PercentAutoBid = (0(0.1)1)) saving(file4, replace)

    In the graph attached you can see a negative outcome, how is that possible? Am i doing something wrong?

    Thank you for your time
    Click image for larger version

Name:	Untitled.png
Views:	1
Size:	48.0 KB
ID:	1712561



    Said

  • #2
    one of the problems with using a linear model to estimate probabilities is that there are no bounds on the predicted values - that means you can get predicted probabilities below 0 or above 1; if you actually want risk differences, you will have to live with it; if you want to bound the predicted probabilities you will need to switch to a non-linear model (e.g., logistic regression)

    Comment


    • #3
      Thank you for your comment Rich.

      Comment


      • #4
        Not contradicting Rich Goldstein -- as his is the main point here -- but you seem to have quadratic and other product terms in your model, and that seems to be echoed unsurprisingly in your plot. I am clueless on what makes sense here but do you expect turning points on substantive grounds?

        Comment


        • #5
          Originally posted by Nick Cox View Post
          Not contradicting Rich Goldstein -- as his is the main point here -- but you seem to have quadratic and other product terms in your model, and that seems to be echoed unsurprisingly in your plot. I am clueless on what makes sense here but do you expect turning points on substantive grounds?
          Hello Nick,

          Thank you for your comment as well.

          Yes, a turning point is anticipated in this context, what I am trying to show is that as individuals gain confidence in their own investment decisions, they tend to reduce their reliance on automated systems.

          Comment


          • #6
            Understood, Well, it seems to me that you need a logit model -- or some other link that respects the limits of the outcome -- and I fear that it might be slow or otherwise difficult to fit with that regiment of predictors. How many parameters are you estimating and what is your sample size?

            Comment


            • #7
              Originally posted by Nick Cox View Post
              Understood, Well, it seems to me that you need a logit model -- or some other link that respects the limits of the outcome -- and I fear that it might be slow or otherwise difficult to fit with that regiment of predictors. How many parameters are you estimating and what is your sample size?
              Thank you again Nick.

              Unfortunately, a logit model is not possible as I have 25+ Million observations. Even running a linear probability model was very challenging on this sample size.

              Thank you again!

              Comment

              Working...
              X