View source: R/gibbs_sampler_predictive_jags.R
gibbs.sampler.predictive.rjags | R Documentation |
gibbs.sampler.predictive.jags
does the predictive ContRespPP method using rjags to generate
samples instead of base R functions, drastically decreasing the computational time required to obtain
predictive draws.
gibbs.sampler.predictive.rjags( X, Y, n.seen, beta.mean, beta.precision, shape, rate, n.sim, y.burnin, b.sim, b.burnin, phi.0, theta.t, prob, factor.no.2way = NA, colnames.pick = NA, seed = NA, verbose = TRUE )
X |
Design matrix for the test (matrix of indicator functions defining which model parameters are active in each test event). |
Y |
A vector of the responses from the test. |
n.seen |
Number of test events already observed (i.e., the number of rows of the design matrix, X, that have been observed). |
beta.mean |
Mean vector of the multivariate normal distribution (or the mean of each of the priors on the model parameters), ordered the same as the columns of the design matrix, X. It also serves as the initialization for the model parameters. |
beta.precision |
Precisions of the multivariate normal distribution (precision of each of the priors on the model parameters), corresponding to the beta.mean values. |
shape |
Hyperparameter alpha for gamma prior on the precision of the ANOVA model, tau. |
rate |
Hyperparameter beta for gamma prior on the precision of the ANOVA model, tau. |
n.sim |
Number of non-conditional posterior draws (i.e., number of draws that will be returned to the user from the function after burn-in draws for the non-conditional draws are removed). |
y.burnin |
Number of burn-in samples for the non-conditional posterior. |
b.sim |
Number of conditional posterior draws used in analysis for each non-conditional draw. |
b.burnin |
Number of burn-in samples for the conditional posterior. |
phi.0 |
Threshold value the parameter of interest (BMM) must obtain
(i.e., BBM > |
theta.t |
Certainty threshold for the conditional posterior probability of the
parameter of interest (the Bayesian mission mean, "BMM") obtaining |
prob |
Matrix or dataframe of the "likelihood of encountering" (or probability of seeing a factor level); it is a two column matrix (or dataframe), where the first column identifies the factor numerically and the second column defines the probability of seeing each factor level. |
factor.no.2way |
Optional vector of model parameters (as defined by prob) that are not incorporated in the two way interactions for the model. |
colnames.pick |
Optional vector of model parameter names in the same order as in the design matrix to label the returned dataframe columns. |
seed |
Optional selection which will create a reproducible result from the function. |
verbose |
Allows suppression of sampler progress printing in console. |
Returns a list with three elements:
pp
The predicted probability of the test ending in a successful evaluation of the question of interest
posterior
The full dataframe of non-conditional posterior draws
indicator
The vector of test success results for each posterior draw
Printing the result object will display the predicted probability result.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.