Learn R Programming

gamselBayes (version 2.0-1)

effectTypes: Tabulate the estimated effect types from a Bayesian generalized additive model object

Description

Produces a tabular summary of the estimated effect types from a gamselBayes() fit object.

Usage

effectTypes(fitObject)

Value

Nothing is returned.

Arguments

fitObject

gamselBayes() fit object.

Author

Virginia X. He virginia.x.he@student.uts.edu.au and Matt P. Wand matt.wand@uts.edu.au

Details

Two tables are printed to standard output. The first table lists the names of the predictors that are estimated as having a linear effect. The second table lists the names of the predictors that are estimated as having a nonlinear effect.

Examples

Run this code
library(gamselBayes) 

# Generate some simple regression-type data:

set.seed(1) ; n <- 1000 ; x1 <- rbinom(n,1,0.5) 
x2 <- runif(n) ; x3 <- runif(n) ; x4 <- runif(n)
y <- x1 + sin(2*pi*x2) - x3 + rnorm(n)
Xlinear <- data.frame(x1) ; Xgeneral <- data.frame(x2,x3,x4)

# Obtain a gamselBayes() fit for the data:

fit <- gamselBayes(y,Xlinear,Xgeneral)

# Tabulate the estimated effect types:

effectTypes(fit)

Run the code above in your browser using DataLab