ccvx_fit: Sample from Concavex model posteriors

Description Usage Arguments Value Examples

Description

This function performs Gibbs sampling from posterior densities of concavex model parameters as well as transformations of parameters.

Usage

1
2
3
ccvx_fit(ccvx.mod, doses, mu.hat, std.err, n.chains = 4,
  gibbs.samples = 5000, burn.in = 1000, sd.ph3 = NULL,
  n.per.arm.ph3 = NULL)

Arguments

ccvx.mod

JAGS model file as specified by ccvx_build_jags

doses

A vector of dose strengths, with placebo listed first

mu.hat

A vector of parameter estimates for each of the doses

std.err

A vector of standard errors for each of the doses

n.chains

Number of chains used to for Gibbs sampling. Default is 4

gibbs.samples

Number of samples to draw for each chain after burn in. Default is 5000

burn.in

Number of burn in samples to be drawn. Default is 1000

sd.ph3

The standard deviation of the endpoint being assessed in phase 3. Only needs to be specified when ccvx_fit() computes posterior predictive probabilities (i.e. model-based DDCPs)

n.per.arm.ph3

The number of patients per arm being assessed in hypothetical phase 3 study. Only needs to be specified when ccvx_fit() computes posterior predictive probabilities (i.e. model-based DDCPs)

Value

A list with the elements

ccvx.mod

The JAGS code used for Gibbs sampling as generated by ccvx_build_jags or ccvx5_build_jags

jags.samples

output containing Gibbs samples from parameter posteriors generated

coda.samples

output containing coda samples for MCMC diagnostics

doses

A vector of dose strengths, with placebo listed first

mu.hat

A vector of parameter estimates for each of the doses

std.err

A vector of standard errors for each of the doses

Examples

1
2
3
4
ccvx.mod <- ccvx_build_jags()
ccvx.samples <- ccvx_fit(ccvx.mod, doses = 0:4, mu.hat = c(1, 20, 50, 60, 65), std.err = rep(10, 5))
names(ccvx.samples$jags.samples)
ccvx_plot_fit(ccvx.samples)

paulmanser/concavex documentation built on May 5, 2019, 5:53 p.m.