term.freqs: Extract model term selection frequencies.

Description Usage Arguments Author(s) See Also Examples

Description

This function takes a fitted bayesx object and returns selection frequency tables of model terms. These tables are only returned using the stepwise procedure in combination with the bootstrap confidence intervals, see function bayesx.control.

Usage

1
term.freqs(object, model = NULL, term = NULL, ...)

Arguments

object

an object of class "bayesx".

model

for which model the tables should be provided, either an integer or a character, e.g. model = "mcmc.model".

term

character or integer. The term for which the frequency table should be extracted.

...

not used.

Author(s)

Nikolaus Umlauf, Thomas Kneib, Stefan Lang, Achim Zeileis.

See Also

bayesx, bayesx.control.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
## generate some data
set.seed(111)
n <- 500

## regressors
dat <- data.frame(x = runif(n, -3, 3), z = runif(n, -1, 1),
   w = runif(n, 0, 1), fac = factor(rep(1:10, n/10)))

## response
dat$y <- with(dat, 1.5 + sin(x) + rnorm(n, sd = 0.6))

## estimate model
b <- bayesx(y ~ sx(x) + sx(z) + sx(w) + sx(fac, bs = "re"),
   method = "STEP", CI = "MCMCbootstrap", bootstrapsamples = 99,
   data = dat)
summary(b)

## extract frequency tables
term.freqs(b)

## End(Not run)

datacamp/R2BayesX documentation built on May 14, 2019, 7:10 p.m.