powered by
Setups the data matrices for the use of WinBUGS in the career trajectory application.
careertraj.setup(data)
vector of player names
matrix of home runs for players where a row corresponds to the home runs for a player during all the years of his career
matrix of AB-SO for all players
matrix of ages for all players for all years of their careers
vector of number of seasons for all players
number of players
data matrix for ballplayers with variables Player, Year, Age, G, AB, R, H, X2B, X3B, HR, RBI, BB, SO
Jim Albert
data(sluggerdata) careertraj.setup(sluggerdata)
Run the code above in your browser using DataLab