GAMart: GAM Artificial Data Set

Description Usage Format See Also Examples

View source: R/GAMart.R

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

1
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

bayesx

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
## 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 documentation built on Dec. 5, 2017, 3:01 p.m.