I’m looking to build an ARIMA model in R to help me predict the number of shots a football player is going to take in a game.
I have last season's data to analyse to determine the optimal lags for my AR and MA parameters. I have a data frame in R, with the columns for the player name, date of match and the number of shots.
Unfortunately, I only have a maximum 38 data points for each player which isn’t enough to build a statistically confident model. I suspect I need a way to analyse the data holistically/all-at-once to help me determine the optimal lags.
I don’t, however, know how to do that or even if this is a statistically sound technique.
At the moment I am just analysing my residuals (which have come from a linear regression with independent variables such as Home/Away and Team Possession) with code such as the following:
Is there a way to instruct R to perform this ARIMA analysis whilst looking at lots of mini-groups (where the groups are categorised by player name)?
Any help would be much appreciated.