smoothLUR | R Documentation |
The smoothLUR package provides functions and datasets for
smooth land use regression modeling and parametric benchmarks
to reproduce the results reported in Fritsch and Behm (2021a).
The main functions of the package are parLUR
,
smoothLUR
, and the evaluation functions kFoldCV
and looCV
. Details on the included datasets are
provided in Fritsch and Behm (2021b)
smoothLUR
fits a smooth land use regression (LUR) model
using the gam() function from the mgcv package. The procedure
is outlined in \insertCiteFritsch2021smooth;textualsmoothLUR
smoothLUR(data, x, x.discr = NA, spVar1, spVar2, y, thresh = 0.95)
data |
A data set which contains the dependent variable and the potential predictors. |
x |
A character vector stating the variable names of the potential continuous predictors (names have to match the column names of 'data'). |
x.discr |
A character vector stating the variable names of the potential discrete predictors (names have to match the column names of 'data'). |
spVar1 |
A character vector stating the variable name referring to longitude (name has to match the column name of 'data'). |
spVar2 |
A character vector stating the variable name referring to latitude (name has to match the column name of 'data'). |
y |
A character string indicating the name of the dependent variable (name has to match the column name of 'data'). |
thresh |
A numeric value that indicates the maximum share of zero values; if the share is exceeded, the corresponding potential predictor is excluded. |
An object of class 'smoothLUR' with the following elements:
coefficients |
a vector containing the coefficient estimates |
It has '...', '...', and '...' methods.
Svenia Behm and Markus Fritsch
parLUR
for parametric land use regression (LUR)
models.
kFoldCV
for k-fold cross-validation for
parLUR and smoothLUR objects.
## Not run: ## Load data set data(monSitesDE, package="smoothLUR") set.seed(42) ## Code example dat <- monSitesDE[sample(1:nrow(monSitesDE), 40),] m1 <- smoothLUR(data = dat ,x = c("Lon", "Lat", "Alt", "HighDens" ,"LowDens", "Ind", "Transp", "Seap", "Airp", "Constr" ,"UrbGreen", "Agri", "Forest", "PopDens" ,"PriRoad", "SecRoad", "FedAuto", "LocRoute") ,spVar1 = "Lon" ,spVar2 = "Lat" ,y = "Y" ,thresh = 0.95) summary(m1) summary(m1)$adj.r.squared BIC(m1) AIC(m1) \donttest{ ## Load data set data(monSitesDE, package="smoothLUR") dat <- monSitesDE m1 <- smoothLUR(data = dat, ,x = c("Lon", "Lat", "Alt", "HighDens" ,"LowDens", "Ind", "Transp", "Seap", "Airp", "Constr" ,"UrbGreen", "Agri", "Forest", "PopDens" ,"PriRoad", "SecRoad", "FedAuto", "LocRoute") ,spVar1 = "Lon" ,spVar2 = "Lat" ,y = "Y" ,thresh = 0.95) summary(m1) summary(m1)$adj.r.squared BIC(m1) AIC(m1) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.