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

PPversion

Transform a Function into its P-P or Q-Q Version


Description

Given a function object f containing both the estimated and theoretical versions of a summary function, these operations combine the estimated and theoretical functions into a new function. When plotted, the new function gives either the P-P plot or Q-Q plot of the original f.

Usage

PPversion(f, theo = "theo", columns = ".")

QQversion(f, theo = "theo", columns = ".")

Arguments

f

The function to be transformed. An object of class "fv".

theo

The name of the column of f that should be treated as the theoretical value of the function.

columns

Character vector, specifying the columns of f to which the transformation will be applied. Either a vector of names of columns of f, or one of the abbreviations recognised by fvnames.

Details

The argument f should be an object of class "fv", containing both empirical estimates fhat(r) and a theoretical value f0(r) for a summary function.

The P–P version of f is the function g(x) = fhat(f0^(-1)(x)) where f0^(-1) is the inverse function of f0. A plot of g(x) against x is equivalent to a plot of fhat(r) against f0(r) for all r. If f is a cumulative distribution function (such as the result of Fest or Gest) then this is a P–P plot, a plot of the observed versus theoretical probabilities for the distribution. The diagonal line y=x corresponds to perfect agreement between observed and theoretical distribution.

The Q–Q version of f is the function f0^(-1)(fhat(x)). If f is a cumulative distribution function, a plot of h(x) against x is a Q–Q plot, a plot of the observed versus theoretical quantiles of the distribution. The diagonal line y=x corresponds to perfect agreement between observed and theoretical distribution. Another straight line corresponds to the situation where the observed variable is a linear transformation of the theoretical variable. For a point pattern X, the Q–Q version of Kest(X) is essentially equivalent to Lest(X).

Value

Another object of class "fv".

Author(s)

Tom Lawrence and Adrian Baddeley.

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

See Also

Examples

opa <- par(mar=0.1+c(5,5,4,2))
  G <- Gest(redwoodfull)
  plot(PPversion(G))
  plot(QQversion(G))
  par(opa)

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.