GAMart | R Documentation |
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.
data("GAMart")
A data frame containing 500 observations on 12 variables.
numeric, response variable.
factor, binomial response variable with levels "no"
and "yes"
.
factor, multi categorical response with levels "none"
, "low"
,
"medium"
and "high"
.
numeric covariate.
numeric covariate.
numeric covariate.
factor covariate with levels "low"
, "medium"
and "high"
.
factor, pixel identification index.
numeric, the longitude coordinate of the pixel.
numeric, the latitude coordinate of the pixel.
bayesx
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.