output.control {geoR}R Documentation

Defines output options for prediction functions

Description

Auxiliary function defining output options for krige.bayes and krige.conv.

Usage

output.control(n.posterior, n.predictive, moments, n.back.moments,
               simulations.predictive, mean.var, quantile,
               threshold, sim.means, sim.vars, signal, messages)

Arguments

n.posterior

number of samples to be taken from the posterior distribution. Defaults to 1000.

n.predictive

number of samples to be taken from the predictive distribution. Default equals to n.posterior.

moments

logical. Indicates whether the moments of the predictive distribution are returned. If lambda = 1 there is no transformation/back-transformation. If lambda = 0 or lambda = 0.5 the moments are back-transformed by analytical expressions. For other cases the back-transformation is done by simulation. Defaults to TRUE.

n.back.moments

number of sample to back-transform moments by simulation. Defaults to 1000.

simulations.predictive

logical. Defines whether to draw simulations from the predictive distribution. Only considered if prediction locations are provided in the argument locations of the main functions. Defaults to FALSE but changed to TRUE if an integer greater then zero is provided in the argument n.predictive and/or simulations are required in order to compute quantities required by other arguments such as threshold, quantiles and some values of the transformation parameter.

mean.var

logical (optional). Indicates whether mean and variances of the simulations of the predictive distributions are computed and returned.

quantile

a (optional) numeric vector. If provided indicates whether quantiles of the simulations from the predictive distribution are computed and returned. If a vector with numbers in the interval [0,1] is provided, the output includes the object quantiles, which contains values of corresponding estimated quantiles. For example, if quantile = c(0.25, 0.50, 0.75) the function returns the quartiles of the predictive distributions at each of the prediction locations. If quantile = TRUE default values c(0.025, 0.5, 0.975) are assumed. A measure of uncertainty of the predictions, an alternative to the kriging standard error, computed by (quantile_0.975 - quantile_0.025)/4. Only used if prediction locations are provided in the argument locations.

threshold

Optional. A numerical vector. If one or more values are provided, an object named probabilities is included in the output. This object contains, for each prediction location, the probability that the variable is less than or equal than the threshold provided by the user. Defaults to FALSE.

sim.means

logical (optional). Indicates whether mean of each of the conditional simulations of the predictive distribution should be computed and returned. Defaults to TRUE, if simulations from the predictive are required.

sim.vars

logical (optional). Indicates whether variance of each of the conditional simulations of the predictive distribution should be computed and returned. Defaults to FALSE.

signal

logical indicating whether the signal or the variable is to be predicted. Different defaults are set internally by functions calling output.control. See DETAILS below.

messages

logical. Indicates whether or not status messages are printed on the output device while the function is running. Defaults to TRUE.

Details

SIGNAL

This function is typically called by the geoR's prediction functions krige.bayes and krige.conv defining the output.

By default, krige.bayes sets signal = TRUE and krige.conv sets signal = FALSE.

The underlying model

Y(x) = \mu + S(x) + \epsilon

assumes that observations Y(x) are noisy versions of a signal S(x) and Var(\epsilon)=\tau^2 is the nugget variance.

If \tau^2 = 0 the Y and S are indistiguishable.

If \tau^2 > 0 and regarded as measurement error, the option signal defines whether the S (signal = TRUE) or the variable Y (signal = FALSE) is to be predicted.
For the latter the predictions will "honor" the data, i.e. predicted values will coincide with the data, at data locations.
For unsampled locations and untransformed data, the predicted values equals data regardless signal = TRUE or FALSE, however predictions variances will differ.

The function krige.conv has an argument micro.scale. If micro.scale > 0 the error term is divided as \epsilon = \epsilon_{ms} + \epsilon_{me} and the nugget variance is divided into two terms: micro-scale variance and measurement error.
If signal = TRUE the term \epsilon_{ms} is regarded as part of the signal and consequently the micro-scale variance is added to the prediction variance.
If signal = FALSE the total error variance \tau^2 is added to the prediction variance.

Value

A list with processed arguments to be passed to the main function.

Author(s)

Paulo J. Ribeiro Jr. paulojus@leg.ufpr.br,
Peter J. Diggle p.diggle@lancaster.ac.uk.

See Also

The prediction functions krige.bayes and krige.conv.


[Package geoR version 1.9-4 Index]