I have a distribution of observed measurements and I want to compare it to sampled distributions, using R. I have a program that samples distributions, according to a certain low of probability / constraint.
Suppose I have:
- $m$ observed measurements
- two sets of $n$ samples of $m$ measurements
I'd like to compute:
- the average cumulative distribution function (a-cdf) of the first set of samples (its value at each evaluation points is the mean value of the cdf of each sample at this evaluation point, and the evaluation points are the pooled $n\cdot m$ measurements)
- the 95% envelope of the first set of samples
- the spatial distribution index (sdi) of my observed measurements using the second set of $n$-samples. To compute the sdi, we compute all the maximum differences between the cdf of each new sample and the a-cdf, and the maximum difference between the observed cdf and a-cdf. That makes $n+1$ points, and the sdi is the rank of the observed difference among the $n+1$ differences.
I'd like to know if thoses function exists in R, and if not, what would be the smartest way to implement them. Hope i'm clear enough.