RoBTT | R Documentation |
RoBTT
is used to estimate a robust Bayesian
t-test or truncated Bayesian t-test (if truncation
is used).
The input either requires the vector of observations for
each group, x1, x2
, or the summary statistics (only if the normal
likelihood models are used).
RoBTT(
x1 = NULL,
x2 = NULL,
mean1 = NULL,
mean2 = NULL,
sd1 = NULL,
sd2 = NULL,
N1 = NULL,
N2 = NULL,
truncation = NULL,
prior_delta = prior(distribution = "cauchy", parameters = list(location = 0, scale =
sqrt(2)/2)),
prior_rho = prior(distribution = "beta", parameters = list(alpha = 1, beta = 1)),
prior_nu = if (is.null(truncation)) prior(distribution = "exp", parameters = list(rate
= 1)),
prior_delta_null = prior(distribution = "spike", parameters = list(location = 0)),
prior_rho_null = prior(distribution = "spike", parameters = list(location = 0.5)),
prior_nu_null = prior_none(),
prior_mu = NULL,
prior_sigma2 = NULL,
chains = 4,
iter = 10000,
warmup = 5000,
thin = 1,
parallel = FALSE,
control = set_control(),
convergence_checks = set_convergence_checks(),
save = "all",
seed = NULL,
silent = TRUE,
...
)
x1 |
vector of observations of the first group |
x2 |
vector of observations of the second group |
mean1 |
mean of the first group |
mean2 |
mean of the first group |
sd1 |
standard deviation of the first group |
sd2 |
standard deviation of the first group |
N1 |
sample size of the first group |
N2 |
sample size of the first group |
truncation |
an optional list specifying truncation applied to the data.
Defaults to
|
prior_delta |
prior distributions for the effect size |
prior_rho |
prior distributions for the precision allocation |
prior_nu |
prior distribution for the degrees of freedom + 2 |
prior_delta_null |
prior distribution for the |
prior_rho_null |
prior distribution for the |
prior_nu_null |
prior distribution for the |
prior_mu |
prior distribution for the grand mean parameter. Defaults to |
prior_sigma2 |
prior distribution for the grand variance parameter. Defaults to |
chains |
a number of chains of the MCMC algorithm. |
iter |
a number of sampling iterations of the MCMC algorithm.
Defaults to |
warmup |
a number of warmup iterations of the MCMC algorithm.
Defaults to |
thin |
a thinning of the chains of the MCMC algorithm. Defaults to
|
parallel |
whether the individual models should be fitted in parallel.
Defaults to |
control |
allows to pass control settings with the
|
convergence_checks |
automatic convergence checks to assess the fitted
models, passed with |
save |
whether all models posterior distributions should be kept
after obtaining a model-averaged result. Defaults to |
seed |
a seed to be set before model fitting, marginal likelihood
computation, and posterior mixing for reproducibility of results. Defaults
to |
silent |
whether all print messages regarding the fitting process
should be suppressed. Defaults to |
... |
additional arguments. |
See \insertCitemaier2022bayesian;textualRoBTT for more details
regarding the robust Bayesian t-test methodology and the corresponding
vignette (vignette("Introduction_to_RoBTT", package = "RoBTT")
).
See \insertCitegodmann2024how;textualRoBTT for more details
regarding the truncated Bayesian t-test methodology and the corresponding
vignette (vignette("Truncated_t_test", package = "RoBTT")
).
Generic summary.RoBTT()
, print.RoBTT()
, and plot.RoBTT()
functions are provided to facilitate manipulation with the ensemble.
RoBTT
returns an object of class "RoBTT"
.
summary.RoBTT()
, prior()
## Not run:
# using the example data from Darwin
data("fertilization", package = "RoBTT")
fit <- RoBTT(
x1 = fertilization$Self,
x2 = fertilization$Crossed,
prior_delta = prior("cauchy", list(0, 1/sqrt(2))),
prior_rho = prior("beta", list(3, 3)),
seed = 1,
chains = 1,
warmup = 1000,
iter = 2000,
control = set_control(adapt_delta = 0.95)
)
# summary can provide many details about the model
summary(fit)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.