# gboot_variogram: Variogram bootstrap In geotoolsR: Tools to Improve the Use of Geostatistic

## Description

Perform a boostrap based on error from the fitted model of the variogram.

## Usage

 1 gboot_variogram(data,var,model,B) 

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

## Details

The algorithm for the bootstrap variogram is the same presented for Davison and Hinkley (1997) for the non linear regression. We can write the variogram as \hat γ(h) = γ_{mod}(h)+ε, where γ_{mod}(h) is the fitted model. The steps of the algorithm are:

1. Set h^*=h;

2. Sample with replacement ε^* from ε - \bar ε;

3. The new variogram will be γ^*(h^*) = γ_{mod}(h)+ε^*;

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 [email protected]

Vinicius Basseto Felix [email protected]

## 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 # 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_variogram(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 ## Not run: # 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_variogram(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 ## End(Not run) 

### Example output

Loading required package: geoR
--------------------------------------------------------------
Analysis of Geostatistical Data
For an Introduction to geoR go to http://www.leg.ufpr.br/geoR
geoR version 1.7-5.2.1 (built on 2016-05-02) is now loaded
--------------------------------------------------------------

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

filter, lag

The following objects are masked from 'package:base':

intersect, setdiff, setequal, union

Warning message:
no DISPLAY variable so Tk is not available
variog: computing omnidirectional variogram
variofit: covariance model used is spherical
variofit: weights used: npairs
variofit: minimisation function used: optim
Parameters confidence interval (95%):
Parameter   Lower Estimate    Upper
1          Nugget  2.1125   2.4997   3.0046
2            Sill  4.0451   4.1215   4.2388
3    Contribution  1.1950   1.6217   2.0159
4           Range 68.8660  78.8282 127.7923
5 Practical Range 68.8660  78.8282 127.7923
variog: computing omnidirectional variogram
variofit: covariance model used is gaussian
variofit: weights used: npairs
variofit: minimisation function used: optim
Parameters confidence interval (95%):
Parameter  Lower Estimate  Upper
1          Nugget 0.0018   0.0029 0.0038
2            Sill 0.0064   0.0064 0.0070
3    Contribution 0.0029   0.0036 0.0047
4           Range 2.0676   4.3071 3.7444
5 Practical Range 3.5786   7.4548 6.4808


geotoolsR documentation built on May 2, 2019, 5:51 a.m.