# rjmcmc_func: Perform reversible-jump MCMC post-process to select... In BayesOrdDesign: Bayesian Group Sequential Design for Ordinal Data

## Description

Performs Bayesian multi-model inference, estimating posterior model probabilities for 2 candidate models.

## Usage

 `1` ```rjmcmc_func(g1, ginv1, g2, ginv2, or_alt, sd, pro_ctr, n, U) ```

## Arguments

 `g1` specify the bi-jections from the universal parameter psi to PO model parameter set `ginv1` specify the bi-jections from the PO model parameter set to psi. It is the inverse transformation of g1. `g2` specify the bi-jections from the universal parameter psi to NPO model parameter set `ginv2` specify the bi-jections from the NPO model parameter set to psi. It is the inverse transformation of g2. `or_alt` effect size to be detected (under H_1) in terms of odds ratio `sd` the standard error `pro_ctr` distribution of clinical categories for the control group `n` sample size for each group and each interim look `U` the desirability of each outcome level

## Value

rjmcmc_func() returns the selection probabilities for PO and NPO model

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30``` ```g1 = function(psi){ w = sum(psi[6:10])/5 theta = c(psi, psi, psi, psi, psi, w, w-psi, w-psi, w-psi, w-psi) return(theta) } ginv1 = function(theta){ w = sum(theta[6:10]) psi = c(theta, theta, theta, theta, theta, w, theta-theta, theta-theta, theta-theta, theta-theta) return(psi) } g2 = function(psi){ theta = psi return(theta) } ginv2 = function(theta){ psi = theta return(psi) } out = rjmcmc_func(g1, ginv1, g2, ginv2, or_alt = c(1.4,1.4,1.4,1.4,1.4), sd = 0.2, pro_ctr = c(0.58,0.05,0.17,0.03,0.04,0.13), n = 100, U = c(100,80,65,25,10,0)) ```

BayesOrdDesign documentation built on Sept. 21, 2021, 5:11 p.m.