I am really new to this and I have no idea how to use the ecdf function in R. Below I have mention everything step by step:
- Frequency of losses is defined using a Poisson distribution
- Generate an ecdf function that is going to be used for the severity of losses.
- Linearly interpolate the ecdf function.
- Take inverse transform of the linearly interpolated ecdf function.
For example,
I can use code freq <- rpois(10,5)
to generate the random number of loss frequency but further I have to use this vector to do steps 2-4 and I have no idea how to do that. For step 2 I am facing the problem that how can I use that Poisson distribution as an input and then use to compute severity using the ecdf function. If anybody knows this please help me.