Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pool.rat

Pool Data from Several Ratio Objects


Description

Pool the data from several ratio objects (objects of class "rat") and compute a pooled estimate.

Usage

## S3 method for class 'rat'
pool(..., weights=NULL, relabel=TRUE, variance=TRUE)

Arguments

...

Objects of class "rat".

weights

Numeric vector of weights.

relabel

Logical value indicating whether the result should be relabelled to show that it was obtained by pooling.

variance

Logical value indicating whether to compute the sample variance and related terms.

Details

The function pool is generic. This is the method for the class "rat" of ratio objects. It is used to combine several estimates of the same quantity when each estimate is a ratio.

Each of the arguments ... must be an object of class "rat" representing a ratio object (basically a numerator and a denominator; see rat). We assume that these ratios are all estimates of the same quantity.

If the objects are called R[1], …, R[n] and if R[i] has numerator Y[i] and denominator X[i], so that notionally R[i] = Y[i]/X[i], then the pooled estimate is the ratio-of-sums estimator

R = (Y[1]+…+Y[n])/(X[1]+…+X[n]).

The standard error of R is computed using the delta method as described in Baddeley et al. (1993) or Cochran (1977, pp 154, 161).

If the argument weights is given, it should be a numeric vector of length equal to the number of objects to be pooled. The pooled estimator is the ratio-of-sums estimator

R = (w[1] * Y[1]+…+ w[n] * Y[n])/(w[1] * X[1]+…+w[n] * X[n])

where w_iw[i] is the ith weight.

This calculation is implemented only for certain classes of objects where the arithmetic can be performed.

This calculation is currently implemented only for objects which also belong to the class "fv" (function value tables). For example, if Kest is called with argument ratio=TRUE, the result is a suitable object (belonging to the classes "rat" and "fv").

Warnings or errors will be issued if the ratio objects ... appear to be incompatible. However, the code is not smart enough to decide whether it is sensible to pool the data.

Value

An object of the same class as the input.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au, Rolf Turner r.turner@auckland.ac.nz and Ege Rubak rubak@math.aau.dk.

References

Baddeley, A.J, Moyeed, R.A., Howard, C.V. and Boyde, A. (1993) Analysis of a three-dimensional point pattern with replication. Applied Statistics 42, 641–668.

Cochran, W.G. (1977) Sampling techniques, 3rd edition. New York: John Wiley and Sons.

See Also

Examples

K1 <- Kest(runifpoint(42), ratio=TRUE, correction="iso")   
   K2 <- Kest(runifpoint(42), ratio=TRUE, correction="iso")   
   K3 <- Kest(runifpoint(42), ratio=TRUE, correction="iso")
   K <- pool(K1, K2, K3)
   plot(K, pooliso ~ r, shade=c("hiiso", "loiso"))

spatstat.core

Core Functionality of the 'spatstat' Family

v2.1-2
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Kasper Klitgaard Berthelsen [ctb], Achmad Choiruddin [ctb], Jean-Francois Coeurjolly [ctb], Ottmar Cronie [ctb], Tilman Davies [ctb], Julian Gilbey [ctb], Yongtao Guan [ctb], Ute Hahn [ctb], Kassel Hingee [ctb], Abdollah Jalilian [ctb], Marie-Colette van Lieshout [ctb], Greg McSwiggan [ctb], Tuomas Rajala [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Plenge Waagepetersen [ctb], Hangsheng Wang [ctb]
Initial release
2021-04-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.