if (FALSE) {
## 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)
}
Run the code above in your browser using DataLab