Description Usage Arguments Details Value Examples
Resample to obtain variance estimates for WAR.
1 2 3 4 5 6 7 8 9 10 |
data |
An object that contains |
N |
the number of resamples (default 10) |
resample |
An element of |
... |
additional arguments passed to |
The general idea is to use resampling techniques to compute
variance estimates for openWAR. The resample
argument controls
how that resampling is done.
For resample = 'plays'
, makeWAR
is run on the actual
plays passed in the data
argument, if it hasn't been computed already.
The resulting RAA values (for each play) are an estimate of what actually happened.
These RAA values are resampled N
times.
resample = 'models'
is not currently implemented, but in future versions,
this option would allow you to resample the rows of the original data, run
makeWAR
on each resampled data set, collect all of the models
generated during that process, and then evaluate the original data using each
of the resampled models. This would allow you isolate the modeling error.
For resample = 'both'
, the plays are resampled, and makeWAR
is computed on each resampled data set. Note that this is both computationally
and memory intensive.
a do.openWARPlayers
data frame with RAA values
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
res <- shakeWAR(May, resample='plays', N=5)
summary(res)
## End(Not run)
## Not run:
owar <- shakeWAR(MayProcessed, N = 5)
summary(owar)
## End(Not run)
## Not run:
owar <- shakeWAR(MayProcessed$openWAR, N = 5)
summary(owar)
## End(Not run)
## Not run:
owar <- shakeWAR(May, N = 7)
summary(owar)
owar <- shakeWAR(May, N = 2, resample = "both")
summary(owar)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.