field.sub {boodd}R Documentation

Subsampling of Random Fields

Description

Performs subsampling of a multidimensional array representing a random field on a lattice. This function applies a specified function to each subsample.

Usage

field.sub(arr, func, length.block, ...)

Arguments

arr

A multidimensional real-valued array; it represents a random field on a grid of dimension equals to dimension of the arr.

func

A function applied to each subsample. The function should accept the subsample as input and return a vector.

length.block

An integer or vector of integers; it specified the block lengths for subsampling. If a scalar is provided, the same block length is used for all dimensions

...

An optional additional arguments for the func function.

Details

The field.sub function is designed for subsampling a multidimensional array. The length.block argument defines the size of each subsample. If length.block is a scalar, it applies uniformly across all dimensions of the array. Otherwise, it must be a vector with a length equal to the number of dimensions in arr. The function func is applied to each subsample, and the results are returned in a matrix or vector, depending on the output of func.

Value

Returns a matrix or vector, depending on the output of the func function. Each row in the matrix corresponds to the result of applying func to a subsample. Since it is not a boodd object, one cannot apply, for example, the confint function to construct a confidence intervals (which depends on the rate of convergence of the statistic of interest), see example below.

References

Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted.

Politis, D.N. Romano, J.P. Wolf, M. (1999). Subsampling, Springer, New York.

See Also

fieldboot, fieldbootP, blockboot, jackVarField.

Examples


set.seed(1)
# 2-dims array
dlens <- c(100,50)
blens <- c(6,3)
arr <- array(round(rnorm(prod(dlens)),2),dim=dlens)
resu<-field.sub(arr,mean,blens)
hist(resu,nclass=25)
N=length(resu)
lB=length(blens)
conf=mean(arr)-(quantile(resu,c(0.025,0.975))-mean(arr))*sqrt(lB)/sqrt(N)
conf[2:1]


[Package boodd version 0.1 Index]