stieltjes(f, M, ...)
f
will be
integrated. An object of class "fv"
.f
.M
.One common use of the Stieltjes integral is to find the mean value of a random variable from its cumulative distribution function $F(x)$. The mean value is the Stieltjes integral of $f(x)=x$ with respect to $F(x)$.
The argument f
should be a function
in the Rlanguage.
It should accept a numeric vector argument x
and should return
a numeric vector of the same length.
The argument M
should be a function value table
(object of class "fv"
, see fv.object
).
Such objects are returned
by the commands link{Kest}
, Gest
, etc.
fv.object
,
Gest
data(redwood)
# estimate cdf of nearest neighbour distance
G <- Gest(redwood)
# compute estimate of mean nearest neighbour distance
stieltjes(function(x){x}, G)
# estimated probability of a distance in the interval [0.1,0.2]
stieltjes(function(x,a,b){ (x >= a) & (x <= b)}, G, a=0.1, b=0.2)
Run the code above in your browser using DataLab