methods.geoGAM: Methods for 'geoGAM' objects

methodsR Documentation

Methods for geoGAM objects

Description

Methods for models fitted by geoGAM().

Usage

## S3 method for class 'geoGAM'
summary(object, ..., what = c("final", "path"))

## S3 method for class 'geoGAM'
print(x, ...)

## S3 method for class 'geoGAM'
plot(x, ..., what = c("final", "path"))

Arguments

object

an object of class geoGAM

x

an object of class geoGAM

...

other arguments passed to summary.gam, plot.gam or plot.mboost

what

print summary or plot partial effects of final selected model or print summary or plot gradient boosting path of model selection path.

Details

summary with what = "final" calls summary.gam to display a summary of the final (geo)additive model. plot with what = "final" calls plot.gam to plot partial residual plots of the final model.

summary with what = "path" give a summary of covariates selected in each step of model building. plot with what = "path" calls plot.mboost to plot the path of the gradient boosting algorithm.

Value

For what == "final" summary returns a list of 3:

summary.gam

containing the values of summary.gam.

summary.validation$cv

cross validation statistics.

summary.validation$validation

validation set statistics.

For what == "path" summary returns a list of 13:

response

name of response.

family

family used for geoGAM fit.

n.obs

number of observations used for model fitting.

n.obs.val

number of observations used for model validation.

n.covariates

number of initial covariates including factors.

n.cov.chosen

number of covariates in final model.

list.factors

list of factors chosen as offset.

mstop

number of optimal iterations of gradient boosting.

list.baselearners

list of covariate names selected by gradient boosting.

list.effect.size

list of covariate names after cross validation of effect size in gradient boosting.

list.backward

list of covariate names after backward selection.

list.aggregation

list of aggregated factor levels.

list.gam.final

list of covariate names in final model.

Author(s)

M. Nussbaum

References

Nussbaum, M., Walthert, L., Fraefel, M., Greiner, L., and Papritz, A.: Mapping of soil properties at high resolution in Switzerland using boosted geoadditive models, SOIL, 3, 191-210, doi:10.5194/soil-3-191-2017, 2017.

See Also

geoGAM, gam, predict.gam

Examples


### small example with earthquake data

data(quakes)
set.seed(2)

quakes <- quakes[ sample(1:nrow(quakes), 50), ]

quakes.geogam <- geoGAM(response = "mag",
                        covariates = c("depth", "stations"),
                        data = quakes,
                        seed = 2,
                        max.stop = 5,
                        cores = 1)

summary(quakes.geogam)
summary(quakes.geogam, what = "path")

plot(quakes.geogam)
plot(quakes.geogam, what = "path")


geoGAM documentation built on Nov. 15, 2023, 1:09 a.m.