lm.contribution.ggplot: Plots the contribution of a lm's independent variables

Description Usage Arguments Examples

Description

Takes lm.contribution output and visualises it.

Usage

1
2
lm.contribution.ggplot(lm.contribution.object, date.index = NULL,
  dependent.var = NULL)

Arguments

date.index

Character. Only define if error. The date index of the lm(data = ?) variable, as a character, e.g. "Week".

dependent.var

Character. Only define if error. The dependent variable of the lm.

lm.contibution.object

The output of lm.contribution.

Examples

1
2
3
4
5
x <- data.table::fread(system.file("extdata", "lm.csv", package = "nladwa"))
x[, Week := excelDateToRDate(Week)]
lm.x <- lm(TotalGrossLeads ~ Search.Spend + Competitor.Spend, data = x)
lm.object <- lm.contribution(lm.object = lm.x, date.index = "Week")
lm.contribution.ggplot(lm.object)

Braja93/braja documentation built on May 6, 2019, 12:07 a.m.