posterior_cases {CNPBayes} | R Documentation |
Calculate posterior proportion of cases by component
posterior_cases(model, case_control, alpha = 1, beta = 1)
model |
An instance of a |
case_control |
A vector of 1's and 0's where a 1 indicates a case and a 0 a control |
alpha |
prior alpha for the beta |
beta |
prior beta for the beta |
A matrix of dimension S (MCMC iterations) by K (number of components) where each element i,j indicates the posterior proportion of cases at an iteration and component
## Not run: # generate random case control status case_control <- rbinom(length(y(SingleBatchModelExample)), 1, 0.5) case_control_posterior <- posterior_cases(SingleBatchModelExample, case_control) ## End(Not run)