strataforestplot: Make forest plot to summarize strata fits

View source: R/bystrataCoreFuns.R

strataforestplotR Documentation

Make forest plot to summarize strata fits

Description

Make a forest plot to summarize model fits within each strata

Usage

strataforestplot(MRSSmat, MRSSres, stratafits, family, measure,
  treetype = "final", labelNames = NULL, cilevel, alternative,
  descfit = NULL, descRes = NULL, fplottype = NULL,
  txtgp = forestplot::fpTxtGp(cex = 0.9, xlab = grid::gpar(cex = 0.9),
  ticks = grid::gpar(cex = 0.9), label = grid::gpar(lineheight = 0.75)),
  wrapwidth = 70, ...)

Arguments

MRSSmat

matrix summary of model (e.g., cox, glm) fits within each strata with required columns "exp.bhat", "exp.ci.lower.", and "exp.ci.upper." (e.g., HR/OR and corresponding confidence interval) and "weight.adap" for family = "cox" or "binomial", measure="OR", or columns "ratediff", "ci.lower", "ci.upper" for family = "binomial", measure="RD", or columns "bhat", "ci.lower", "ci.upper" for family = "gaussian"

MRSSres

Row matrix with amalgamated results summary, including estimate and corresponding confidence intervals

stratafits

survfit object with number of subjects, median survival times, etc. within each strata

family

Trait family, current options: "cox", "binomial, "gaussian"

measure

Response of interest; current options are: for survival traits: "HR" (hazard ratio) and "TR" (time ratio from model averaging of AFT models); for binary traits: "RD" (risk difference using Miettinen and Nurminen 1985 method) and "OR" (odds ratio, using GLM model fit); ignored for continuous traits

labelNames

Vector of names for each tree strata formed (e.g., number of strata or covariate definition)

cilevel

Confidence level alpha for overall result and confidence intervals

alternative

Whether to perform two-tailed ("two.tailed) or one-tailed ("less" or "greater") test

descfit

Matrix summarizing descriptive model fit information (e.g., model averaged AFT estimate, CI, and Pr(TR > 1))

descRes

Amalgamated results for descriptive (supplemental) model, e.g., as output from minPadapHR

txtgp

Additional forestplot graphical parameters to pass to the function (see also fpTxtGp)

wrapwidth

Number of characters after which to wrap forest plot label names to next line (to avoid forest plot getting too long)

...

Optional additional arguments passed into the forestplot function (see also forestplot )

Value

fplot An annotated forest plot showing by-stratum estimates and confidence intervals, as well as amalgamated result


rmarceauwest/fiveSTAR documentation built on June 30, 2023, 7:38 a.m.