bzComp {beanz} | R Documentation |
Comparison of posterior treatment effects
Description
Present the difference in the posterior treatment effects between subgroups
Usage
bzSummaryComp(stan.rst, sel.grps = NULL, cut = 0, digits = 3, seed = NULL)
bzPlotComp(stan.rst, sel.grps = NULL, ..., seed = NULL)
bzForestComp(
stan.rst,
sel.grps = NULL,
...,
quants = c(0.025, 0.975),
seed = NULL
)
Arguments
stan.rst |
a class |
sel.grps |
an array of subgroup numbers to be included in the summary results |
cut |
cut point to compute the probabiliby that the posterior subgroup treatment effects is below |
digits |
number of digits in the summary result table |
seed |
random seed |
... |
options for |
quants |
lower and upper quantiles of the credible intervals in the forest plot |
Value
bzSummaryComp
generates a data frame with summary statistics
of the difference of treatment effects between the selected subgroups.
bzPlotComp
generates the density plot of the difference in the
posterior treatment effects between subgroups. bzForestComp
generates the forest plot of the difference in the posterior treatment
effects between subgroups.
See Also
Examples
## Not run:
var.cov <- c("sodium", "lvef", "any.vasodilator.use");
var.resp <- "y";
var.trt <- "trt";
var.censor <- "censor";
resptype <- "survival";
var.estvar <- c("Estimate", "Variance");
subgrp.effect <- bzGetSubgrpRaw(solvd.sub,
var.resp = var.resp,
var.trt = var.trt,
var.cov = var.cov,
var.censor = var.censor,
resptype = resptype);
rst.sr <- bzCallStan("sr", dat.sub=subgrp.effect,
var.estvar=var.estvar, var.cov = var.cov,
par.pri=c(B=1000, C=1000),
chains=4, iter=500,
warmup=100, thin=2, seed=1000);
sel.grps <- c(1,4,5);
tbl.sub <- bzSummaryComp(rst.sr, sel.grps=sel.grps);
bzPlot(rst.sr, sel.grps = sel.grps);
bzForest(rst.sr, sel.grps = sel.grps);
## End(Not run)