I struggle using the panjer recursion. I'm given that the number of claims per year follows a negative binomial distribution with mean $4$ and variance $37$. Each claim is i.i.d. with possible values $2$, $3$, $7$, (each with probability $1/3$).
I need to implement the Panjer recursion in order to get the probability function of $S$, the aggregate annual loss amount, and plot the result.
I have some basics in R, I tried to find a function doing that but I don't seem to find the right one. Do you have any idea how I could start ?
Thanks in advance