runexp: Softball Run Expectancy using Markov Chains and Simulation

Implements two methods of estimating runs scored in a softball scenario: (1) theoretical expectation using discrete Markov chains and (2) empirical distribution using multinomial random simulation. Scores are based on player-specific input probabilities (out, single, double, triple, walk, and homerun). Optional inputs include probability of attempting a steal, probability of succeeding in an attempted steal, and an indicator of whether a player is "fast" (e.g. the player could stretch home). These probabilities may be calculated from common player statistics that are publicly available on team's webpages. Scores are evaluated based on a nine-player lineup and may be used to compare lineups, evaluate base scenarios, and compare the offensive potential of individual players. Manuscript forthcoming. See Bukiet & Harold (1997) <doi:10.1287/opre.45.1.14> for implementation of discrete Markov chains.

Version: 0.2.1
Depends: R (≥ 3.6)
Imports: doParallel, foreach, parallel
Suggests: xml2, rvest
Published: 2021-03-22
DOI: 10.32614/CRAN.package.runexp
Author: Annie Sauer [aut, cre], Sierra Merkes [aut]
Maintainer: Annie Sauer <anniees at>
License: LGPL-2 | LGPL-2.1 | LGPL-3 [expanded from: LGPL]
NeedsCompilation: no
Materials: README
In views: SportsAnalytics
CRAN checks: runexp results


Reference manual: runexp.pdf


Package source: runexp_0.2.1.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): runexp_0.2.1.tgz, r-oldrel (arm64): runexp_0.2.1.tgz, r-release (x86_64): runexp_0.2.1.tgz, r-oldrel (x86_64): runexp_0.2.1.tgz
Old sources: runexp archive


Please use the canonical form to link to this page.