2
$\begingroup$
    GAME_DATE   TEAM_ABBREVIATION   MIN
0   2019-10-22  LAC                 9.633333
1   2019-10-22  LAC                 26.433333
2   2019-10-22  LAC                 31.350000
3   2019-10-22  LAC                 38.350000
4   2019-10-22  LAC                 31.550000
5   2019-10-22  LAC                 19.266667
6   2019-10-22  LAC                 29.166667
7   2019-10-22  LAC                 17.483333
8   2019-10-22  LAC                 36.716667
9   2019-10-22  LAL                 16.933333
10  2019-10-22  LAL                 37.350000
11  2019-10-22  LAL                 36.000000
12  2019-10-22  LAL                 17.333333
13  2019-10-22  LAL                 27.383333
14  2019-10-22  LAL                 32.316667
15  2019-10-22  LAL                 13.350000
16  2019-10-22  LAL                 16.233333
17  2019-10-22  LAL                 19.033333
18  2019-10-22  LAL                 24.033333

I want to run a regression to predict MIN which is minutes played by an NBA player in a game.

For each game a teams minutes should sum to at least 240, for example if I ran a regression and got predicted values, for rows 0-8 the sum of the expected values should sum to at least 240.

Is there anything that can be done to add this "constraint" to a regression where there are groups of dependent variables that need to sum to a certain value?

$\endgroup$
9
  • $\begingroup$ You can look at this question: stats.stackexchange.com/questions/79059/… $\endgroup$
    – Yair Daon
    Commented Jul 6, 2022 at 6:58
  • $\begingroup$ Does this answer your question? Linear regression with constrained coefficient $\endgroup$
    – Yair Daon
    Commented Jul 6, 2022 at 6:59
  • 1
    $\begingroup$ @YairDaon The constraints are on the outputs, not inputs/coefficients. $\endgroup$ Commented Jul 6, 2022 at 7:00
  • $\begingroup$ I think the constraints must include the non-negativity of all values. I think the "real" model is more complicated, since you should first build a count variable for the number of overtimes and then, given the number of OTs, you'd have the constraint both on the total time, and on the time per player (in case of no OTs, not above 48). I think the number of minutes of the last player could be removed from the equation and calculated as difference. Still, there should be the constraint that such number is between 0 and (in case of no OT) 48. $\endgroup$ Commented Jul 6, 2022 at 7:08
  • $\begingroup$ @FedericoTedeschi I would not know ahead of time if a game went to overtime, this also doesn't constrain the outputs as a group to make sure the sum of the group is 240 minimum which is 48 minutes * 5 players on the court so the sum of the outputs should always be at least 240 $\endgroup$
    – radio23
    Commented Jul 6, 2022 at 17:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.