Dummy variable or if statement

1 次查看(过去 30 天)
Mathias Heuser
Mathias Heuser 2020-2-29
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 个评论
Mathias Heuser
Mathias Heuser 2020-2-29
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 2020-2-29
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.

请先登录,再进行评论。

回答(1 个)

Puru Kathuria
Puru Kathuria 2020-3-12
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.

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by