effectplot: Plot for regressions to compare effects sizes of normalized...

Description Usage Arguments

View source: R/effect_sizes.r

Description

The plot shall help to compare magnitudes of the influence of different explanatory variables. The default effect is "10-90", i.e. the effect of when -ceteris paribus- changing an (numeric) explanatory variable from its 10

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
effectplot(reg, dat = get.regression.data(reg, source.data = source.data),
  source.data = NULL, main = NULL, vars = intersect(colnames(dat),
  names(coef(reg))), ignore.vars = NULL, numeric.effect = "10-90",
  dummy01 = TRUE, sort = TRUE, scale.depvar = NULL,
  depvar = name.of.depvar(reg),
  xlab = "Explanatory variables\n(low baseline high)",
  ylab = paste0("Effect on ", depvar, ""), colors = c(pos = "#11AAAA", neg =
  "#EE3355"), effect.sizes = NULL, effect.bases = NULL, horizontal = TRUE,
  show.ci = FALSE, ci.prob = c(0.05, 0.95), num.ticks = NULL,
  add.numbers = TRUE, numbers.align = c("center", "left", "right",
  "left_of_bar_end", "right_of_bar_end")[1], numbers.vjust = ifelse(show.ci,
  0, 0.5), left.margin = 0, right.margin = 0, signif.digits = 2,
  round.digits = 8, alpha = 0.8, ...)

Arguments

reg

the results from a regression, e.g. from a call to lm or glm

dat

default = the data frame the regression was estimated from

vars

the explanatory variables that shall be shown in the plot

numeric.effect

a code describing the lowest and highest values of numeric explanatory variables used to calculate the effect, e.g. "05-95" means taking the effect of moving from the 5 percent to the 95 percent quantile.

dummy01

shall numeric varibles that have only 0 and 1 as values be treated as a dummy variables?

sort

if TRUE (default) sort the effects by size

scale.depvar

a scaling for the dependent variable

depvar

name of the dependent variable

xlab,

ylab labels

colors

colors for positive values (pos) and negative values (neg)

horizontal

shall bars be shown horizontally?

show.ci

shall confidence intervals be shown?

ci.prob

left and right probability level for confidence intervals

num.ticks

the number of tick marks on the effect size axis

add.numbers

shall the effect sizes be added as numbers in the plot?

numbers.align

How shall the effect size numbers be aligned: "left","center", "right" align all numbers at the same horizontal posistion for all variables. "left_of_bar_end" and "right_of_bar_end" align them at the end of each bar.

numbers.vjust

Vertical adjustment of the numbers

left.margin

extra margin left of bars as fraction of maximum bar width

right.margin

extra margin right of bars as fraction of maximum bar width

signif.digits

number of significant digits for effect sizes

round.digits

number of digits effect sizes shall be rounded to

...

further arguments passed to qplot. E.g. you can set "main" to specify a title of the plot.


skranz/regtools documentation built on May 30, 2019, 3:02 a.m.