gboot_block: Block bootstrap

Description Usage Arguments Details Value Author(s) References Examples

View source: R/gboot_block.R

Description

Performs a bootstrap based on subdivision of data in blocks

Usage

1
gboot_block(data,var,model,B,L1,L2)

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).

L1

number of cuts in the vertical (L1xL2 blocks).

L2

number of cuts in the horizontal (L1xL2 blocks).

Details

The algorithm for the block bootstrap is an adaptation of the time series bootstrap. Consider that your data presents the second order stationarity, so, we can subdivide them into small blocks. The steps of the algorithm are:

  1. Subdivide the data into L1xL2 blocks;

  2. Realocate each block with probability\frac{1}{L1L2} ;

  3. Calculate the new variogram from the new data;

  4. Calculate and save the statistics of interest;

  5. Return to step 2 and repeat the process at least 1000 times.

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.

Author(s)

Diogo Francisco Rossoni dfrossoni@uem.br

Vinicius Basseto Felix felix_prot@hotmail.com

References

DAVISON, A.C.; HINKLEY, D. V. Bootstrap Methods and their Application. [s.l.] Cambridge University Press, 1997. p. 582

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
## Not run: 
# 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_block(data,var,mod,B=10, L1=2, L2=2)
## For better Confidence Interval, try B=1000

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

gboot_plot(boot) ## Bootstrap Variogram plot

# 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<- boot<- gboot_block(data,var,mod,B=10, L1=2, L2=2)
## For better Confidence interval, try B=1000

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

gboot_plot(boot) ## Bootstrap Variogram plot

## End(Not run)

geotoolsR documentation built on March 2, 2020, 5:07 p.m.