Description Usage Arguments Details Value Author(s) References See Also Examples
Calculates possessions, pace, offensive and defensive rating, and Four Factors
1  fourfactors(TEAM, OPP)

TEAM 
a data frame whose rows are the analyzed teams and with columns referred to the team achievements in the considered games (a box score); required variables: 
OPP 
a data frame whose rows are the analyzed teams and with columns referred to the achievements of the opponents of each team in the considered game; required variables: 
The rows of the TEAM
and the OPP
data frames must be referred to the same teams in the same order.
Required columms:
Team
, a factor with the name of the analyzed team
P2A
, a numeric variable (integer) with the number of 2points shots attempted
P2M
, a numeric variable (integer) with the number of 2points shots made
P3A
, a numeric variable (integer) with the number of 3points shots attempted
P3M
, a numeric variable (integer) with the number of 3points shots made
FTA
, a numeric variable (integer) with the number of free throws attempted
FTM
, a numeric variable (integer) with the number of free throws made
OREB
, a numeric variable (integer) with the number of offensive rebounds
DREB
, a numeric variable (integer) with the number of defensive rebounds
TOV
, a numeric variable (integer) with the number of turnovers
MIN
, a numeric variable (integer) with the number of minutes played
An object of class fourfactors
, i.e. a data frame with the following columns:
Team
, a factor with the name of the analyzed team
POSS.Off
, a numeric variable with the number of possessions of each team calculated with the formula POSS=(P2A+P3A)+0.44*FTAOREB+TOV
POSS.Def
, a numeric variable with the number of possessions of the opponents of each team calculated with the formula POSS=(P2A+P3A)+0.44*FTAOREB+TOV
PACE.Off
, a numeric variable with the pace of each team (number of possessions per minute played)
PACE.Def
, a numeric variable with the pace of the opponents of each team (number of possessions per minute played)
ORtg
, a numeric variable with the offensive rating (the points scored by each team per 100 possessions)
DRtg
, a numeric variable with the defensive rating (the points scored by the opponents of each team per 100 possessions)
F1.Off
, a numeric variable with the offensive first factor (effective field goal percentage)
F2.Off
, a numeric variable with the offensive second factor (turnovers per possession)
F3.Off
, a numeric variable with the offensive third factor (rebouding percentage)
F4.Off
, a numeric variable with the offensive fourth factor (free throw rate)
F1.Def
, a numeric variable with the defensive first factor (effective field goal percentage)
F2.Def
, a numeric variable with the defensive second factor (turnovers per possession)
F3.Def
, a numeric variable with the defensive third factor (rebouding percentage)
F4.Def
, a numeric variable with the defensive fourth factor (free throw rate)
Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)
P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.
1 2 3  selTeams < c(2,6,10,11)
FF < fourfactors(Tbox[selTeams,], Obox[selTeams,])
plot(FF)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.