Announcement

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

  • Generating variables for probit model

    Hey statatlist,

    I am working on a panel-dataset with footballplayers and their performance for each season.
    Besides that I also have a dummy-variable which is 1 if the footballplayer gets sold the particular season.

    Now what I could really need some support with:

    1. I want to generate a variable that is a prediction of the performance after a transfer. I am using a fixed effect model to measure the effect of sold=1, and now I want the predicted performance after sold=1, if that makes sense?

    2. I want to generate a dummy variable that is 1 if the performance for the particular season after the transfer is below the predicted performance and 0 if the performance is above the predicted performance.


    I have the following variables:
    SeasonID: Ranging from 1-6 (since I am working with up to 6 seasons per player)
    PlayerID: Name of the player
    Year: The season of interest (2011/2012, 2012/2013, etc.)
    Sold: Dummy variable -> 1 if sold 0 if not
    Performance: Performance-measure for each player per season


    This is my first post, so if you need some sort of summary of my data please let me know.

    Best regards,
    Martin


  • #2
    Martin:
    welcome to this forum.
    I'm not clear with the dependent variable of your panel data regression (#goals scored during a given season?). If this were the case, player's performance and sold/not sold categorical variables would be both predictors. Hence, you can interact them (I assume that -performance- too is categical and probably ordered, such as -bad-, -good-, -outstanding-):
    Code:
    xtpoisson goals i.performance##I.sold, fe
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Dear Carlo,

      Thanks for your answer. I apologize for not being clear.

      The dependent variable is Performance, which is ranked from 1-10.

      Comment


      • #4
        Martin:
        thanks for clarifications.
        Some comments, then:
        1) if performance is (as expected) an ordered multinomial variable, you should go -xtologit- (that does not support -fe-, though). Hence a probit/logit model seems out of debate here.
        2) what basically strikes me with your model is the risk of endogeneity due to reverse causality. A soccer player can be sold to another team due to his (I assume you're interested in male leagues only) bad performance (usually measured in the previous year, but transfers can also occur within the season). This is the characteristic of your model that I would take up with your supervisor/teacher (unfortunately, my knowledge of sport maths is limited to tennis and basketball).
        Typo correction:
        in my previous post the correct code should have been:
        Code:
        xtpoisson goals i.performance##i.sold, fe
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Originally posted by Carlo Lazzaro View Post
          Martin:
          thanks for clarifications.
          Some comments, then:
          1) if performance is (as expected) an ordered multinomial variable, you should go -xtologit- (that does not support -fe-, though). Hence a probit/logit model seems out of debate here.
          2) what basically strikes me with your model is the risk of endogeneity due to reverse causality. A soccer player can be sold to another team due to his (I assume you're interested in male leagues only) bad performance (usually measured in the previous year, but transfers can also occur within the season). This is the characteristic of your model that I would take up with your supervisor/teacher (unfortunately, my knowledge of sport maths is limited to tennis and basketball).
          Typo correction:
          in my previous post the correct code should have been:
          Code:
          xtpoisson goals i.performance##i.sold, fe
          Thank you very much Carlo.

          Comment

          Working...
          X