- svysmpl
A dataframe or tibble representing the sample data (samples). This should contain
the outcome variable and any additional covariates.
- svypopu
A dataframe or tibble representing the population data (population).
This should contain all variables in the model.
- outcome_formula
A formula for Stan, specifying the outcome and predictors in the model.
- BayesFun
The name of the Stan function to be used for fitting the Bayesian model.
- subset
A character vector representing filtering conditions to select subsets of the sample and population.
Default is NULL, in which case the analysis is performed on the entire dataset. If specified,
estimates for both the whole data and the subsets will be calculated.
- family
The distribution family for the outcome variable. Currently, the following options are supported:
gaussian for continuous outcomes and binomial for binary outcomes.
- invlvls
A numeric vector specifying the confidence levels for the credible intervals (CIs). If more than
one value is specified, multiple CIs will be calculated.
- weights
A numeric vector of case weights. The length of this vector should match the number of cases in svysmpl.
These weights will be used in the Bayesian model for weighted estimation.
- nskip
An integer specifying the number of burn-in iterations for each chain in the MCMC for Stan models.
Default is 1000.
- npost
An integer specifying the number of posterior sampling iterations for each chain in the MCMC for Stan models.
Default is 1000.
- nchain
An integer specifying the number of MCMC chains for Stan models. Default is 4.
- printmod
A logical scalar; if TRUE, posterior estimates will be printed.
- doFigure
A logical scalar; if TRUE, MCMC diagnostic plots will be generated.
- useTrueSample
A logical scalar; if TRUE, the estimator will use true sample information.
- stan_verbose
A logical scalar; if TRUE, MCMC information will be printed during Stan model fitting.
- HPD_CI
A logical scalar; if TRUE, the calculated credible intervals will be highest posterior density intervals (HPD).
Otherwise, symmetric intervals will be used. Default is FALSE.
- seed
An integer specifying the random seed for reproducibility. Default is NULL.