draw_logit_samples {PosteriorBootstrap} | R Documentation |
Draw adaptive non-parametric learning samples for logistic regression
Description
draw_logit_samples
returns samples of the parameter of interest in a
logistic regression.
Usage
draw_logit_samples(
x,
y,
concentration,
n_bootstrap = 100,
posterior_sample = NULL,
gamma_mean = NULL,
gamma_vcov = NULL,
threshold = 1e-08,
num_cores = 1,
show_progress = FALSE
)
Arguments
x |
The features of the data. |
y |
The outcomes of the data (either |
concentration |
The parameter |
n_bootstrap |
The number of bootstrap samples required. |
posterior_sample |
The function can take samples from the posterior to
generate non-parametric-learning samples, or it can take NULL and the
posterior is assumed normal N( |
gamma_mean |
In case |
gamma_vcov |
In case |
threshold |
The threshold of stick remaining below which the function stops looking for more stick-breaks. It correspondes to epsilon in the paper, at the bottom of page 5 and in algorithm 2 in page 12. |
num_cores |
Number of processor cores for the parallel run of the
algorithm. See |
show_progress |
Boolean whether to show the progress of the algorithm in a progress bar. |
Details
This function implements the non-parametric-learning algorithm, which is algorithm 2 in page 12 in the paper. It uses a mixture of Dirichlet processes and stick-breaking to find the number of posterior samples and logistic regression to find the randomized parameter of interest. For examples, see the vignette.
Value
A matrix of bootstrap samples for the parameter of interest.