View source: R/bwqs_main-revised.R
bwqs_r | R Documentation |
Fits Random Bayesian Weighted Quantile Sum (BWQS) regressions for continuous outcomes. This model provides estimation for the mixture composition and overall effect of the mixture across different groups on the outcomes using bayesian framework.
bwqs_r( formula, mix_name, cluster_name, data, q, Dalp = NULL, chains = 1, iter = 1000, thin = 3, seed = 2019, start_value = NULL, c_int = c(0.025, 0.975), family = "gaussian" )
formula |
Object of class |
mix_name |
A character vector listing the variables contributing to a mixture effect. |
cluster_name |
A character string that specifiy which is the column of the dataset which
contains the group number. Note that the |
data |
The |
q |
An |
Dalp |
A |
chains |
An |
iter |
An |
thin |
An |
seed |
An |
start_value |
A |
c_int |
A |
family |
A |
The function bwqs
uses the package rstan
which allows the connection with STAN,
a specific software, written in C++ for bayesian inference, for further information see https://mc-stan.org/.
bwqs
returns a list with two argument:
fit |
An |
summary_fit |
Table with the statistics of the parameters: mean, standard error of the mean,
standard deviation, lower and upper values for the credible interval (with credible level specified
by |
Nicolo Foppa Pedretti, Elena Colicino
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.