I have a time series of annual rainfall data and I wish to calculate the return period curve for this data. To do this, I have used Matlab to fit a gamma distribution, and then used the Lilliefors test to test the distribution fit. If I cannot reject the null hypothesis at the 5% level, I will use the fitted gamma distribution to calculate the return period. I have done this fine, but what I need to do is calculate the confidence interval for this return period curve.
How do I go about doing this? I am not a statistician, so I am struggling to understand a lot of the information I have found online about how to do this. If anyone can explain it to me quite simply, that would be great! I appreciate there may be inbuilt ways of doing this in Matlab, but I need to understand the process behind it so I can write it up in my thesis.
This image is an example of what I want to produce.
This is done using the extRemes package for R, but I want to recreate this myself as the package doesn't use the gamma distribution to do the fitting. I think this figures uses the GEV distribution. I have currently reproduced the black line (the return period curve calculated after fitting the gamma distribution) from my data, but I don't know how to do the blue lines (the confidence interval).