View previous topic :: View next topic |
Author |
Message |
supersub15
Joined: 21 Sep 2006 Posts: 273
|
Posted: Wed Sep 29, 2010 11:24 am Post subject: How to set up an SRS spreadsheet? |
|
|
Trying to wrap my head around applying this SRS explanation to an Excel spreadsheet.
Has anyone done it before? Thanks for any help. |
|
Back to top |
|
|
DSMok1
Joined: 05 Aug 2009 Posts: 611 Location: Where the wind comes sweeping down the plains
|
|
Back to top |
|
|
supersub15
Joined: 21 Sep 2006 Posts: 273
|
|
Back to top |
|
|
DSMok1
Joined: 05 Aug 2009 Posts: 611 Location: Where the wind comes sweeping down the plains
|
|
Back to top |
|
|
supersub15
Joined: 21 Sep 2006 Posts: 273
|
Posted: Wed Sep 29, 2010 12:25 pm Post subject: |
|
|
Thanks. When you have a minute, can you over some of the main fields? |
|
Back to top |
|
|
DSMok1
Joined: 05 Aug 2009 Posts: 611 Location: Where the wind comes sweeping down the plains
|
Posted: Wed Sep 29, 2010 12:59 pm Post subject: |
|
|
supersub15 wrote: | Thanks. When you have a minute, can you over some of the main fields? |
The basic concept is this:
Take each game played (that's the lower table). Assign a value for the winning and losing team, initially not adjusted for opponent. The upper table has a list of teams. The first column (Eff 1) simply sums up that team's unadjusted value, using sumproduct to cull through the games and get the total for the specific team.
Then, down at the lower table, each team is assigned a second value for the game, adjusting by the team strength as initially estimated by Eff 1. (That's Iteration 1 Team1 and Team2, and Iteration 2 EM2W and EM2L, or effective margin 2 winner and loser.) Then Eff 2 up above sums the effective margin from iteration 2. And the process continues, until there is no significant change from iteration to iteration.
I limit myself to 20 iterations in general, though by the end of the season with a ton of games there can still be a slight change from iteration 19 to 20.
I'm sure the same process could be done with a macro, as well. _________________ GodismyJudgeOK.com/DStats
Twitter.com/DSMok1 |
|
Back to top |
|
|
The Specialist
Joined: 23 Apr 2008 Posts: 16 Location: Houston, TX
|
Posted: Wed Sep 29, 2010 5:55 pm Post subject: |
|
|
No offense, but that is much more complicated than it should be. Go by the library and check out Mathletics, there is a section on creating Power Rankings that lays out the easiest way to do this in Excel. |
|
Back to top |
|
|
DSMok1
Joined: 05 Aug 2009 Posts: 611 Location: Where the wind comes sweeping down the plains
|
Posted: Wed Sep 29, 2010 10:47 pm Post subject: |
|
|
The Specialist wrote: | No offense, but that is much more complicated than it should be. Go by the library and check out Mathletics, there is a section on creating Power Rankings that lays out the easiest way to do this in Excel. |
I'm sure that was complicated, but at least it's easy to understand. Any hints on the Excel "best practice" that you are talking about? What kinds of formulas would one use? _________________ GodismyJudgeOK.com/DStats
Twitter.com/DSMok1 |
|
Back to top |
|
|
The Specialist
Joined: 23 Apr 2008 Posts: 16 Location: Houston, TX
|
Posted: Wed Sep 29, 2010 11:23 pm Post subject: |
|
|
Hey DSMok1-
I have SRS set up "my way" in Excel for NBA and NFL, but I actually tried to set up using your NCAA FB numbers and ran into an issue. I use the SOLVER, and it can only handle 200 variables. However, with there being 121 teams in NCAA FB, it's not possible using my methods. |
|
Back to top |
|
|
DSMok1
Joined: 05 Aug 2009 Posts: 611 Location: Where the wind comes sweeping down the plains
|
Posted: Thu Sep 30, 2010 12:08 pm Post subject: |
|
|
The Specialist wrote: | Hey DSMok1-
I have SRS set up "my way" in Excel for NBA and NFL, but I actually tried to set up using your NCAA FB numbers and ran into an issue. I use the SOLVER, and it can only handle 200 variables. However, with there being 121 teams in NCAA FB, it's not possible using my methods. |
I've used the solver methods also, but I like the "obviousness" of the all-in-front of you approach.
I'd love for Solver to handle more than 200 variables!! _________________ GodismyJudgeOK.com/DStats
Twitter.com/DSMok1 |
|
Back to top |
|
|
Rhuidean
Joined: 11 Mar 2010 Posts: 40 Location: East Bay, CA
|
Posted: Thu Sep 30, 2010 10:43 pm Post subject: . |
|
|
Never implemented this before myself before, but I coded it up in Octave
EDIT: Fixed a few typos in the comments, here is the new version (http://pastebin.com/hSu5D5bd)
Here is a sample run:
octave:33> clear;srs
R =
0.94568
1.79588
0.10213
1.96496
2.06186
octave:34> M
M =
0 0 1 0 1
0 0 0 1 0
1 0 0 0 0
0 1 0 0 0
1 0 0 0 0
octave:35> V
V =
0.22436
1.14089
-0.21310
1.36633
1.74663
octave:36> N
N = 5
octave:37> G
G = 3
octave:39> Matchups_vec
Matchups_vec =
2 4
1 5
3 1
So I have an N=5 team league, with 3 games played thus far. The vector V gives the point margin for the 5 teams. The Matchups_vec and the matrix M tell the same thing; we've seen a game with team 2 versus team 4, team 1 versus team 5, and team 3 versus team 1.
Running the code then gives the ratings specified by the vector R for each team.
If you don't use Matlab/Octave, you can probably convert the code I wrote into your preferred language.
Feel free to download the above and play around with it. Let me know if you catch any bugs (or have any questions.)
And of course, as you can see from the code I wrote, you can try any values of N (number of teams), G (number of games), Matchups_vec, etc you like. |
|
Back to top |
|
|
DSMok1
Joined: 05 Aug 2009 Posts: 611 Location: Where the wind comes sweeping down the plains
|
Posted: Fri Oct 01, 2010 12:14 pm Post subject: Re: . |
|
|
Rhuidean wrote: | Never implemented this before myself before, but I coded it up in Octave
|
Nice!
On the one I implemented, though, I have the ability to adjust each game differently--for instance, using curve for the "value" of the point margin instead of the actual points. (In other words, giving a minimum value for each win and a maximum value to prevent blowouts from over-weighting things.)
How hard would it be to implement something like that? I think it would require a totally different approach. _________________ GodismyJudgeOK.com/DStats
Twitter.com/DSMok1 |
|
Back to top |
|
|
Rhuidean
Joined: 11 Mar 2010 Posts: 40 Location: East Bay, CA
|
Posted: Fri Oct 01, 2010 1:38 pm Post subject: . |
|
|
Is that just a preprocessing step? So rather than using the team's actual point margin (which is a sum of the point margins over the games it played), you transform each of the game point margins in some way (for example, capping it somehow, transforming it to +1 for win, -1 for loss, 0 for tie?)
Or is it something a bit different from preprocessing?
If it is just preprocessing, then you'd probably want to write a bit of code that handles that step first, before you hand it off. |
|
Back to top |
|
|
JoshEngleman
Joined: 27 Dec 2007 Posts: 1
|
Posted: Sun Oct 17, 2010 12:49 pm Post subject: Re: How to set up an SRS spreadsheet? |
|
|
I'm trying to replicate your spreadsheet but I'm having trouble with one section. I have no idea what the "cubic" section is for, nor where those numbers are coming from. The first Eff margin column looks up the Margin in the cubic table, but I have no clue what those numbers represent. If you could help me out, that would be great. |
|
Back to top |
|
|
DSMok1
Joined: 05 Aug 2009 Posts: 611 Location: Where the wind comes sweeping down the plains
|
Posted: Sun Oct 17, 2010 3:49 pm Post subject: Re: How to set up an SRS spreadsheet? |
|
|
JoshEngleman wrote: |
I'm trying to replicate your spreadsheet but I'm having trouble with one section. I have no idea what the "cubic" section is for, nor where those numbers are coming from. The first Eff margin column looks up the Margin in the cubic table, but I have no clue what those numbers represent. If you could help me out, that would be great. |
Oh--the cubic was a curve I generated (elsewhere) as to how much each point margin "means" in a predictive sense--so it's peripheral to the SRS itself. Basically, if a team won by 45 points, how many points are they really better? Less than 45, in a predictive sense. A true SRS is 1-to-1 (no cap or attenuation), so when looking up 45, you get 45 as the initial effective margin (not accounting for the opponent). _________________ GodismyJudgeOK.com/DStats
Twitter.com/DSMok1 |
|
Back to top |
|
|
|