poisson.points {VGAM} | R Documentation |
Poisson-points-on-a-plane/volume Distances Distribution
Description
Estimating the density parameter of the distances from a fixed point to the u-th nearest point, in a plane or volume.
Usage
poisson.points(ostatistic, dimension = 2, link = "loglink",
idensity = NULL, imethod = 1)
Arguments
ostatistic |
Order statistic.
A single positive value, usually an integer.
For example, the value 5 means the response are the distances
of the fifth nearest value to that point (usually over many
planes or volumes).
Non-integers are allowed because the value 1.5 coincides
with |
dimension |
The value 2 or 3; 2 meaning a plane and 3 meaning a volume. |
link |
Parameter link function applied to the (positive) density parameter,
called |
idensity |
Optional initial value for the parameter.
A |
imethod |
An integer with value |
Details
Suppose the number of points in any region of area of the
plane is a Poisson random variable with mean
(i.e.,
is the density of the points).
Given a fixed point
, define
,
,... to be
the distance to the nearest point to
, second nearest to
,
etc. This VGAM family function estimates
since the probability density function for
is easily derived,
. Here,
corresponds to the
argument
ostatistic
.
Similarly, suppose the number of points in any volume is a
Poisson random variable with mean
where, once again,
is the density of the points.
This VGAM family function estimates
by
specifying the argument
ostatistic
and using
dimension = 3
.
The mean of is returned as the fitted values.
Newton-Raphson is the same as Fisher-scoring.
Value
An object of class "vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
rrvglm
and vgam
.
Warning
Convergence may be slow if the initial values are far from the solution. This often corresponds to the situation when the response values are all close to zero, i.e., there is a high density of points.
Formulae such as the means have not been fully checked.
Author(s)
T. W. Yee
See Also
Examples
pdata <- data.frame(y = rgamma(10, shape = exp(-1))) # Not proper data!
ostat <- 2
fit <- vglm(y ~ 1, poisson.points(ostat, 2), data = pdata,
trace = TRUE, crit = "coef")
fit <- vglm(y ~ 1, poisson.points(ostat, 3), data = pdata,
trace = TRUE, crit = "coef") # Slow convergence?
fit <- vglm(y ~ 1, poisson.points(ostat, 3, idensi = 1), data = pdata,
trace = TRUE, crit = "coef")
head(fitted(fit))
with(pdata, mean(y))
coef(fit, matrix = TRUE)
Coef(fit)