Professional Documents
Culture Documents
t.gstatModel-methods 99.99th
From GSIF v0.5-5.1
by Tomislav Hengl Percentile
Tries to automatically t a 2D or 3D regression-kriging model for a given set of points (object of type
"SpatialPointsDataFrame" or "geosamples" ) and covariates (object of type "SpatialPixelsDataFrame" ).
It rst ts a regression model (e.g. Generalized Linear Model, regression tree, random forest model or
similar) following the formulaString , then ts variogram for residuals usign the fit.variogram
method from the gstat package. Creates an output object of class gstatModel-class .
Keywords methods
Usage
Created
API documentationPut your R skills to thebytest
DataCamp.com
Start Now
https://www.rdocumentation.org/packages/GSIF/versions/0.5-5.1/topics/fit.gstatModel-methods 1/6
7/9/2020 fit.gstatModel-methods function | R Documentation
Arguments
t.family character string defyning the GLM family (for more info see stats::glm )
stepwise speci es whether to run step-wise regression on top of GLM to get an optimal subset
of predictors
subsample integer; maximum number of observations to be taken for variogram model tting (to
speed up variogram tting)
subsample.reg integer; maximum number of observations to be taken for regression model tting
(currently only used for randomForest)
Details
The GLM method by default assumes that the target variable follows a normal distribution
fit.family = gaussian() . Other possible families are:
Note
Residuals (response residuals from the model) will be checked for normality and problems reported by
default. The warning messages should be taken with care, as when the sample size is small, even big
departures from normality will not be reported; when the sample size is large, even the smallest
deviation from normality might lead to a warning. Likewise, if the variogram tting fails, consider tting
a variogram manually or using the fit.vgmModel method.
API documentationPut your R skills Created
to thebytest
DataCamp.com
Start Now
https://www.rdocumentation.org/packages/GSIF/versions/0.5-5.1/topics/fit.gstatModel-methods 2/6
7/9/2020 fit.gstatModel-methods function | R Documentation
References
Meinshausen, N. (2006). Quantile regression forests. The Journal of Machine Learning Research,
7, 983-999.
chapter 8 ``Interpolation and Geostatistics'' in Bivand, R., Pebesma, E., Rubio, V., (2008) Applied
Spatial Data Analysis with R. Use R Series, Springer, Heidelberg, pp. 378.
Hengl, T. (2009) A Practical Guide to Geostatistical Mapping, 2nd Edt. University of Amsterdam,
www.lulu.com, 291 p.
See Also
Examples
# NOT RUN {
# 2D model:
library(sp)
library(boot)
library(aqp)
library(plyr)
library(rpart)
library(splines)
library(gstat)
library(randomForest)
library(quantregForest)
library(plotKML)
## simple model:
omm <- fit.gstatModel(meuse, om~dist+ffreq, meuse.grid,
family = gaussian(log))
om.rk <- predict(omm, meuse.grid)
plot(om.rk)
## it was succesful!
## fit a regression-tree:
omm <- fit.gstatModel(meuse, log1p(om)~dist+ffreq, meuse.grid,
API documentationPut your R skills
method="rpart") Created
to thebytest
DataCamp.com
Start Now
https://www.rdocumentation.org/packages/GSIF/versions/0.5-5.1/topics/fit.gstatModel-methods 3/6
7/9/2020 fit.gstatModel-methods function | R Documentation
summary(omm@regModel)
## plot a regression-tree:
plot(omm@regModel, uniform=TRUE)
text(omm@regModel, use.n=TRUE, all=TRUE, cex=.8)
omm@vgmModel
Community examples
| | | | |
## New example
UseAPI
documentation
markdown to formatPut
your example
your Created
R skills to thebytest
DataCamp.com
Start Now
https://www.rdocumentation.org/packages/GSIF/versions/0.5-5.1/topics/fit.gstatModel-methods 5/6
7/9/2020 fit.gstatModel-methods function | R Documentation
Created
API documentationPut your R skills to thebytest
DataCamp.com
Start Now
https://www.rdocumentation.org/packages/GSIF/versions/0.5-5.1/topics/fit.gstatModel-methods 6/6