Description Usage Arguments Value Examples
This function fits a Bayesian grouped weighted quantile sum (BGWQS) regression model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
y |
A vector containing outcomes. |
x |
A matrix of component data. |
z |
A vector or matrix of controlling covariates. |
x.s |
A vector of the number of components in each index. |
n.quantiles |
The number of quantiles to apply to the component data. |
working.dir |
A file path to the directory. |
n.chains |
The number of Markov chains; must be a positive integer. |
n.iter |
The number of total iterations per chain, including burn in. |
n.burnin |
The number of iterations to discard at the beginning. |
n.thin |
The thinning rate; must be a positive integer. |
n.adapt |
The number of adaption iterations. |
DIC |
Logical; whether or not the user desires the function to return DIC. |
A list which includes BUGS output, sample chains post-burnin, and convergence test results.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
data("simdata")
group_list <- list(c("pcb_118", "pcb_138", "pcb_153", "pcb_180", "pcb_192"),
c("as", "cu", "pb", "sn"),
c("carbaryl", "propoxur", "methoxychlor", "diazinon", "chlorpyrifos"))
x.s <- make.x.s(simdata, 3, group_list)
X <- make.X(simdata, 3, group_list)
Y <- simdata$Y
work_dir <- tempdir()
results <- bgwqs.fit(y = Y, x = X, x.s = x.s, n.quantiles=4,
working.dir = work_dir,
n.chains = 1, n.iter = 10000, n.burnin = 5000, n.thin = 1, n.adapt = 500)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.