Estimating the density parameter of the distances from a fixed point to the u-th nearest point, in a plane or volume.

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 maxwell when dimension = 2. Note: if ostatistic = 1 and dimension = 2 then this VGAM family function coincides with rayleigh.

dimension

The value 2 or 3; 2 meaning a plane and 3 meaning a volume.

Parameter link function applied to the (positive) density parameter, called \(\lambda\) below. See Links for more choices.

idensity

Optional initial value for the parameter. A NULL value means a value is obtained internally. Use this argument if convergence failure occurs.

imethod

An integer with value 1 or 2 which specifies the initialization method for \(\lambda\). If failure to converge occurs try another value and/or else specify a value for idensity.

Details

Suppose the number of points in any region of area \(A\) of the plane is a Poisson random variable with mean \(\lambda A\) (i.e., \(\lambda\) is the density of the points). Given a fixed point \(P\), define \(D_1\), \(D_2\),... to be the distance to the nearest point to \(P\), second nearest to \(P\), etc. This VGAM family function estimates \(\lambda\) since the probability density function for \(D_u\) is easily derived, \(u=1,2,\ldots\). Here, \(u\) corresponds to the argument ostatistic.

Similarly, suppose the number of points in any volume \(V\) is a Poisson random variable with mean \(\lambda V\) where, once again, \(\lambda\) is the density of the points. This VGAM family function estimates \(\lambda\) by specifying the argument ostatistic and using dimension = 3.

The mean of \(D_u\) is returned as the fitted values. Newton-Raphson is the same as Fisher-scoring.

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.

Value

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm, rrvglm and vgam.

Author

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")
#> Iteration 1: coefficients = -1.7700212
#> Iteration 2: coefficients = -0.83733838
#> Iteration 3: coefficients = -0.0084126311
#> Iteration 4: coefficients = 0.59968081
#> Iteration 5: coefficients = 0.87977753
#> Iteration 6: coefficients = 0.9271599
#> Iteration 7: coefficients = 0.92831854
#> Iteration 8: coefficients = 0.92831921
#> Iteration 9: coefficients = 0.92831921
fit <- vglm(y ~ 1, poisson.points(ostat, 3), data = pdata,
            trace = TRUE, crit = "coef")  # Slow convergence?
#> Iteration 1: coefficients = -16.76022
#> Iteration 2: coefficients = -15.76022
#> Iteration 3: coefficients = -14.76022
#> Iteration 4: coefficients = -13.76022
#> Iteration 5: coefficients = -12.760221
#> Iteration 6: coefficients = -11.760222
#> Iteration 7: coefficients = -10.760225
#> Iteration 8: coefficients = -9.7602349
#> Iteration 9: coefficients = -8.7602609
#> Iteration 10: coefficients = -7.7603316
#> Iteration 11: coefficients = -6.7605238
#> Iteration 12: coefficients = -5.761046
#> Iteration 13: coefficients = -4.7624649
#> Iteration 14: coefficients = -3.7663164
#> Iteration 15: coefficients = -2.7767456
#> Iteration 16: coefficients = -1.8048008
#> Iteration 17: coefficients = -0.87895317
#> Iteration 18: coefficients = -0.066114149
#> Iteration 19: coefficients = 0.51196906
#> Iteration 20: coefficients = 0.75985249
#> Iteration 21: coefficients = 0.79615759
#> Iteration 22: coefficients = 0.79683279
#> Iteration 23: coefficients = 0.79683301
#> Iteration 24: coefficients = 0.79683301
fit <- vglm(y ~ 1, poisson.points(ostat, 3, idensi = 1), data = pdata,
            trace = TRUE, crit = "coef")
#> Iteration 1: coefficients = 0.54924576
#> Iteration 2: coefficients = 0.76856366
#> Iteration 3: coefficients = 0.79643717
#> Iteration 4: coefficients = 0.79683294
#> Iteration 5: coefficients = 0.79683301
head(fitted(fit))
#>        [,1]
#> 1 0.5663227
#> 2 0.5663227
#> 3 0.5663227
#> 4 0.5663227
#> 5 0.5663227
#> 6 0.5663227
with(pdata, mean(y))
#> [1] 0.3319126
coef(fit, matrix = TRUE)
#>             loglink(density)
#> (Intercept)         0.796833
Coef(fit)
#>  density 
#> 2.218504