estRange: Estimate the range parameter

Description Usage Arguments Value References Examples

Description

The estRange function is a wrapper for the variog and variofit functions in the geoR package. estRange calculates the semivariance at every observed distance within samples in the rescaled data and then fits those estimates to a covariance model.

Usage

1
2
estRange(rScaleObj, outcome, spatialVar = NULL, semivEst = "modulus",
  logTransform = TRUE, covarianceModel = "gaussian")

Arguments

rScaleObj

An object of class rScaleList. This object is the result of using the rScale function.

outcome

A character string specifying the outcome of interest. This is the variable that will later be modeled.

spatialVar

An optional character string specifying a binary or categorical variable. If a variable is input, the range will be estimated for all levels of that variable.

semivEst

The form of the semivariance estimator. The options are 'classical' and 'modulus'. The classical estimator is the method of moments etimator, and the modulus estimator is robust estimator from Hawkins and Cressie.

logTransform

A TRUE/FALSE variable indicating whether or not the outcome should be log-transformed. Imaging mass spectrometry data are typically lognormally distributed, and so the default is TRUE.

covarianceModel

A character string specifying the form of the covariance model. The only current option is 'gaussian'.

Value

A list of class rangeList containing the estimated range and other information supplied to the estRange function.

data

A data frame containing the data.

subjectVar

A character string denoting the subject variable.

sampleVar

A character string denoting the sample variable.

spatialVar

A character string denoting the spatial variable.

outcome

A character string denoting the outcome of interest.

estRange

A single value or vector of values representing the estimated range parameter. If no spatial variable is given then this will be a single value. If a spatial variable is given then this will be a vector of values, one for each level of the spatial variable. Each estimated range will be named for its corresponding spatial variable level.

estSig2

A single value or vector of values representing the estimated variance parameter σ^2. The parameter σ^2 is used to calculate the covariance function. For more information, see the cov.spatial function in the geoR package. If no spatial variable is given then this will be a single value. If a spatial variable is given then this will be a vector of values, one for each level of the spatial variable. Each estimated range will be named for its corresponding spatial variable level.

semivarFit

The empirical variogram. This is a result of a call to the variog function in the geoR package. If no spatial variable is provided, then this is a single object. If a spatial variable is provided, then this is a list of objects, one object for every level of the spatial variable.

covModelFit

The fitted covariance model. This is a result of a call to the variofit function in the geoR package. If no spatial variable is provided, then this is a single object. If a spatial variable is provided, then this is a list of objects, one object for every level of the spatial variable.

References

Ribeiro, Jr., PJ and Diggle, PJ. 2018. geoR: Analysis of Geostatistical Data. R package version 1.7-2.1.

Cressie, N and Hawkins, DM. 1980. Robust estimation of the variogram: I. Journal of the International Association for Mathematical Geology, 12(2):115-125.

Examples

1
2
3
4
5
data("TAMdata")
TAMdata <- rScale(TAMdata, subjectVar = 'subject', sampleVar = 'ROI',
                  xCoord = 'x', yCoord = 'y')
rangs <- estRange(TAMdata, outcome = 'X1282.auc', spatialVar = 'TAM',
                  semivEst = 'modulus', logTransform = TRUE)

cammiller/imagingPC documentation built on June 28, 2019, 12:04 a.m.