plotForestParam: Calculated univariate analysis and creates a forest plot

View source: R/plotForestParam.R

plotForestParamR Documentation

Calculated univariate analysis and creates a forest plot

Description

The function creates a forest plot for a given number of variables, expect a srv object and a data.frame containing the selected variables as columns. Univariate Cox PH models are fitted. A subject vector can be specified to allow for the analysis of multiple observations per patient (e.g. paired samples), by using marginal model [cluster(subject)]. Errors might occur if the graphic devices dimension is too small (foresplot() fails).

Usage

plotForestParam(
  srv,
  data,
  subject = NULL,
  title = "",
  col = c("royalblue", "darkblue", "royalblue"),
  invalCut = 100,
  removeInval = F,
  dist = "weibull"
)

Arguments

srv

Survival object as created by survival::Surv() function, each observation is linked to one row of the data parameter

data

data.frame containing all variables which will be analyzed. The class of each column determined the type of analysis: numeric cols will be treated as continous variable, factor and character as factors.

subject

vector identifying independent subjects

title

Plot title

col

Color vector as expected by the forestplot() function

invalCut

Cutoff to set HR, CI and p-values to empty values if HR exceeds the provided cutoff (e.g. if models do not converge)

removeInval

Retain as invalid identified levels (invalCut)


mknoll/dataAnalysisMisc documentation built on Feb. 4, 2024, 8:16 a.m.