View Single Post
  #147   Spotlight this post!  
Unread 18-04-2011, 11:39
Ed Law's Avatar
Ed Law Ed Law is offline
Registered User
no team (formerly with 2834)
 
Join Date: Apr 2008
Rookie Year: 2009
Location: Foster City, CA, USA
Posts: 752
Ed Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond reputeEd Law has a reputation beyond repute
Re: paper: New Scouting Database from Team 2834

Quote:
Originally Posted by Travis Hoffman View Post
Thanks, Ed!
Can you please explain in more detail the calculation on the WM Results tab, column G, "Wt. Avg. CCWM", when calculated in "default" mode? How is that number obtained? How is the weighting done?
Here is the quick answer directly from the macro.
Code:
    Case 2 To 7
        Range("G1").Select
        ActiveCell.Cells = "Wt.Avg" + cword
        For i = 1 To numrow
            rscale = 0
            rvalue = 0
            For j = 1 To numcol
                If (a(i, j) <> "") Then
                    If (a(i, j) <> 0) Then
                        rscale = rscale + 1 / (mcal - week(j))
                        rvalue = rvalue + a(i, j) / (mcal - week(j))
                    End If
                End If
            Next j
            If (rscale <> 0) Then
                rrvalue(i) = rvalue / rscale
            Else
                rrvalue(i) = -99
            End If
        Next i
When using default, mcal=7 means the weighed average is projected to Week 7. Basically the idea is earlier weeks has less weight than later weeks based on number of weeks to the projected week.
To translate this to English for the exact formula, it will have to wait until I have time after work.
__________________
Please don't call me Mr. Ed, I am not a talking horse.
Reply With Quote