MyNixOS website logo
Description

Bradley-Terry Model with Exponential Time Decayed Log-Likelihood and Adaptive Lasso.

We utilize the Bradley-Terry Model to estimate the abilities of teams using paired comparison data. For dynamic approximation of current rankings, we employ the Exponential Decayed Log-likelihood function, and we also apply the Lasso penalty for variance reduction and grouping. The main algorithm applies the Augmented Lagrangian Method described by Masarotto and Varin (2012) <doi:10.1214/12-AOAS581>.

BTdecayLasso

CRAN Downloads Last Commit

Bradley-Terry model is used for ranking in sports tournament. Given the standard Bradley-Terry model, we use an exponential decay rate to weight its log-likelihood function and apply Lasso penalty to achieve a variance reduction and team grouping.

Installation

You can install BTdecayLasso from github with:

# install.packages("devtools")
devtools::install_github("heilokchow/BTdecayLasso")

Example

This is a basic example which shows you how to solve a common problem:

First, given raw datasets (five columns are home teams, away teams, home wins, away wins, time until now), we convert this dataset into a dataframe which can be used for other function’s input.

NFL <- BTdataframe(NFL2010)

Then, we comput the whole Lasso path for further analysis’s use. In this example, to track the dynamically changing abilities, we set ‘decay.rate’ to be 0.005. A higher decay rate will give more unbiased results for current abilites’ estimation with a side effect of higher variance.

BTM <- BTdecayLasso(NFL$dataframe, NFL$ability, decay.rate = 0.005, fixed = NFL$worstTeam)

We can use ‘plot’ function to view the whole Lasso path.

plot(BTM)

The optimal model is selected using AIC criteria on HYBRID Lasso’s run here.

BTO <- BTdecayLassoC(NFL$dataframe, NFL$ability, decay.rate = 0.005, fixed = NFL$worstTeam,
                     model = BTM, criteria = "AIC", type = "HYBRID")
summary(BTO)

Finally, we use bootstrapping to obtain the standard deviation of this choosen model with 100 times of simulation.

BT <- boot.BTdecayLasso(NFL$dataframe, NFL$ability, BTO$Optimal.lambda, decay.rate = 0.005, 
                        fixed = NFL$worstTeam, boot = 100)
summary(BT)
Metadata

Version

0.1.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows