make.forestplot: Function for pretty forestplots, adapted from Ryan

Description Usage Arguments Value Examples

View source: R/make.forestplot.R

Description

Function for pretty forestplots, adapted from Ryan

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
make.forestplot(
  model.slot = 4,
  numfits = 4,
  model_names,
  fit1,
  fit2,
  fit3,
  fit4,
  inc = 0.1
)

Arguments

model.slot

the position of the thing you're comparing to within the model summary results

numfits

The number of models you're looking at

model_names

The names for your models in a vector of characters

fit1

The first model

fit2

The second model (and so on and so forth. you need to put in four fits.)

inc

The increments for the xticks

Value

A nice forestplot

Examples

1
2
model_names <- c("coxph(survival) ~ mtDNA-CN", "Model 1 + Age, Sex, Race", "Model 2 + Hypertension, Diabetes, Smoking", 'Model 3 + BMI, SBP, Troponin, AF history')
make.forestplot(model_names = model_names, fit1 = fit1, fit2 = fit2, fit3 = fit3, fit4 = fit4)

syyang93/yangR documentation built on March 1, 2021, 4:55 p.m.