Predict the true log hazard ratio in a new single-arm study by adjusting
for additional bias and variability caused by the non-randomized design. This
function first draws from the distribution of the true log hazard
ratio comparing the treatment to the external control (trt_ec
). It then
draws the true log hazard ratio comparing the internal control to the external
control (ic_ec
) from its predictive distribution. Lastly, trt_ec
and
ic_ec
are combined to produce simulated draws of the true log hazard ratio
in a comparison of the treatment to the internal control (trt_ic
).
# S3 method for ecmeta_jags predict( object, newdata, n_burnin = 0, thin = 1, n_adapt = 1000, quiet = FALSE, ... ) # S3 method for ecmeta_ml predict(object, newdata, n_sims = 1000, ...)
object | An object of the appropriate class. |
---|---|
newdata | A |
n_burnin | Number of |
thin | Thinning interval for monitors. Passed to |
n_adapt | The number of iterations for adaptation. Passed to |
quiet | If |
... | Currently unused. |
n_sims | Number of simulations to use. Only relevant when using a maximum likelihood based approach. |
A list that may contain the following elements:
A matrix with three columns containing draws of the true log
hazard ratios. The columns are: trt_ic
(a comparison of the treatment
to the internal control), trt_ec
(a comparison of the treatment to the
external control) and ic_ec
(a comparison of the internal control to
the external control).
When using a Bayesian approach, a coda::mcmc.list
object is
also included that contains posterior samples of the true log hazard ratio
comparing the treatment to the external control. This is not included when
using a maximum likelihood approach.
The implementation differs slightly between the Bayesian and maximum likelihood
approaches. First, when using a Bayesian approach, MCMC is use to sample
trt_ec
whereas trt_ec
is sampled from a normal distribution based on
the log hazard ratio estimates and standard errors in the new study. In
practice, these approaches will produce very similar results.
Second, when using the Bayesian approach, the posterior predictive
distribution of ic_ec
is drawn using the posterior samples of
mu
and sigma
stored in object
. In the maximum likelihood approach,
ic_ec
is simulated by using the point estimates of mu
and sigma
and
drawing from a t distribution, which is the predictive distribution for a
future observation.
See vignette("methodology")
for a description of the method.