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

rex

Richardson Extrapolation


Description

Performs Richardson Extrapolation on a sequence of approximate values.

Usage

rex(x, r = 2, k = 1, recursive = FALSE)

Arguments

x

A numeric vector or matrix, whose columns are successive estimates or approximations to a vector of parameters.

r

A number greater than 1. The ratio of successive step sizes. See Details.

k

Integer. The order of convergence assumed. See Details.

recursive

Logical value indicating whether to perform one step of Richardson extrapolation (recursive=FALSE, the default) or repeat the extrapolation procedure until a best estimate is obtained (recursive=TRUE.

Details

Richardson extrapolation is a general technique for improving numerical approximations, often used in numerical integration (Brezinski and Zaglia, 1991). It can also be used to improve parameter estimates in statistical models (Baddeley and Turner, 2014).

The successive columns of x are assumed to have been obtained using approximations with step sizes a, a/r, a/r^2, ... where a is the initial step size (which does not need to be specified).

Estimates based on a step size s are assumed to have an error of order s^k.

Thus, the default values r=2 and k=1 imply that the errors in the second column of x should be roughly (1/r)^k = 1/2 as large as the errors in the first column, and so on.

Value

A matrix whose columns contain a sequence of improved estimates.

Author(s)

Adrian Baddeley Adrian.Baddeley@curtin.edu.au and Rolf Turner r.turner@auckland.ac.nz.

References

Baddeley, A. and Turner, R. (2014) Bias correction for parameter estimates of spatial point process models. Journal of Statistical Computation and Simulation 84, 1621–1643. DOI: 10.1080/00949655.2012.755976

Brezinski, C. and Zaglia, M.R. (1991) Extrapolation Methods. Theory and Practice. North-Holland.

See Also

Examples

# integrals of sin(x) and cos(x) from 0 to pi
   # correct answers: 2, 0
   est <- function(nsteps) {
     xx <- seq(0, pi, length=nsteps)
     ans <- pi * c(mean(sin(xx)), mean(cos(xx)))
     names(ans) <- c("sin", "cos")
     ans
   }
   X <- cbind(est(10), est(20), est(40))
   X
   rex(X)
   rex(X, recursive=TRUE)

   # fitted Gibbs point process model
   fit0 <- ppm(cells ~ 1, Strauss(0.07), nd=16)
   fit1 <- update(fit0, nd=32)
   fit2 <- update(fit0, nd=64)
   co <- cbind(coef(fit0), coef(fit1), coef(fit2))
   co 
   rex(co, k=2, recursive=TRUE)

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.