Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

GAMart

GAM Artificial Data Set


Description

This is an artificial data set mainly used to test the R2BayesX interfacing functions. The data includes three different types of response variables. One numeric, one binomial and a categorical response with 4 different levels. In addition, several numeric and factor covariates are provided. The data set is constructed such that the observations are based upon different locations (pixels in ‘longitude’ and ‘latitude’ coordinates) obtained from a regular grid.

Usage

data("GAMart")

Format

A data frame containing 500 observations on 12 variables.

num:

numeric, response variable.

bin:

factor, binomial response variable with levels "no" and "yes".

cat:

factor, multi categorical response with levels "none", "low", "medium" and "high".

x1:

numeric covariate.

x2:

numeric covariate.

x3:

numeric covariate.

fac:

factor covariate with levels "low", "medium" and "high".

id:

factor, pixel identification index.

long:

numeric, the longitude coordinate of the pixel.

lat:

numeric, the latitude coordinate of the pixel.

See Also

Examples

## Not run: 
data("GAMart")

## normal response
b <- bayesx(num ~ fac + sx(x1) + sx(x2) + sx(x3) +
  sx(long, lat, bs = "te") + sx(id, bs = "re"),
  data = GAMart)
summary(b)
plot(b)

## binomial response
b <- bayesx(bin ~ fac + sx(x1) + sx(x2) + sx(x3) +
  sx(long, lat, bs = "te") + sx(id, bs = "re"),
  data = GAMart, family = "binomial", method = "REML")
summary(b)
plot(b)

## categorical response
b <- bayesx(cat ~ fac + sx(x1) + sx(x2) + sx(x3) +
  sx(long, lat, bs = "te") + sx(id, bs = "re"),
  data = GAMart, family = "cumprobit", method = "REML")
summary(b)
plot(b)

## End(Not run)

R2BayesX

Estimate Structured Additive Regression Models with 'BayesX'

v1.1-1
GPL-2 | GPL-3
Authors
Nikolaus Umlauf [aut, cre], Thomas Kneib [aut], Stefan Lang [aut], Achim Zeileis [aut] (0000-0003-0918-3766)
Initial release
2017-12-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.