Dummy variable or if statement

1 view (last 30 days)
Mathias Heuser
Mathias Heuser on 29 Feb 2020
Answered: Puru Kathuria on 12 Mar 2020
Hi.
I am trying to make a OLS regression on to explain what factors explain if a team is winning a game. I have a lot of data, and the full time result (FTR), is being defined as H (if homewin), D (if draw), A (if away win).
So I want to make a regression that looks only at the home teams, so I want to find out if shots (from home team), has any effect on explaying the outcome of the game.
My problem is, that I do not know how to handle my dependent variable (y), since the three variables that occur, is H, D and A.
I hope you guys understand my question, otherwise ask, and I will try to clarify. I hope you can help me.
  2 Comments
Mathias Heuser
Mathias Heuser on 29 Feb 2020
I am thinking about trying to use a dummy variable for H (home victory), so 1 for homewin and 0 if not homewin. Would this work and, how should i do this - using dummyvar?
dpb
dpb on 29 Feb 2020
If the hypothisis is to have a win or not, then a Draw is not a win so lumping Loss and Draw as reponse variable is reasonable. You have, of course, then eliminated the possibility of precditing a draw, but that may not be of particular interest.

Sign in to comment.

Answers (1)

Puru Kathuria
Puru Kathuria on 12 Mar 2020
Hi,
As far as I understand, you want to analyse the variable "shots" and its impact on the final result. I think the following might help you in doing so. You can break your classes into two groups and also threshold the variable Shots to break it into two groups and then analyse statistical parity(also known as equal acceptance rate).
Statistical Parity:
A model satisfies this definition if subjects in both protected and unprotected groups have equal probability of being assigned to the positive predicted class.
In your example protected and unprotected groups can be the variable ‘Shots’ and classes can be Homewin and not Homewin.
OR
Now, you can see the ratio of the above probabilites and compare it with a threshold to see if it satisfies the above definition or not.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!