GeoPit: Probability Integral Transform for Fitted GeoModels Objects

View source: R/GeoPit.R

GeoPitR Documentation

Probability Integral Transform for Fitted GeoModels Objects

Description

Transforms observations or prediction targets using the fitted marginal cumulative distribution function. The output can be represented on the uniform probability-integral-transform scale or on the standard Gaussian-score scale.

Usage

GeoPit(object, type = c("Uniform", "Gaussian"), data_to_pred = NULL)

Arguments

object

An object of class GeoFit, GeoKrig, or GeoKrigloc. The spatial bivariate case is not currently supported.

type

Character string. "Uniform" returns fitted PIT values F_i(Y_i). "Gaussian" returns \Phi^{-1}\{F_i(Y_i)\}. Partial matching is performed by match.arg.

data_to_pred

Optional observed values at the prediction locations when object is a GeoKrig or GeoKrigloc object. This is required unless the object already contains a data_to_pred component.

Details

For a GeoFit object, marginal transformations use the complete fitted mean: a site-specific fixed vector when present, otherwise X\beta with coefficients mean, mean1, and so on matched to the columns of X. The intercept-only case uses scalar mean.

For a GeoFit object, site-specific fitted means are reconstructed from the design matrix and fitted regression coefficients. An externally supplied fixed mean vector takes precedence. The fitted marginal CDF is then evaluated at each observation. Copula parameters do not enter the PIT because the transformation is marginal. The Student-t and skew Student-t transformations use the fitted degrees of freedom 1/df without integer rounding. The continuous PIT implementation includes the bounded Kumaraswamy families, Logistic, and SkewLaplace marginals used by the copula diagnostics.

For type = "Gaussian", PIT values are clipped only for numerical protection before applying the standard-normal quantile function. For discrete marginal models, the current transformation is the ordinary non-randomized PIT and therefore is not exactly uniform. For PoissonGamma, the fitted marginal CDF is the negative-binomial CDF with mean exp(mean) (or the site-specific fitted mean) and size parameter shape. Pearson-residual objects returned by GeoResiduals() are rejected; PIT diagnostics for discrete models must use the original fitted object.

For GeoKrig and GeoKrigloc objects, predictive PIT is currently available only for Gaussian models and requires predictive MSE values. Linear kriging for the non-Gaussian models does not by itself define the full conditional predictive distribution needed for a valid PIT.

Value

The input object with its data component replaced by the transformed values.

Examples

## Not run: 
fit_u <- GeoPit(fit, type = "Uniform")
fit_z <- GeoPit(fit, type = "Gaussian")

## End(Not run)

GeoModels documentation built on Sept. 23, 2026, 5:07 p.m.

Related to GeoPit in GeoModels...