Learn R Programming

geotoolsR (version 1.2.1)

gboot_solow: Solow bootstrap

Description

Performs a spatial boostrap proposed by Solow(1985).

Usage

gboot_solow(data,var,model,B)

Value

variogram_boot gives the variogram of each bootstrap.

variogram_or gives the original variogram.

pars_boot gives the estimatives of the nugget, sill, contribution, range and practical range for each bootstrap.

pars_or gives the original estimatives of the nugget, sill, contribution, range and practical range.

Invalid arguments will return an error message.

Arguments

data

object of the class geodata.

var

object of the class variogram.

model

object of the class variomodel.

B

number of the bootstrap that will be performed (default B=1000).

Author

Diogo Francisco Rossoni dfrossoni@uem.br

Vinicius Basseto Felix felix_prot@hotmail.com

Details

The basic idea involves transforming correlated observation to uncorrelated quantities, forming a bootstrap sample from these quantities, and transforming back to a bootstrap sample form the original observations (SOLOW, 1985). Suppose that \(Z_n\) is an \(n\) vector of observations from a realization of a second-order stationary random process, \(Z(s_i)\), and the covariance matrix for \(Z_n\) is \(C\). Suppose further that \(E(Z_n)={0_n}\), where \({0_n}\) is an \(n\) vector of zeroes. In practice \(Z_n\) can be centered by subtracting an estimate of the stationary mean from each observation. So, the steps of the algorithm are:

  1. Obtain \(C\);

  2. Apply the Cholesky decomposition in \(C\), obtaining \(C=LL^t\), where \(L\) is lower triangular;

  3. Obtain \(U_n=L^{-1}Z_n\);

  4. Sample with replacement \({U^*}_n\) from \(U_n - \bar U_n\);

  5. The new data will be \({Z^*}_n=L{U^*}_n\);

  6. Calculate the new variogram;

  7. Calculate and save the statistics of interest;

  8. Return to step 4 and repeat the process at least 1000 times.

References

Solow, A. R. (1985). Bootstrapping correlated data. Journal of the International Association for Mathematical Geology, 17(7), 769-775. https://doi.org/10.1007/BF01031616

Examples

Run this code
# Example 1

## transforming the data.frame in an object of class geodata
data<- as.geodata(soilmoisture)

points(data) ## data visualization

var<- variog(data, max.dist = 140) ## Obtaining the variogram
plot(var)

## Fitting the model
mod<- variofit(var,ini.cov.pars = c(2,80),nugget = 2,cov.model = "sph")
lines(mod, col=2, lwd=2) ##fitted model

## Bootstrap procedure

boot<- gboot_solow(data,var,mod,B=10)
## For better Confidence interval, try B=1000

gboot_CI(boot,digits = 4) ## Bootstrap Confidence Interval

gboot_plot(boot) ## Bootstrap Variogram plot

# \donttest{
# Example 2

## transforming the data.frame in an object of class geodata
data<- as.geodata(NVDI)

points(data) ## data visualization

var<- variog(data, max.dist = 18) ## Obtaining the variogram
plot(var)

## Fitting the model
mod<- variofit(var,ini.cov.pars = c(0.003,6),nugget = 0.003,cov.model = "gaus")
lines(mod, col=2, lwd=2) ##fitted model

## Bootstrap procedure

boot<- gboot_solow(data,var,mod,B=10)
## For better Confidence interval, try B=1000

gboot_CI(boot,digits = 4) ## Bootstrap Confidence Interval

gboot_plot(boot) ## Bootstrap Variogram plot
# }

Run the code above in your browser using DataLab