vwp_compute_pwp: Compute point-win probabilities

Description Usage Arguments Value

View source: R/vwp_compute_pwp_workflow.R

Description

Computes input and output win probabilities for an entire set of plays.

Usage

1
vwp_compute_pwp(plays, PWP, coef_matrices)

Arguments

plays

a dv_plays object or data frame containing play-by-play data

PWP

a vector of length 3 giving the estimating point-win probabilities for an average in-system, net play, and out-of-system attack (in that order).

coef_matrices

a list of length 5 giving coefficient estimates for multinomial logistic regression models for attacks off a set ($system_attack), attacks off net play/overpass ($net_attack), digs ($dig), sets ($set), serves ($serve), and freeballs ($freeball). Currently $system_attack, $net_attack, $dig, and $set should be data frames and $serve and $freeball should be single numbers (as there is no model for serve/freeball yet).

Value

The same data frame, with three new columns (input_pwp, output_pwp, pwp_diff) representing the input and output point-win probabilities for the touch and the difference in point-win probability resulting from the touch


dpwynne/volleyWP documentation built on Dec. 20, 2021, 1:13 a.m.